Rev 15055 | Rev 16841 | 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"
}
const LABELS = {
'ADD': 'LABEL_ADD',
'EDIT': 'LABEL_EDIT',
'DELETE': 'LABEL_DELETE',
'REFRESH': 'LABEL_REFRESH',
'USERS_WHO_APPLIED': 'LABEL_USERS_WHO_APPLIED',
'SEARCH': 'LABEL_DATATABLE_SSEARCH',
'REGISTER': 'LABEL_REGISTER',
'SHOW': 'LABEL_SHOW',
'JOBS': 'LABEL_JOBS',
'STATUS':'LABEL_STATUS',
'EMPLOYMENT_TYPE':'LABEL_EMPLOYMENT_TYPE',
'QTY_USERS_WHO_APPLIED':'LABEL_QTY_USERS_WHO_APPLIED',
'DATATABLE_SINFO' : 'LABEL_DATATABLE_SINFO',
'EDIT_JOB' : 'LABEL_EDIT_JOB',
'TITLE' : 'LABEL_TITLE',
'OVERVIEW' : 'LABEL_OVERVIEW',
'LAST_DATE_OF_APPLICATION' : 'LABEL_LAST_DATE_OF_APPLICATION',
'EMPLOYMENT_TYPE' : 'LABEL_EMPLOYMENT_TYPE',
'LOCATION' : 'LABEL_LOCATION',
'EXPERIENCE' : 'LABEL_EXPERIENCE',
'SALARY' : 'LABEL_SALARY',
'CATEGORIE' : 'LABEL_CATEGORIE',
'SKILLS' : 'LABEL_SKILLS',
'LANGUAGES' : 'LABEL_LANGUAGES',
'DEGREES' : 'LABEL_DEGREES',
}
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>