/** * Displays the online list. **/ public function index_action() { $this->contact_count = Contact::countBySQL('owner_id=?', array(User::findCurrent()->id)); // Total number of contacts $this->users = $this->getOnlineUsers($this->settings['show_groups']); $this->showOnlyBuddies = $this->settings['show_only_buddys']; $this->showGroups = $this->settings['show_groups']; $this->limit = Config::getInstance()->ENTRIES_PER_PAGE; $max_page = ceil(count($this->users['users']) / $this->limit); $this->page = min(Request::int('page', 1), $max_page); // Setup sidebar $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/person-sidebar.png'); // Add buddy configuration option to sidebar only if the user actually // has buddies if ($this->contact_count > 0) { $actions = new OptionsWidget(); $actions->addCheckbox(_('Nur Kontakte in der Übersicht der aktiven Benutzer anzeigen'), $this->settings['show_only_buddys'], $this->url_for('online/config/show_buddies/' . get_ticket())); $actions->addCheckbox(_('Kontaktgruppen bei der Darstellung berücksichtigen'), $this->settings['show_groups'], $this->url_for('online/config/show_groups/' . get_ticket())); $sidebar->addWidget($actions); } }
/** * Displays the global ranking list. * * @param int $page Page of the ranking list to be displayed. */ public function index_action($page = 1) { $vis_query = get_vis_query('b'); // Calculate offsets $max_per_page = get_config('ENTRIES_PER_PAGE'); if ($page < 1) { $page = 1; } $offset = max(0, ($page - 1) * $max_per_page); // Liste aller die mutig (oder eitel?) genug sind $query = "SELECT SQL_CALC_FOUND_ROWS a.user_id,username,score,geschlecht, {$GLOBALS['_fullname_sql']['full']} AS fullname\n FROM user_info AS a\n LEFT JOIN auth_user_md5 AS b USING (user_id)\n WHERE score > 0 AND locked = 0 AND {$vis_query}\n ORDER BY score DESC\n LIMIT " . (int) $offset . "," . (int) $max_per_page; $result = DBManager::get()->fetchAll($query); $count = DBManager::get()->fetchColumn("SELECT FOUND_ROWS()"); $persons = array(); foreach ($result as $row) { $row['is_king'] = StudipKing::is_king($row['user_id'], true); $persons[$row['user_id']] = $row; } $persons = Score::getScoreContent($persons); $this->persons = array_values($persons); $this->numberOfPersons = $count; $this->page = $page; $this->offset = $offset; $this->max_per_page = $max_per_page; $this->current_user = User::findCurrent(); $this->current_user_score = Score::getMyScore($this->current_user); // Set up sidebar and helpbar $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/medal-sidebar.png'); $actions = new OptionsWidget(); $actions->addCheckbox(_('Ihren Wert veröffentlichen'), $this->current_user->score, $this->url_for('score/publish'), $this->url_for('score/unpublish')); $sidebar->addWidget($actions); $helpbar = Helpbar::get(); }
break; case 'edit_request': PageLayout::setTitle(_('Bearbeiten der Anfragen')); Navigation::activateItem('/resources/room_requests/edit'); $widget = new ActionsWidget(); $widget->addLink(_('Ressourcen suchen'), URLHelper::getLink('resources.php?view=search&quick_view_mode=no_nav'), Icon::create('search', 'clickable'), array('onclick' => "windows.open(this.href, '', 'scrollbars=yes,left=10,top=10,width=1000,height=680,resizable=yes');return false;")); $widget->addLink(_('Nachrichten zu zugewiesenen Anfragen versenden'), URLHelper::getLink('?snd_closed_request_sms=TRUE'), Icon::create('mail', 'clickable')); $sidebar->addWidget($widget); $widget = new OptionsWidget(); $widget->addCheckbox(_('Bearbeitete Anfragen anzeigen'), $_SESSION['resources_data']['skip_closed_requests'], URLHelper::getLink('?skip_closed_requests=TRUE'), URLHelper::getLink('?skip_closed_requests=FALSE')); break; case 'list_requests': $helpbar->setVariables(array( 'link' => URLHelper::getLink('resources.php?view=requests_start&cancel_edit_request_x=1'), )); PageLayout::setTitle(_('Anfragenliste')); Navigation::activateItem('/resources/room_requests/list'); break; //all the intros in an open object (Veranstaltung, Einrichtung) case 'openobject_main': $identifier = $perm->have_studip_perm('autor', $SessSemName[1]) ? 'resources/openobject_main_priviledged' : 'resources/openobject_main';
/** * Adds view filter to the sidebar * @param array $configs */ private function setViewWidget($configs = array()) { $configs = $configs ?: array(); $checkbox_widget = new OptionsWidget(); $checkbox_widget->setTitle(_('Darstellungs-Filter')); foreach ($this->getViewFilters() as $index => $label) { $state = in_array($index, $configs); $checkbox_widget->addCheckbox($label, $state, $this->url_for('admin/courses/set_view_filter/' . $index . '/' . $state)); } Sidebar::get()->addWidget($checkbox_widget, 'views'); }
/** * Creates the sidebar. */ private function setupSidebar() { $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/plugin-sidebar.png'); $sidebar->setTitle(PageLayout::getTitle()); $plusconfig = UserConfig::get($GLOBALS['user']->id)->PLUS_SETTINGS; if (!isset($_SESSION['profile_plus'])) { if (is_array($plusconfig['profile_plus'])) { $_SESSION['profile_plus'] = $plusconfig['profile_plus']; } else { //$_SESSION['profile_plus']['Kategorie']['Lehrorganisation'] = 1; $_SESSION['profile_plus']['Kategorie']['Kommunikation und Zusammenarbeit'] = 1; //$_SESSION['profile_plus']['Kategorie']['Aufgaben'] = 1; $_SESSION['profile_plus']['Kategorie']['Sonstiges'] = 1; //$_SESSION['profile_plus']['Kategorie']['Projekte und Entwicklung'] = 1; /*$_SESSION['profile_plus']['Komplex'][1] = 1; $_SESSION['profile_plus']['Komplex'][2] = 1; $_SESSION['profile_plus']['Komplex'][3] = 1;*/ $_SESSION['profile_plus']['View'] = 'openall'; $_SESSION['profile_plus']['displaystyle'] = 'category'; } } /*if (Request::Get('Komplex1') != null) $_SESSION['profile_plus']['Komplex'][1] = Request::Get('Komplex1'); if (Request::Get('Komplex2') != null) $_SESSION['profile_plus']['Komplex'][2] = Request::Get('Komplex2'); if (Request::Get('Komplex3') != null) $_SESSION['profile_plus']['Komplex'][3] = Request::Get('Komplex3');*/ if (Request::Get('mode') != null) { $_SESSION['profile_plus']['View'] = Request::Get('mode'); } if (Request::Get('displaystyle') != null) { $_SESSION['profile_plus']['displaystyle'] = Request::Get('displaystyle'); } $widget = new OptionsWidget(); $widget->setTitle(_('Kategorien')); foreach ($_SESSION['profile_plus']['Kategorie'] as $key => $val) { if ($key == 'Sonstiges') { continue; } if (Request::Get(md5('cat_' . $key)) != null) { $_SESSION['profile_plus']['Kategorie'][$key] = Request::Get(md5('cat_' . $key)); } $widget->addCheckbox($key, $_SESSION['profile_plus']['Kategorie'][$key], URLHelper::getLink('?', array(md5('cat_' . $key) => 1)), URLHelper::getLink('?', array(md5('cat_' . $key) => 0))); } if (Request::Get(md5('cat_Sonstiges')) != null) { $_SESSION['profile_plus']['Kategorie']['Sonstiges'] = Request::Get(md5('cat_Sonstiges')); } $widget->addCheckbox(_('Sonstiges'), $_SESSION['profile_plus']['Kategorie']['Sonstiges'], URLHelper::getLink('?', array(md5('cat_Sonstiges') => 1)), URLHelper::getLink('?', array(md5('cat_Sonstiges') => 0))); $sidebar->addWidget($widget, "Kategorien"); /*$widget = new OptionsWidget(); $widget->setTitle(_('Komplexität')); $widget->addCheckbox(_('Standard'), $_SESSION['profile_plus']['Komplex'][1], URLHelper::getLink('?', array('Komplex1' => 1)), URLHelper::getLink('?', array('Komplex1' => 0))); $widget->addCheckbox(_('Erweitert'), $_SESSION['profile_plus']['Komplex'][2], URLHelper::getLink('?', array('Komplex2' => 1)), URLHelper::getLink('?', array('Komplex2' => 0))); $widget->addCheckbox(_('Intensiv'), $_SESSION['profile_plus']['Komplex'][3], URLHelper::getLink('?', array('Komplex3' => 1)), URLHelper::getLink('?', array('Komplex3' => 0))); $sidebar->addWidget($widget, "Komplex");*/ $widget = new ActionsWidget(); $widget->setTitle(_("Ansichten")); if ($_SESSION['profile_plus']['View'] == 'openall') { $widget->addLink(_("Alles zuklappen"), URLHelper::getLink('?', array('mode' => 'closeall')), Icon::create('assessment', 'clickable')); } else { $widget->addLink(_("Alles aufklappen"), URLHelper::getLink('?', array('mode' => 'openall')), Icon::create('assessment', 'clickable')); } if ($_SESSION['profile_plus']['displaystyle'] == 'category') { $widget->addLink(_("Alphabetische Anzeige ohne Kategorien"), URLHelper::getLink('?', array('displaystyle' => 'alphabetical')), Icon::create('assessment', 'clickable')); } else { $widget->addLink(_("Anzeige nach Kategorien"), URLHelper::getLink('?', array('displaystyle' => 'category')), Icon::create('assessment', 'clickable')); } $widget->addLink(_('Alle Inhaltselemente aktivieren'), $this->url_for('profilemodules/reset/true'), Icon::create('accept', 'clickable')); $widget->addLink(_('Alle Inhaltselemente deaktivieren'), $this->url_for('profilemodules/reset'), Icon::create('decline', 'clickable')); $sidebar->addWidget($widget); $plusconfig['profile_plus'] = $_SESSION['profile_plus']; UserConfig::get($GLOBALS['user']->id)->store(PLUS_SETTINGS, $plusconfig); }
list($self_assign_all, $self_assign_exclusive) = CheckSelfAssignAll($range_id); $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/group-sidebar.png'); // get statusgroups, to check if there are any $statusgruppen = GetAllStatusgruppen($range_id); // do we have some roles already? if ($statusgruppen && sizeof($statusgruppen) > 0) { $actions = new OptionsWidget(); $actions->setTitle(_('Aktionen')); $actions->addCheckbox(_('Selbsteintragung in allen Gruppen aktiviert?'), $self_assign_all, URLHelper::getLink('?cmd=activateSelfAssignAll'), URLHelper::getLink('?cmd=deactivateSelfAssignAll')); $actions->addCheckbox(_('Selbsteintragung in nur einer Gruppe aktiviert?'), $self_assign_exclusive, URLHelper::getLink('?cmd=activateSelfAssignExclusive'), URLHelper::getLink('?cmd=deactivateSelfAssignExclusive')); $sidebar->addWidget($actions); // open the template for tree-view of roles $template = $GLOBALS['template_factory']->open('statusgruppen/sem_content'); $template->set_layout('layouts/base.php'); $template->set_attribute('range_id', $range_id);
?> </table> <? $sem_browse_obj->do_output() ?> <? $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/seminar-sidebar.png'); // add search options to sidebar $widget = new OptionsWidget(); $widget->setTitle(_('Suchoptionen')); $widget->addCheckbox(_('Erweiterte Suche anzeigen'), $_SESSION['sem_browse_data']['cmd'] == "xts", URLHelper::getLink('?cmd=xts&level=f'), URLHelper::getLink('?cmd=qs&level=f')); $sidebar->addWidget($widget); if ($sem_browse_obj->show_result && count($_SESSION['sem_browse_data']['search_result'])){ $actions = new ActionsWidget(); $actions->addLink(_("Download des Ergebnisses"), URLHelper::getURL("dispatch.php/search/courses/export_results"), Icon::create('file-office', 'clickable')); $sidebar->addWidget($actions); $group_by_links = ""; $grouping = new OptionsWidget(); $grouping->setTitle(_("Suchergebnis gruppieren:")); foreach ($sem_browse_obj->group_by_fields as $i => $field){ $grouping->addRadioButton( $field['name'],