1384 |
efrain |
1 |
<?php
|
|
|
2 |
$acl = $this->viewModel()->getRoot()->getVariable('acl');
|
|
|
3 |
$currentUser = $this->currentUserHelper();
|
|
|
4 |
|
|
|
5 |
$roleName = $currentUser->getUserTypeId();
|
|
|
6 |
|
|
|
7 |
$routeDashboard = $this->url('dashboard');
|
1477 |
efrain |
8 |
$routeDatatable = $this->url('recruitment-and-selection/vacancies');
|
|
|
9 |
$routeAdd = $this->url('recruitment-and-selection/vacancies/add');
|
1384 |
efrain |
10 |
|
1477 |
efrain |
11 |
$allowAdd = $acl->isAllowed($roleName, 'recruitment-and-selection/vacancies/add') ? 1 : 0;
|
|
|
12 |
$allowEdit = $acl->isAllowed($roleName, 'recruitment-and-selection/vacancies/edit') ? 1 : 0;
|
|
|
13 |
$allowDelete = $acl->isAllowed($roleName, 'recruitment-and-selection/vacancies/delete') ? 1 : 0;
|
|
|
14 |
|
|
|
15 |
|
1384 |
efrain |
16 |
$this->headLink()->appendStylesheet($this->basePath('plugins/select2/css/select2.min.css'));
|
|
|
17 |
$this->headLink()->appendStylesheet($this->basePath('plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css'));
|
|
|
18 |
|
|
|
19 |
$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/select2.full.min.js'));
|
|
|
20 |
|
|
|
21 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
|
|
|
22 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
|
|
|
23 |
|
12314 |
stevensc |
24 |
$jsonJobCategories = json_encode($jobCategories);
|
|
|
25 |
$jsonIndustries = json_encode($industries);
|
|
|
26 |
$jsonJobDescritions = json_encode($jobDescritions);
|
12264 |
stevensc |
27 |
|
9427 |
stevensc |
28 |
$js = <<<JS
|
|
|
29 |
const backendVariables= {
|
|
|
30 |
dashboard_link: "$routeDashboard",
|
|
|
31 |
add_link: "$routeAdd",
|
9779 |
stevensc |
32 |
table_link: "$routeDatatable",
|
12314 |
stevensc |
33 |
googleApiKey: "$google_map_key",
|
|
|
34 |
jobCategories: $jobCategories,
|
|
|
35 |
industries: $industries,
|
|
|
36 |
jobDescritions: $jobDescritions,
|
9427 |
stevensc |
37 |
permisions: {
|
10114 |
stevensc |
38 |
allowAdd: $allowAdd,
|
|
|
39 |
allowEdit: $allowEdit,
|
|
|
40 |
allowDelete: $allowDelete
|
9427 |
stevensc |
41 |
}
|
|
|
42 |
}
|
|
|
43 |
JS;
|
9469 |
stevensc |
44 |
|
|
|
45 |
$this->inlineScript()->appendScript($js);
|
9954 |
stevensc |
46 |
$this->headLink()->appendStylesheet($this->basePath('/react-bundles/recruitment_and_selection/vacancies/main.css'));
|
|
|
47 |
$this->inlineScript()->appendFile('/react-bundles/recruitment_and_selection/vacancies/vacanciesBundle.js');
|
9469 |
stevensc |
48 |
|
1384 |
efrain |
49 |
?>
|
|
|
50 |
<!-- Content Header (Page header) -->
|
9427 |
stevensc |
51 |
|
|
|
52 |
<div id="recruitment_and_selection-vacancies">
|
9912 |
stevensc |
53 |
</div>
|