Rev 11131 | Rev 14162 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
<?php
$acl = $this->viewModel()->getRoot()->getVariable('acl');
$currentUser = $this->currentUserHelper();
$roleName = $currentUser->getUserTypeId();
$routeAdd = $this->url('jobs/add');
$routeDatatable = $this->url('jobs');
$allowAdd = $acl->isAllowed($roleName, 'jobs/add') ? 1 : 0;
$allowDelete = $acl->isAllowed($roleName, 'jobs/delete') ? 1 : 0;
$allowEdit = $acl->isAllowed($roleName, 'jobs/edit') ? 1 : 0;
$allowUsersWhoApplied = $acl->isAllowed($roleName, 'jobs/users-who-applied') ? 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->headStyle()->captureStart();
echo <<<CSS
#gridTableUsersWhoApplied {
display: flex;
flex-flow: column;
width: 100%;
}
#gridTableUsersWhoApplied thead {
flex: 0 0 auto;
}
#gridTableUsersWhoApplied tbody {
flex: 1 1 auto;
display: block;
overflow-y: auto;
overflow-x: hidden;
}
#gridTableUsersWhoApplied tr {
width: 100%;
display: table;
table-layout: fixed;
}
CSS;
$this->headStyle()->captureEnd();
$categories = json_encode($job_categories);
$js = <<<JS
const linksVars = {
link_add:"$routeAdd",
link_table: "$routeDatatable",
allowAdd: "$allowAdd",
allowDelete: "$allowDelete",
allowEdit: "$allowEdit",
jobCategoryOptions: $categories,
allowUsersWhoApplied: "$allowUsersWhoApplied",
googleApi: "$google_map_key"
}
JS;
$this->inlineScript()->appendScript($js);
$this->headLink()->appendStylesheet('/react-bundles/jobs/main.css');
$this->inlineScript()->appendFile('/react-bundles/jobs/jobsBundle.js');
?>
<!-- Content Header (Page header) -->
<div id="jobs">
</div>