Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 15451 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
15451 efrain 1
<?php
2
use LeadersLinked\Model\JobDescription;
3
 
4
$acl            = $this->viewModel()->getRoot()->getVariable('acl');
5
$currentUser    = $this->currentUserHelper();
6
 
7
$roleName = $currentUser->getUserTypeId();
8
 
9
$routeAdd       = $this->url('jobs-description/add');
10
$routeDatatable = $this->url('jobs-description');
11
$routeImport    = $this->url('jobs-description/import');
12
$routeDashboard = $this->url('dashboard');
13
 
14
$allowAdd               = $acl->isAllowed($roleName, 'jobs-description/add') ? 1 : 0;
15
$allowEdit              = $acl->isAllowed($roleName, 'jobs-description/edit') ? 1 : 0;
16
$allowDelete            = $acl->isAllowed($roleName, 'jobs-description/delete') ? 1 : 0;
17
$allowReport            = $acl->isAllowed($roleName, 'jobs-description/report') ? 1 : 0;
18
$allowImport            = $acl->isAllowed($roleName, 'jobs-description/import') ? 1 : 0;
19
 
20
 
16822 efrain 21
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
22
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
15451 efrain 23
 
16822 efrain 24
$this->inlineScript()->appendFile($this->basePath('assets/vendors/select2/js/select2.js'));
25
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/select2/css/select2.css'));
26
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/select2-bootstrap4-theme/select2-bootstrap4.css'));
15451 efrain 27
 
28
// Page Styles
29
$this->headLink()->appendStylesheet($this->basePath('css/pages/self-evaluation.css'));
30
 
31
$js = <<<JS
32
const linksVars = {
33
    add_link: '$routeAdd',
34
    table_link: '$routeDatatable',
35
    import_link: '$routeImport',
36
    dashboard_link: '$routeDashboard',
37
    permisions: {
38
        allowAdd: '$allowAdd',
39
        allowEdit: '$allowEdit',
40
        allowDelete: '$allowDelete',
41
        allowReport: '$allowReport',
42
        allowImport: '$allowImport'
43
    }
44
}
45
JS;
46
 
47
$this->inlineScript()->appendScript($js);
48
$this->inlineScript()->captureEnd();
49
$this->headLink()->appendStylesheet('/react-bundles/job_description/main.css');
50
$this->inlineScript()->appendFile('/react-bundles/job_description/jobDescription.js');
51
 
52
?>
53
<div id="react-job_description">
54
</div>