コード例 #1
0
 function getTabNavigation($course_id)
 {
     $navigation = new Navigation(_('Teilnehmende'), "dispatch.php/course/studygroup/members/" . $course_id);
     $navigation->setImage(Icon::create('persons', 'info_alt'));
     $navigation->setActiveImage(Icon::create('persons', 'info'));
     return array('members' => $navigation);
 }
コード例 #2
0
 function __construct()
 {
     global $url;
     $this->view = new View();
     $nav = new Navigation();
     $this->view->globalNav = $nav->renderNav();
 }
コード例 #3
0
ファイル: CoreOverview.class.php プロジェクト: ratbird/hope
 function getTabNavigation($course_id)
 {
     $object_type = get_object_type($course_id, array('sem', 'inst'));
     if ($object_type === 'sem') {
         $course = Course::find($course_id);
         $sem_class = $GLOBALS['SEM_CLASS'][$GLOBALS['SEM_TYPE'][$course->status]['class']] ?: SemClass::getDefaultSemClass();
     } else {
         $institute = Institute::find($course_id);
         $sem_class = SemClass::getDefaultInstituteClass($institute->type);
     }
     $navigation = new Navigation(_('Übersicht'));
     $navigation->setImage(Icon::create('seminar', 'info_alt'));
     $navigation->setActiveImage(Icon::create('seminar', 'info'));
     if ($object_type !== 'sem') {
         $navigation->addSubNavigation('info', new Navigation(_('Kurzinfo'), 'dispatch.php/institute/overview'));
         $navigation->addSubNavigation('courses', new Navigation(_('Veranstaltungen'), 'show_bereich.php?level=s&id=' . $course_id));
         $navigation->addSubNavigation('schedule', new Navigation(_('Veranstaltungs-Stundenplan'), 'dispatch.php/calendar/instschedule?cid=' . $course_id));
         if ($GLOBALS['perm']->have_studip_perm('admin', $course_id)) {
             $navigation->addSubNavigation('admin', new Navigation(_('Administration der Einrichtung'), 'dispatch.php/institute/basicdata/index?new_inst=TRUE'));
         }
     } else {
         $navigation->addSubNavigation('info', new Navigation(_('Kurzinfo'), 'dispatch.php/course/overview'));
         if (!$sem_class['studygroup_mode']) {
             $navigation->addSubNavigation('details', new Navigation(_('Details'), 'dispatch.php/course/details/'));
         }
         if (!$course->admission_binding && in_array($GLOBALS['perm']->get_studip_perm($course_id), array('user', 'autor'))) {
             $navigation->addSubNavigation('leave', new Navigation(_('Austragen aus der Veranstaltung'), 'dispatch.php/my_courses/decline/' . $course_id . '?cmd=suppose_to_kill'));
         }
     }
     return array('main' => $navigation);
 }
コード例 #4
0
ファイル: BrowseNavigation.php プロジェクト: ratbird/hope
 /**
  * Initialize the subnavigation of this item. This method
  * is called once before the first item is added or removed.
  */
 public function initSubNavigation()
 {
     global $user, $perm;
     parent::initSubNavigation();
     $sem_create_perm = in_array(get_config('SEM_CREATE_PERM'), array('root', 'admin', 'dozent')) ? get_config('SEM_CREATE_PERM') : 'dozent';
     // my courses
     if (is_object($user) && $user->id != 'nobody') {
         if ($perm->have_perm('admin')) {
             $navigation = new Navigation(_('Administration'));
         } else {
             $navigation = new Navigation(_('Meine Veranstaltungen'));
         }
         $navigation->addSubNavigation('list', new Navigation($perm->have_perm('admin') ? _('Veranstaltungsadministration') : _('Aktuelle Veranstaltungen'), 'dispatch.php/my_courses'));
         if ($perm->have_perm('admin')) {
             if ($GLOBALS['user']->cfg->MY_INSTITUTES_DEFAULT != 'all') {
                 $navigation->addSubNavigation('schedule', new Navigation(_('Veranstaltungs-Stundenplan'), 'dispatch.php/calendar/instschedule?cid=' . $GLOBALS['user']->cfg->MY_INSTITUTES_DEFAULT));
             }
         } else {
             $navigation->addSubNavigation('archive', new Navigation(_('Archivierte Veranstaltungen'), 'dispatch.php/my_courses/archive'));
         }
         $this->addSubNavigation('my_courses', $navigation);
         if (Config::get()->MY_COURSES_ENABLE_STUDYGROUPS && !$GLOBALS['perm']->have_perm('admin')) {
             $navigation = new Navigation(_('Meine Studiengruppen'), 'dispatch.php/my_studygroups');
             $navigation->addSubNavigation('index', new Navigation(_('Meine Studiengruppen'), 'dispatch.php/my_studygroups'));
             $navigation->addSubNavigation('all', new Navigation(_('Studiengruppensuche'), 'dispatch.php/studygroup/browse'));
             $navigation->addSubNavigation('new', new Navigation(_('Neue Studiengruppe anlegen'), 'dispatch.php/course/wizard?studygroup=1'));
             $this->addSubNavigation('my_studygroups', $navigation);
         }
         if (!$perm->have_perm('admin')) {
             $navigation = new Navigation(_('Meine Einrichtungen'), 'dispatch.php/my_institutes');
             $this->addSubNavigation('my_institutes', $navigation);
         }
     }
 }
コード例 #5
0
ファイル: CommunityNavigation.php プロジェクト: ratbird/hope
 /**
  * Initialize the subnavigation of this item. This method
  * is called once before the first item is added or removed.
  */
 public function initSubNavigation()
 {
     global $perm;
     parent::initSubNavigation();
     // online list
     $navigation = new Navigation(_('Wer ist online?'), 'dispatch.php/online');
     $this->addSubNavigation('online', $navigation);
     // contacts
     $navigation = new Navigation(_('Kontakte'), 'dispatch.php/contact');
     $this->addSubNavigation('contacts', $navigation);
     // study groups
     if (get_config('STUDYGROUPS_ENABLE')) {
         $navigation = new Navigation(_('Studiengruppen'));
         $navigation->addSubNavigation('browse', new Navigation(_('Studiengruppensuche'), 'dispatch.php/studygroup/browse'));
         $navigation->addSubNavigation('new', new Navigation(_('Neue Studiengruppe anlegen'), 'dispatch.php/course/wizard?studygroup=1'));
         if (Config::get()->MY_COURSES_ENABLE_STUDYGROUPS) {
             $navigation->addSubNavigation('index', new Navigation(_('Meine Studiengruppen'), 'dispatch.php/my_studygroups'));
         }
         $this->addSubNavigation('studygroups', $navigation);
     }
     // ranking
     if (get_config('SCORE_ENABLE')) {
         $navigation = new Navigation(_('Rangliste'), 'dispatch.php/score');
         $this->addSubNavigation('score', $navigation);
     }
 }
コード例 #6
0
 /**
  * generate
  * @return void
  */
 public function generate()
 {
     $this->core->logger->debug('massiveart->website->sitemap->generate()');
     $objRootLevels = $this->getModelFolders()->loadAllRootLevels($this->core->sysConfig->modules->cms);
     if (count($objRootLevels) > 0) {
         foreach ($objRootLevels as $objRootLevel) {
             $objRootLevelLanguages = $this->getModelFolders()->loadRootLevelLanguages($objRootLevel->id);
             $strUrl = $this->getModelFolders()->getRootLevelMainUrl($objRootLevel->id, $this->core->sysConfig->environments->production);
             if ($strUrl != '') {
                 $arrUrlParts = explode('.', $strUrl);
                 if (count($arrUrlParts) == 2) {
                     $strUrl = str_replace('http://', 'http://www.', $strUrl);
                 }
                 // init sitempa xml
                 $this->initXml($strUrl);
                 foreach ($objRootLevelLanguages as $objRootLevelLanguage) {
                     $objNavigation = new Navigation();
                     $objNavigation->setRootLevelId($objRootLevel->id);
                     $objNavigation->setLanguageId($objRootLevelLanguage->id);
                     $this->addXmlUrlsetChilds($objNavigation->loadSitemap(), $strUrl, strtolower($objRootLevelLanguage->languageCode));
                 }
                 // svae xml now
                 $this->saveXml();
             }
         }
     }
 }
コード例 #7
0
 public function __construct()
 {
     parent::__construct();
     $nav = new Navigation(_("Downloads"), PluginEngine::getURL($this, array(), "downloadarea/overview"));
     $nav->setImage(Icon::create("download", "navigation"));
     Navigation::addItem("/downloader", $nav);
 }
コード例 #8
0
ファイル: actions.class.php プロジェクト: shotaatago/OpenPNE3
 /**
  * Executes list action
  *
  * @param sfWebRequest $request A request object
  */
 public function executeList(sfWebRequest $request)
 {
     $this->list = array();
     $types = Doctrine::getTable('Navigation')->getTypesByAppName($request->getParameter('app', 'pc'));
     foreach ($types as $type) {
         $navs = Doctrine::getTable('Navigation')->retrieveByType($type);
         foreach ($navs as $nav) {
             $this->list[$type][] = new NavigationForm($nav);
         }
         $nav = new Navigation();
         $nav->setType($type);
         $this->list[$type][] = new NavigationForm($nav);
     }
     if ($request->isMethod('post')) {
         $params = $request->getParameter('nav');
         $type = $params['type'];
         $count = count($this->list[$type]);
         if ($params['id']) {
             for ($i = 0; $i < $count - 1; $i++) {
                 if ($params['id'] === $this->list[$type][$i]->getObject()->id) {
                     $this->list[$type][$i]->bind($params);
                     break;
                 }
             }
         } else {
             $this->list[$type][$count - 1]->bind($params);
         }
     }
 }
コード例 #9
0
ファイル: SCMPlugin.php プロジェクト: anantace/SCMTabs
 function getTabNavigation($course_id)
 {
     if (TRUE) {
         $temp = ScmTabEntry::findByRange_id($course_id, 'ORDER BY position ASC');
         if ($temp) {
             $scms = SimpleORMapCollection::createFromArray($temp);
             $navigation = new Navigation($scms->first()->tab_name ?: _('Informationen'));
             $navigation->setImage('icons/16/white/infopage.png');
             $navigation->setActiveImage('icons/16/black/infopage.png');
             foreach ($scms as $scm) {
                 $scm_link = PluginEngine::getLink($this, array(), 'show/' . $scm->id);
                 $nav = new Navigation($scm['tab_name'], $scm_link);
                 $nav->setImage('icons/16/white/infopage.png');
                 $nav->setActiveImage('icons/16/black/infopage.png');
                 Navigation::addItem('course/scmTabs' . $scm->id, $nav);
             }
             return null;
             //array('scm' => $navigation);
         } else {
             $scm = new ScmTabEntry($id);
             $scm->tab_name = 'Infoseite';
             $scm->user_id = $GLOBALS['user']->id;
             $scm->range_id = $GLOBALS['SessSemName'][1];
             $scm->store();
             $scm_link = PluginEngine::getLink($this, array(), 'show/' . $scm->id);
             $nav = new Navigation($scm->tab_name, $scm_link);
             $nav->setImage('icons/16/white/infopage.png');
             $nav->setActiveImage('icons/16/black/infopage.png');
             Navigation::addItem('course/scmTabs' . $scm->id, $nav);
             return null;
         }
     } else {
         return null;
     }
 }
コード例 #10
0
 public function __construct()
 {
     parent::__construct();
     $top = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array('view' => 'tiles'), "presenting/overview"));
     $top->setImage(Icon::create($this->getPluginURL() . "/assets/topicon.svg"));
     $overview = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array(), "presenting/overview"));
     $top->addSubNavigation("presenting", $overview);
     $overview->addSubNavigation("overview", new AutoNavigation(_('Übersicht'), PluginEngine::getURL($this, array(), "presenting/overview")));
     $overview->addSubNavigation("all", new AutoNavigation(_('Alle Plugins'), PluginEngine::getURL($this, array(), "presenting/all")));
     $overview->addSubNavigation("tools", new AutoNavigation(_('Tools'), PluginEngine::getURL($this, array(), "tools/sidebar_graphics_generator")));
     if ($GLOBALS['perm']->have_perm("autor")) {
         $top->addSubNavigation("myplugins", new Navigation(_("Meine Plugins"), PluginEngine::getURL($this, array(), "myplugins/overview")));
     }
     if ($GLOBALS['perm']->have_perm("user")) {
         $last_visit = UserConfig::get($GLOBALS['user']->id)->getValue("last_pluginmarket_visit");
         if ($last_visit) {
             $badge_number = MarketPlugin::countBySql("publiclyvisible = 1 AND approved = 1 AND published > ?", array($last_visit));
             if ($badge_number > 0) {
                 $top->setBadgeNumber($badge_number);
             }
         }
     }
     if ($GLOBALS['perm']->have_perm("root")) {
         $approving = new Navigation(_("Qualitätssicherung"), PluginEngine::getURL($this, array(), "approving/overview"));
         $top->addSubNavigation("approving", $approving);
     }
     Navigation::addItem("/pluginmarket", $top);
     $loginlink = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array(), "presenting/overview"));
     $loginlink->setDescription(_("Laden Sie hier Plugins für Ihr Stud.IP herunter"));
     Navigation::addItem("/login/pluginmarket", $loginlink);
     NotificationCenter::addObserver($this, "triggerFollowingStudips", "PluginReleaseDidUpdateCode");
 }
コード例 #11
0
ファイル: SearchNavigation.php プロジェクト: ratbird/hope
 /**
  * Initialize the subnavigation of this item. This method
  * is called once before the first item is added or removed.
  */
 public function initSubNavigation()
 {
     parent::initSubNavigation();
     // browse courses
     $navigation = new Navigation(_('Veranstaltungen'), 'dispatch.php/search/courses');
     $navigation->addSubNavigation('all', new Navigation(_('Alle'), 'dispatch.php/search/courses?reset_all=TRUE', array('view' => 'all')));
     foreach ($GLOBALS['SEM_CLASS'] as $key => $val) {
         $navigation->addSubNavigation($key, new Navigation($val['name'], 'dispatch.php/search/courses?reset_all=TRUE&cmd=qs', array('view' => $key)));
     }
     $this->addSubNavigation('courses', $navigation);
     // search archive
     $navigation = new Navigation(_('Archiv'), 'archiv.php');
     $this->addSubNavigation('archive', $navigation);
     // search users
     $navigation = new Navigation(_('Personen'), 'browse.php');
     $this->addSubNavigation('users', $navigation);
     // browse institutes
     $navigation = new Navigation(_('Einrichtungen'), 'institut_browse.php');
     $this->addSubNavigation('institutes', $navigation);
     // browse resources
     if (get_config('RESOURCES_ENABLE')) {
         $navigation = new Navigation(_('Ressourcen'), 'resources.php', array('view' => 'search', 'reset' => 'TRUE'));
         $this->addSubNavigation('resources', $navigation);
     }
 }
コード例 #12
0
ファイル: NewsWidget.php プロジェクト: ratbird/hope
 function getPortalTemplate()
 {
     $dispatcher = new StudipDispatcher();
     $controller = new NewsController($dispatcher);
     $response = $controller->relay('news/display/studip');
     $template = $GLOBALS['template_factory']->open('shared/string');
     $template->content = $response->body;
     if (StudipNews::CountUnread() > 0) {
         $navigation = new Navigation('', PluginEngine::getLink($this, array(), 'read_all'));
         $navigation->setImage(Icon::create('refresh', 'clickable', ["title" => _('Alle als gelesen markieren')]));
         $icons[] = $navigation;
     }
     if (get_config('NEWS_RSS_EXPORT_ENABLE')) {
         if ($rss_id = StudipNews::GetRssIdFromRangeId('studip')) {
             $navigation = new Navigation('', 'rss.php', array('id' => $rss_id));
             $navigation->setImage(Icon::create('rss', 'clickable', ["title" => _('RSS-Feed')]));
             $icons[] = $navigation;
         }
     }
     if ($GLOBALS['perm']->have_perm('root')) {
         $navigation = new Navigation('', 'dispatch.php/news/edit_news/new/studip');
         $navigation->setImage(Icon::create('add', 'clickable', ["title" => _('Ankündigungen bearbeiten')]), ["rel" => 'get_dialog']);
         $icons[] = $navigation;
         if (get_config('NEWS_RSS_EXPORT_ENABLE')) {
             $navigation = new Navigation('', 'dispatch.php/news/rss_config/studip');
             $navigation->setImage(Icon::create('rss+add', 'clickable', ["title" => _('RSS-Feed konfigurieren')]), ["data-dialog" => 'size=auto']);
             $icons[] = $navigation;
         }
     }
     $template->icons = $icons;
     return $template;
 }
コード例 #13
0
ファイル: LoginNavigation.php プロジェクト: ratbird/hope
 /**
  * Initialize the subnavigation of this item. This method
  * is called once before the first item is added or removed.
  */
 public function initSubNavigation()
 {
     parent::initSubNavigation();
     $navigation = new Navigation(_('Login'), 'index.php?again=yes');
     $navigation->setDescription(_('für registrierte NutzerInnen'));
     $this->addSubNavigation('login', $navigation);
     if (in_array('CAS', $GLOBALS['STUDIP_AUTH_PLUGIN'])) {
         $navigation = new Navigation(_('Login'), 'index.php?again=yes&sso=cas');
         $navigation->setDescription(_('für Single Sign On mit CAS'));
         $this->addSubNavigation('login_cas', $navigation);
     }
     if (in_array('Shib', $GLOBALS['STUDIP_AUTH_PLUGIN'])) {
         $navigation = new Navigation(_('Shibboleth Login'), 'index.php?again=yes&sso=shib');
         $navigation->setDescription(_('für Single Sign On mit Shibboleth'));
         $this->addSubNavigation('login_shib', $navigation);
     }
     if (get_config('ENABLE_SELF_REGISTRATION')) {
         $navigation = new Navigation(_('Registrieren'), 'register1.php');
         $navigation->setDescription(_('um NutzerIn zu werden'));
         $this->addSubNavigation('register', $navigation);
     }
     if (Config::get()->ENABLE_FREE_ACCESS) {
         $navigation = new Navigation(_('Freier Zugang'), 'dispatch.php/public_courses');
         $navigation->setDescription(_('ohne Registrierung'));
         $this->addSubNavigation('browse', $navigation);
     }
     $navigation = new Navigation(_('Hilfe'), format_help_url('Basis.Allgemeines'));
     $navigation->setDescription(_('zu Bedienung und Funktionsumfang'));
     $this->addSubNavigation('help', $navigation);
 }
コード例 #14
0
 public function setUp()
 {
     $this->updater = $this->getMock('Magento\\Setup\\Model\\Updater', [], [], '', false);
     $this->objectManagerProvider = $this->getMock('\\Magento\\Setup\\Model\\ObjectManagerProvider', [], [], '', false);
     $this->filesystem = $this->getMock('Magento\\Framework\\Filesystem', [], [], '', false);
     $this->navigation = $this->getMock('Magento\\Setup\\Model\\Navigation', [], [], '', false);
     $this->model = new UpdaterTaskCreator($this->filesystem, $this->navigation, $this->updater, $this->objectManagerProvider);
     $this->navigation->expects($this->any())->method('getMenuItems')->willReturn([['title' => 'A', 'type' => 'update'], ['title' => 'B', 'type' => 'upgrade'], ['title' => 'C', 'type' => 'enable'], ['title' => 'D', 'type' => 'disable']]);
 }
コード例 #15
0
ファイル: MessagingNavigation.php プロジェクト: ratbird/hope
 /**
  * Initialize the subnavigation of this item. This method
  * is called once before the first item is added or removed.
  */
 public function initSubNavigation()
 {
     parent::initSubNavigation();
     $messages = new Navigation(_('Nachrichten'), 'dispatch.php/messages/overview');
     $inbox = new Navigation(_('Eingang'), 'dispatch.php/messages/overview');
     $messages->addSubNavigation('inbox', $inbox);
     $messages->addSubNavigation('sent', new Navigation(_('Gesendet'), 'dispatch.php/messages/sent'));
     $this->addSubNavigation('messages', $messages);
 }
コード例 #16
0
ファイル: CoreDocuments.class.php プロジェクト: ratbird/hope
 function getTabNavigation($course_id)
 {
     $navigation = new Navigation(_('Dateien'));
     $navigation->setImage(Icon::create('files', 'info_alt'));
     $navigation->setActiveImage(Icon::create('files', 'info'));
     $navigation->addSubNavigation('tree', new Navigation(_('Ordneransicht'), "folder.php?cmd=tree"));
     $navigation->addSubNavigation('all', new Navigation(_('Alle Dateien'), "folder.php?cmd=all"));
     return array('files' => $navigation);
 }
コード例 #17
0
 public function createComponentNavigation($name)
 {
     $navigation = new Navigation();
     // nastavení překladače (nepovinné)
     $navigation->setTranslator(new MyTranslator());
     // nastavení šablony (nepovinné)
     $navigation->setTemplate('/cesta/k/sablone.phtml');
     $navigation->getRoot()->label = 'Homepage';
     $navigation->add('Articles', $this->link('Articles:default'));
 }
 public function up()
 {
     $navi = new Navigation();
     $navi->Translation['en']->caption = 'Profile';
     $navi->Translation['ja_JP']->caption = '[i:140]プロフィール';
     $navi->setType('mobile_home_center');
     $navi->setUri('member/profile');
     $navi->setSortOrder(0);
     $navi->save();
 }
コード例 #19
0
ファイル: CoreCalendar.class.php プロジェクト: ratbird/hope
 function getTabNavigation($course_id)
 {
     if (get_config('CALENDAR_GROUP_ENABLE')) {
         $navigation = new Navigation(_('Kalender'), 'dispatch.php/calendar/single/');
         $navigation->setImage(Icon::create('schedule', 'info_alt'));
         $navigation->setActiveImage(Icon::create('schedule', 'info'));
         return array('calendar' => $navigation);
     } else {
         return null;
     }
 }
コード例 #20
0
 public function before()
 {
     $this->breadcrumbs->add(UI::icon('home'), route('backend.dashboard'));
     if ($currentPage = $this->navigation->getCurrentPage()) {
         $this->checkAccess($currentPage);
         foreach ($currentPage->getPathArray() as $page) {
             $this->breadcrumbs->add($page['title'], $page['url']);
         }
     }
     parent::before();
 }
コード例 #21
0
ファイル: TerminWidget.php プロジェクト: ratbird/hope
 public function getPortalTemplate()
 {
     $dispatcher = new StudipDispatcher();
     $controller = new Calendar_ContentboxController($dispatcher);
     $response = $controller->relay('calendar/contentbox/display/' . $GLOBALS['user']->id);
     $template = $GLOBALS['template_factory']->open('shared/string');
     $template->content = $response->body;
     $navigation = new Navigation('', 'dispatch.php/calendar/single/week');
     $navigation->setImage(Icon::create('add', 'clickable', ["title" => _('Neuen Termin anlegen')]));
     $template->icons = array($navigation);
     return $template;
 }
コード例 #22
0
 /**
  * Executes list action
  *
  * @param sfWebRequest $request A request object
  */
 public function executeList(sfWebRequest $request)
 {
     $this->list = array();
     $types = Doctrine::getTable('Navigation')->getTypesByAppName($request->getParameter('app', 'pc'));
     foreach ($types as $type) {
         $navs = Doctrine::getTable('Navigation')->retrieveByType($type);
         foreach ($navs as $nav) {
             $this->list[$type][] = new NavigationForm($nav);
         }
         $nav = new Navigation();
         $nav->setType($type);
         $this->list[$type][] = new NavigationForm($nav);
     }
 }
コード例 #23
0
ファイル: hooks.php プロジェクト: Doxramos/GuildEmporium
function buildMenu($arg)
{
    /*
    $menuItems = array(
    "Chat"	=> "https://gitter.im/Doxramos/GuildEmporium?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge",
    "Developer Docs"	=> "developer",
    );
    foreach($menuItems as $menuItem => $link) {
    	echo "<li><a href='".$link."'>".$menuItem."</a></li>";
    }
    */
    $nav = new Navigation();
    $nav->GetAllMenu($arg);
}
コード例 #24
0
 public function SaveNavOrder($values)
 {
     foreach (explode(";-;;newline;;-;", $values) as $k => $v) {
         $ex2 = explode(";", $v);
         foreach ($ex2 as $k2 => $v2) {
             $ex3 = str_replace("NavigationElementID", "", $v2);
             #explode("[]=", $v2);
             $N = new Navigation($ex3);
             $N->loadMe();
             $N->changeA("sort", $k2);
             $N->saveMe();
         }
     }
 }
コード例 #25
0
ファイル: CoreSchedule.class.php プロジェクト: ratbird/hope
 function getTabNavigation($course_id)
 {
     // cmd und open_close_id mit durchziehen, damit geöffnete Termine geöffnet bleiben
     $req = Request::getInstance();
     $openItem = '';
     if (isset($req['cmd']) && isset($req['open_close_id'])) {
         $openItem = '&cmd=' . $req['cmd'] . '&open_close_id=' . $req['open_close_id'];
     }
     $navigation = new Navigation(_('Ablaufplan'));
     $navigation->setImage(Icon::create('schedule', 'info_alt'));
     $navigation->setActiveImage(Icon::create('schedule', 'info'));
     $navigation->addSubNavigation('dates', new Navigation(_('Termine'), "dispatch.php/course/dates"));
     $navigation->addSubNavigation('topics', new Navigation(_('Themen'), "dispatch.php/course/topics"));
     return array('schedule' => $navigation);
 }
コード例 #26
0
ファイル: ResponsiveHelper.php プロジェクト: ratbird/hope
 /**
  * Recursively build a navigation array from the subnavigation/children
  * of a navigation object.
  *
  * @param Navigation $navigation The navigation object
  * @param String     $path       Current path segment
  * @return Array containing the children (+ grandchildren...)
  */
 protected static function getChildren(Navigation $navigation, $path)
 {
     $children = array();
     foreach ($navigation->getSubNavigation() as $subpath => $subnav) {
         if (!$subnav->isVisible()) {
             continue;
         }
         $item = array('title' => $subnav->getTitle(), 'url' => self::getURL($subnav->getURL()), 'active' => $subnav->isActive());
         if ($subnav->getSubNavigation()) {
             $item['children'] = self::getChildren($subnav, $path . '_' . $subpath);
         }
         $children[$path . '_' . $subpath] = $item;
     }
     return $children;
 }
コード例 #27
0
ファイル: index.php プロジェクト: benesch/peteramati
function choose_page($page)
{
    if ($page !== "" && $page[0] === "~") {
        $xpage = Navigation::path_component(0, true);
        Navigation::set_path("/" . $page . Navigation::path_suffix(1));
        $page = Navigation::set_page($xpage ?: "index");
    }
    $i = strlen($page) - 4;
    if ($i > 0 && substr($page, $i) === ".php") {
        $page = substr($page, 0, $i);
    }
    if ($page === "index") {
        return null;
    }
    if (is_readable($page . ".php") && strpos($page, "/") === false) {
        return $page . ".php";
    } else {
        if (preg_match(',\\A(?:images|scripts|stylesheets)\\z,', $page)) {
            $_REQUEST["file"] = $page . Navigation::path();
            return "cacheable.php";
        } else {
            Navigation::redirect_site("index");
        }
    }
}
コード例 #28
0
ファイル: overview.php プロジェクト: ratbird/hope
 function before_filter(&$action, &$args)
 {
     if (Request::option('auswahl')) {
         Request::set('cid', Request::option('auswahl'));
     }
     parent::before_filter($action, $args);
     checkObject();
     $this->institute = Institute::findCurrent();
     if (!$this->institute) {
         throw new CheckObjectException(_('Sie haben kein Objekt gewählt.'));
     }
     $this->institute_id = $this->institute->id;
     //set visitdate for institute, when coming from meine_seminare
     if (Request::option('auswahl')) {
         object_set_visit($this->institute_id, "inst");
     }
     //gibt es eine Anweisung zur Umleitung?
     if (Request::get('redirect_to')) {
         $query_parts = explode('&', stristr(urldecode($_SERVER['QUERY_STRING']), 'redirect_to'));
         list(, $where_to) = explode('=', array_shift($query_parts));
         $new_query = $where_to . '?' . join('&', $query_parts);
         page_close();
         $new_query = preg_replace('/[^:0-9a-z+_\\-.#?&=\\/]/i', '', $new_query);
         header('Location: ' . URLHelper::getURL($new_query, array('cid' => $this->institute_id)));
         die;
     }
     PageLayout::setHelpKeyword("Basis.Einrichtungen");
     PageLayout::setTitle($this->institute->getFullName() . " - " . _("Kurzinfo"));
     Navigation::activateItem('/course/main/info');
 }
コード例 #29
0
ファイル: my_studygroups.php プロジェクト: ratbird/hope
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     if (!$GLOBALS['perm']->have_perm("root")) {
         Navigation::activateItem('/browse/my_studygroups/index');
     }
 }
コード例 #30
0
 public function contextBackend()
 {
     $this->registerGatePermissions();
     $this->extendBladeTags();
     $navigation = \Navigation::getPages()->findById('system');
     $navigation->setFromArray([['id' => 'users', 'title' => 'users::core.title.list', 'url' => route('backend.user.list'), 'permissions' => 'user::list', 'priority' => 200, 'icon' => 'user'], ['id' => 'roles', 'title' => 'users::role.title.list', 'url' => route('backend.role.list'), 'permissions' => 'role::list', 'priority' => 300, 'icon' => 'group']]);
 }