/** * @param ilTabsGUI $tabs_gui */ public function getTabs(ilTabsGUI $tabs_gui = NULL) { if ($this->ilAccess->checkAccess('read', '', $this->object->getRefId())) { $this->tabs_gui->addTab("view_content", $this->lng->txt("content"), $this->ctrl->getLinkTarget($this, "")); $this->tabs_gui->addTab("info_short", "Info", $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary")); } // Tabs for OrgUnits exclusive root! if ($this->object->getRefId() != ilObjOrgUnit::getRootOrgRefId()) { if (ilObjOrgUnitAccess::_checkAccessStaff($this->object->getRefId())) { $this->tabs_gui->addTab("orgu_staff", $this->lng->txt("orgu_staff"), $this->ctrl->getLinkTargetByClass("ilOrgUnitStaffGUI", "showStaff")); } if ($this->ilAccess->checkAccess('write', '', $this->object->getRefId())) { $this->tabs_gui->addTab("settings", $this->lng->txt("settings"), $this->ctrl->getLinkTarget($this, 'editSettings')); } if (ilObjOrgUnitAccess::_checkAccessAdministrateUsers($this->object->getRefId())) { $this->tabs_gui->addTab("administrate_users", $this->lng->txt("administrate_users"), $this->ctrl->getLinkTargetByClass("ilLocalUserGUI", "index")); } } if ($this->ilAccess->checkAccess('write', '', $this->object->getRefId())) { $this->tabs_gui->addTarget('export', $this->ctrl->getLinkTargetByClass('ilorgunitexportgui', ''), 'export', 'ilorgunitexportgui'); // Add OrgUnit types tab if ($this->object->getRefId() == ilObjOrgUnit::getRootOrgRefId()) { $this->tabs_gui->addTab('orgu_types', $this->lng->txt('orgu_types'), $this->ctrl->getLinkTargetByClass('ilOrgUnitTypeGUI')); } } parent::getTabs($this->tabs_gui); }
protected function handleTabs($activeTabId) { if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) { require_once 'Services/Link/classes/class.ilLink.php'; $courseLink = ilLink::_getLink($this->getObjectiveOrientedContainer()->getRefId()); $this->tabs->setBack2Target($this->lng->txt('back_to_objective_container'), $courseLink); $this->tabs->addTab('results_pass_oriented', $this->lng->txt('tst_tab_results_pass_oriented'), $this->ctrl->getLinkTargetByClass('ilTestEvaluationGUI', 'outUserResultsOverview')); $this->tabs->addTab('results_objective_oriented', $this->lng->txt('tst_tab_results_objective_oriented'), $this->ctrl->getLinkTargetByClass('ilTestEvalObjectiveOrientedGUI', 'showVirtualPass')); $this->tabs->setTabActive($activeTabId); } }
/** * Add tabs to GUI * * @param string $active_tab_id ID of activated tab */ protected function setTabs($active_tab_id = 'general') { $this->tabs->addTab('general', $this->pl->txt('general'), $this->ctrl->getLinkTarget($this, 'editType')); if ($this->type) { $this->tabs->addTab('template', $this->pl->txt('template'), $this->ctrl->getLinkTarget($this, 'editTemplate')); $this->tabs->addTab('settings', $this->lng->txt('settings'), $this->ctrl->getLinkTarget($this, 'showSettings')); $this->tabs->addTab('placeholders', $this->pl->txt('placeholders'), $this->ctrl->getLinkTarget($this, 'showPlaceholders')); $this->tabs->addTab('signatures', $this->pl->txt('signatures'), $this->ctrl->getLinkTarget($this, 'showSignatures')); $this->tpl->setTitle($this->type->getTitle()); $this->tpl->setDescription($this->type->getDescription()); } $this->tabs->setTabActive($active_tab_id); $this->tabs->setBackTarget($this->pl->txt('back_to_overview'), $this->ctrl->getLinkTarget($this)); }
public function setTabs() { if ($this->access->checkAccess('read', '', $this->object->getRefId())) { $this->tabs->addTab('edit', $this->txt('pad'), $this->ctrl->getLinkTarget($this, 'editContent')); } $this->addInfoTab(); if ($this->access->checkAccess('read', '', $this->object->getRefId())) { $this->tabs->addTab('timeslider', $this->txt('timeslider'), $this->ctrl->getLinkTarget($this, 'timeSlider')); } if ($this->access->checkAccess('write', '', $this->object->getRefId())) { $this->tabs->addTab('properties', $this->txt('properties'), $this->ctrl->getLinkTarget($this, 'editProperties')); } $this->addPermissionTab(); }
/** * Builds tabs and subtabs using given $tabs, $config and $command * parameters. * @param ilTabsGUI $tabs * @param array $config * @param array $command */ private function buildTabs(ilTabsGUI $tabs, $config, $command) { /** * @var $rbacsystem ilRbacSystem */ global $rbacsystem; require_once 'Modules/Chatroom/classes/class.ilChatroom.php'; foreach ($config as $id => $tabDefinition) { if (!ilChatroom::checkUserPermissions($tabDefinition['permission'], $this->gui->getRefId(), false)) { continue; } else { if (isset($tabDefinition['enabled']) && !$tabDefinition['enabled']) { continue; } } $tabs->addTab($id, $this->getLabel($tabDefinition, $id), $tabDefinition['link']); if ($command[0] == $id && isset($tabDefinition['subtabs']) && is_array($tabDefinition['subtabs'])) { foreach ($tabDefinition['subtabs'] as $subid => $subTabDefinition) { if (!$rbacsystem->checkAccess($subTabDefinition['permission'], $this->gui->getRefId())) { continue; } else { if (isset($subTabDefinition['enabled']) && !$subTabDefinition['enabled']) { continue; } } $tabs->addSubTab($subid, $this->getLabel($subTabDefinition, $subid), $subTabDefinition['link']); } } } }