Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 12264 | Rev 12306 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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
 
12264 stevensc 24
 
9427 stevensc 25
$js = <<<JS
26
	const backendVariables= {
27
		dashboard_link: "$routeDashboard",
28
        add_link: "$routeAdd",
9779 stevensc 29
        table_link: "$routeDatatable",
9780 stevensc 30
        googleApiKey: "$google_map_key",
12264 stevensc 31
        jobsDescription: $jsonJobsDescription,
32
        industries: $jsonJobsDescription,
33
        jobsCategories: $jsonJobsDescription,
9427 stevensc 34
        permisions: {
10114 stevensc 35
            allowAdd: $allowAdd,
36
            allowEdit: $allowEdit,
37
            allowDelete: $allowDelete
9427 stevensc 38
        }
39
	}
40
JS;
9469 stevensc 41
 
42
$this->inlineScript()->appendScript($js);
9954 stevensc 43
$this->headLink()->appendStylesheet($this->basePath('/react-bundles/recruitment_and_selection/vacancies/main.css'));
44
$this->inlineScript()->appendFile('/react-bundles/recruitment_and_selection/vacancies/vacanciesBundle.js');
9469 stevensc 45
 
1384 efrain 46
?>
47
<!-- Content Header (Page header) -->
9427 stevensc 48
 
49
<div id="recruitment_and_selection-vacancies">
9912 stevensc 50
</div>