/**
  * Set header for skill
  *
  * @param
  * @return
  */
 function setTabs($a_tab)
 {
     global $ilTabs, $ilCtrl, $tpl, $lng, $ilHelp;
     $ilTabs->clearTargets();
     $ilHelp->setScreenIdComponent("skmg_sktp");
     if ($this->tref_id == 0) {
         $ilTabs->setBackTarget($lng->txt("skmg_skill_templates"), $ilCtrl->getLinkTargetByClass("ilobjskillmanagementgui", "editSkillTemplates"));
     }
     if (is_object($this->node_object)) {
         if ($this->tref_id == 0) {
             $tpl->setTitle($lng->txt("skmg_skill_template") . ": " . $this->node_object->getTitle());
         } else {
             $tpl->setTitle($this->node_object->getTitle());
         }
         // levels
         $ilTabs->addTab("levels", $lng->txt("skmg_skill_levels"), $ilCtrl->getLinkTarget($this, 'edit'));
         if ($this->tref_id > 0) {
             // usage
             $this->addUsageTab($ilTabs);
         }
         // properties
         if ($this->tref_id == 0) {
             $ilTabs->addTab("properties", $lng->txt("settings"), $ilCtrl->getLinkTarget($this, 'editProperties'));
         }
         $ilTabs->activateTab($a_tab);
         parent::setTitleIcon();
         $this->setSkillNodeDescription();
     } else {
         $tpl->setTitle($lng->txt("skmg_skill"));
         $tpl->setDescription("");
     }
 }
 /**
  * Execute command
  *
  * @access public
  *
  */
 public function executeCommand()
 {
     global $rbacsystem, $ilErr, $ilAccess, $ilTabs;
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     $this->prepareOutput();
     if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
         $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
     }
     switch ($next_class) {
         case 'ilskillrootgui':
             include_once "./Services/Skill/classes/class.ilSkillRootGUI.php";
             $skrt_gui = new ilSkillRootGUI((int) $_GET["obj_id"], $this);
             $skrt_gui->setParentGUI($this);
             $ret = $this->ctrl->forwardCommand($skrt_gui);
             break;
         case 'ilskillcategorygui':
             $this->tabs_gui->activateTab("skills");
             include_once "./Services/Skill/classes/class.ilSkillCategoryGUI.php";
             $scat_gui = new ilSkillCategoryGUI((int) $_GET["obj_id"]);
             $scat_gui->setParentGUI($this);
             $this->showTree(false, $scat_gui, "listItems");
             $ret = $this->ctrl->forwardCommand($scat_gui);
             break;
         case 'ilbasicskillgui':
             $this->tabs_gui->activateTab("skills");
             include_once "./Services/Skill/classes/class.ilBasicSkillGUI.php";
             $skill_gui = new ilBasicSkillGUI((int) $_GET["obj_id"]);
             $skill_gui->setParentGUI($this);
             $this->showTree(false, $skill_gui, "edit");
             $ret = $this->ctrl->forwardCommand($skill_gui);
             break;
         case 'ilskilltemplatecategorygui':
             $this->tabs_gui->activateTab("skill_templates");
             include_once "./Services/Skill/classes/class.ilSkillTemplateCategoryGUI.php";
             $sctp_gui = new ilSkillTemplateCategoryGUI((int) $_GET["obj_id"]);
             $sctp_gui->setParentGUI($this);
             $this->showTree(true, $sctp_gui, "listItems");
             $ret = $this->ctrl->forwardCommand($sctp_gui);
             break;
         case 'ilbasicskilltemplategui':
             $this->tabs_gui->activateTab("skill_templates");
             include_once "./Services/Skill/classes/class.ilBasicSkillTemplateGUI.php";
             $sktp_gui = new ilBasicSkillTemplateGUI((int) $_GET["obj_id"]);
             $sktp_gui->setParentGUI($this);
             $this->showTree(true, $sktp_gui, "edit");
             $ret = $this->ctrl->forwardCommand($sktp_gui);
             break;
         case 'ilskilltemplatereferencegui':
             $this->tabs_gui->activateTab("skills");
             include_once "./Services/Skill/classes/class.ilSkillTemplateReferenceGUI.php";
             $sktr_gui = new ilSkillTemplateReferenceGUI((int) $_GET["obj_id"]);
             $sktr_gui->setParentGUI($this);
             $this->showTree(false, $sktr_gui, "listItems");
             $ret = $this->ctrl->forwardCommand($sktr_gui);
             break;
         case "ilskillprofilegui":
             $ilTabs->activateTab("profiles");
             include_once "./Services/Skill/classes/class.ilSkillProfileGUI.php";
             $skprof_gui = new ilSkillProfileGUI();
             $ret = $this->ctrl->forwardCommand($skprof_gui);
             break;
         case 'ilpermissiongui':
             $this->tabs_gui->activateTab('permissions');
             include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
             $perm_gui =& new ilPermissionGUI($this);
             $ret = $this->ctrl->forwardCommand($perm_gui);
             break;
         default:
             if (!$cmd || $cmd == 'view') {
                 $cmd = "editSkills";
             }
             if ($cmd == "showTree") {
                 $this->showTree($_GET["templates_tree"]);
             } else {
                 $this->{$cmd}();
             }
             break;
     }
     return true;
 }
 /**
  * Set header for skill
  *
  * @param
  * @return
  */
 function setSkillHead($a_tab)
 {
     global $ilTabs, $ilCtrl, $tpl, $lng;
     $ilTabs->clearTargets();
     $ilTabs->setBackTarget($lng->txt("skmg_skill_templates"), $ilCtrl->getLinkTargetByClass("ilobjskillmanagementgui", "editSkillTemplates"));
     if (is_object($this->node_object)) {
         $tpl->setTitle($lng->txt("skmg_skill_template") . ": " . $this->node_object->getTitle());
         // levels
         $ilTabs->addTab("levels", $lng->txt("skmg_skill_levels"), $ilCtrl->getLinkTarget($this, 'edit'));
         // properties
         $ilTabs->addTab("properties", $lng->txt("settings"), $ilCtrl->getLinkTarget($this, 'editProperties'));
         $ilTabs->activateTab($a_tab);
         //$tpl->setTitleIcon(ilUtil::getImagePath("icon_sktp_b.png"), $lng->txt("skmg_skill_template"));
         parent::setTitleIcon();
         $this->setSkillNodeDescription();
     } else {
         $tpl->setTitle($lng->txt("skmg_skill"));
         $tpl->setDescription("");
     }
 }