public function showTask()
 {
     if (!$this->permissions['view']) {
         echo 'You can\'t access.';
         return;
     }
     //tabview widget, used in role and group editing
     Yuilib::load('tabview');
     Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
     Util::get_js(Get::rel_path('adm') . '/views/functionalroles/functionalroles.js', true, true);
     Util::get_css('base-folder-tree.css', false, true);
     //render view
     $this->render('show', array('permissions' => $this->permissions, 'selected_group' => 0, 'filter_text' => ""));
 }
 public function show()
 {
     Yuilib::load('tabview,selector');
     Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
     $this->render('show', array('permissions' => $this->permissions, 'result_message' => "", 'filter_text' => ""));
 }
 public function showTask()
 {
     //tabview widget, used in category editing
     Yuilib::load('tabview');
     //encode some data
     $arr_typologies = $this->model->getCompetenceTypologies();
     $arr_types = $this->model->getCompetenceTypes();
     $typologies_dropdown = '[';
     $first = true;
     foreach ($arr_typologies as $key => $value) {
         if (!$first) {
             $typologies_dropdown .= ',';
         } else {
             $first = false;
         }
         $typologies_dropdown .= '{value: "' . $key . '", label: "' . $value . '"}';
     }
     $types_dropdown = '[';
     $first = true;
     foreach ($arr_types as $key => $value) {
         if (!$first) {
             $types_dropdown .= ',';
         } else {
             $first = false;
         }
         $types_dropdown .= '{value: "' . $key . '", label: "' . $value . '"}';
     }
     $typologies_dropdown .= ']';
     $types_dropdown .= ']';
     //render view
     $this->render('show', array('permissions' => $this->permissions, 'selected_node' => $this->_getFromSession('selected_node', 0), 'filter_text' => $this->_getFromSession('filter_text', ""), 'show_descendants' => $this->_getFromSession('show_descendants', false), 'language' => getLanguage(), 'startIndex' => $this->_getFromSession('startIndex', 0), 'results' => $this->_getFromSession('results', Get::sett('visuItem', 25)), 'rowsPerPage' => $this->_getFromSession('rowsPerPage', Get::sett('visuItem', 25)), 'sort' => $this->_getFromSession('sort', 0), 'dir' => $this->_getFromSession('dir', 'asc'), 'typologies' => $this->json->encode($arr_typologies), 'types' => $this->json->encode($arr_types), 'typologies_dropdown' => $typologies_dropdown, 'types_dropdown' => $types_dropdown));
 }