Proyectos de Subversion LeadersLinked - Backend

Rev

Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |

<?php
use LeadersLinked\Model\JobDescription;

$acl            = $this->viewModel()->getRoot()->getVariable('acl');
$currentUser    = $this->currentUserHelper();

$roleName = $currentUser->getUserTypeId();

$routeAdd       = $this->url('jobs-description/add');
$routeDatatable = $this->url('jobs-description');
$routeImport    = $this->url('jobs-description/import');
$routeDashboard = $this->url('dashboard');

$allowAdd               = $acl->isAllowed($roleName, 'jobs-description/add') ? 1 : 0;
$allowEdit              = $acl->isAllowed($roleName, 'jobs-description/edit') ? 1 : 0;
$allowDelete            = $acl->isAllowed($roleName, 'jobs-description/delete') ? 1 : 0;
$allowReport            = $acl->isAllowed($roleName, 'jobs-description/report') ? 1 : 0;
$allowImport            = $acl->isAllowed($roleName, 'jobs-description/import') ? 1 : 0;


$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));

$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/select2.js'));
$this->headLink()->appendStylesheet($this->basePath('plugins/select2/css/select2.css'));
$this->headLink()->appendStylesheet($this->basePath('plugins/select2-bootstrap4-theme/select2-bootstrap4.css'));

// Page Styles
$this->headLink()->appendStylesheet($this->basePath('css/pages/self-evaluation.css'));

$js = <<<JS
const linksVars = {
    add_link: '$routeAdd',
    table_link: '$routeDatatable',
    import_link: '$routeImport',
    dashboard_link: '$routeDashboard',
    permisions: {
        allowAdd: '$allowAdd',
        allowEdit: '$allowEdit',
        allowDelete: '$allowDelete',
        allowReport: '$allowReport',
        allowImport: '$allowImport' 
    }
}
JS;

$this->inlineScript()->appendScript($js);
$this->inlineScript()->captureEnd();
$this->headLink()->appendStylesheet('/react-bundles/job_description/main.css');
$this->inlineScript()->appendFile('/react-bundles/job_description/jobDescription.js');

?>
<div id="react-job_description">
</div>