/** * Before filter, set up the page by initializing the session and checking * all conditions. * * @param String $action Name of the action to be invoked * @param Array $args Arguments to be passed to the action method */ public function before_filter(&$action, &$args) { $this->priviledged = $GLOBALS['perm']->have_studip_perm('tutor', $GLOBALS['SessSemName'][1]); if (Request::isXhr()) { $this->set_content_type('text/html;charset=Windows-1252'); } else { $this->set_layout($GLOBALS['template_factory']->open('layouts/base')); } if (!in_array($action, words('index create edit move delete'))) { array_unshift($args, $action); $action = 'index'; } if (in_array($action, words('create edit move delete')) && !$this->priviledged) { throw new AccessDeniedException(_('Sie sind nicht berechtigt, auf diesen Bereich zuzugreifen')); } if ($GLOBALS['perm']->have_studip_perm('tutor', $GLOBALS['SessSemName'][1])) { $widget = new ActionsWidget(); $widget->addLink(_('Neuen Eintrag anlegen'), $this->url_for('show/create'), 'icons/16/blue/add.png')->asDialog(); Sidebar::get()->addWidget($widget); } PageLayout::setHelpKeyword('Basis.Informationsseite'); /** checkObject(); // do we have an open object? checkObjectModule('scm'); object_set_visit_module('scm'); **/ }
protected function createSidebar($active = 'week', $calendar = null) { parent::createSidebar($active, $calendar); $sidebar = Sidebar::Get(); $actions = new ActionsWidget(); $actions->addLink(_('Termin anlegen'), $this->url_for('calendar/group/edit'), Icon::create('add', 'clickable'), array('data-dialog' => 'size=auto')); $actions->addLink(_('Kalender freigeben'), $this->url_for('calendar/single/manage_access/' . $GLOBALS['user']->id, array('group_filter' => $this->range_id)), Icon::create('community', 'clickable'), array('id' => 'calendar-open-manageaccess', 'data-dialog' => '', 'data-dialogname' => 'manageaccess')); $sidebar->addWidget($actions); }
/** * show institute overview page * * @return void */ function index_action() { $this->sidebar = Sidebar::get(); $this->sidebar->setImage('sidebar/institute-sidebar.png'); if (get_config('NEWS_RSS_EXPORT_ENABLE') && $this->institute_id) { $rss_id = StudipNews::GetRssIdFromRangeId($this->institute_id); if ($rss_id) { PageLayout::addHeadElement('link', array('rel' => 'alternate', 'type' => 'application/rss+xml', 'title' => 'RSS', 'href' => 'rss.php?id=' . $rss_id)); } } URLHelper::bindLinkParam("inst_data", $this->institut_main_data); // (un)subscribe to institute if (Config::get()->ALLOW_SELFASSIGN_INSTITUTE && $GLOBALS['user']->id !== 'nobody' && !$GLOBALS['perm']->have_perm('admin')) { $widget = new ActionsWidget(); if (!$GLOBALS['perm']->have_studip_perm('user', $this->institute_id)) { $url = URLHelper::getLink('dispatch.php/institute/overview', array('follow_inst' => 'on')); $widget->addLink(_('Einrichtung abonnieren'), $url); } elseif (!$GLOBALS['perm']->have_studip_perm('autor', $this->institute_id)) { $url = URLHelper::getLink('dispatch.php/institute/overview', array('follow_inst' => 'off')); $widget->addLink(_('Austragen aus der Einrichtung'), $url); } $this->sidebar->addWidget($widget); if (!$GLOBALS['perm']->have_studip_perm('user', $this->institute_id) and Request::option('follow_inst') == 'on') { $query = "INSERT IGNORE INTO user_inst\n (user_id, Institut_id, inst_perms)\n VALUES (?, ?, 'user')"; $statement = DBManager::get()->prepare($query); $statement->execute(array($GLOBALS['user']->user_id, $this->institute_id)); if ($statement->rowCount() > 0) { log_event('INST_USER_ADD', $this->institute_id, $GLOBALS['user']->user_id, 'user'); PageLayout::postMessage(MessageBox::success(_("Sie haben die Einrichtung abonniert."))); header('Location: ' . URLHelper::getURL('', array('cid' => $this->institute_id))); die; } } elseif (!$GLOBALS['perm']->have_studip_perm('autor', $this->institute_id) and Request::option('follow_inst') == 'off') { $query = "DELETE FROM user_inst\n WHERE user_id = ? AND Institut_id = ?"; $statement = DBManager::get()->prepare($query); $statement->execute(array($GLOBALS['user']->user_id, $this->institute_id)); if ($statement->rowCount() > 0) { log_event('INST_USER_DEL', $this->institute_id, $GLOBALS['user']->user_id, 'user'); PageLayout::postMessage(MessageBox::success(_("Sie haben sich aus der Einrichtung ausgetragen."))); header('Location: ' . URLHelper::getURL('', array('cid' => $this->institute_id))); die; } } } // Fetch news $response = $this->relay('news/display/' . $this->institute_id); $this->news = $response->body; // Fetch votes if (get_config('VOTE_ENABLE')) { $response = $this->relay('questionnaire/widget/' . $this->institute_id . '/institute'); $this->questionnaires = $response->body; } // Fetch dates $response = $this->relay("calendar/contentbox/display/{$this->institute_id}/1210000"); $this->dates = $response->body; }
public function set_sidebar() { $sidebar = Sidebar::Get(); $sidebar->setImage('sidebar/studygroup-sidebar.png'); $sidebar->setTitle(_('Meine Studiengruppen')); if (count($this->studygroups) > 0) { $setting_widget = new ActionsWidget(); $setting_widget->setTitle(_("Aktionen")); $setting_widget->addLink(_('Farbgruppierung ändern'), URLHelper::getLink('dispatch.php/my_courses/groups/all/true'), Icon::create('group4', 'clickable'), array('data-dialog' => 'buttons=true')); $sidebar->addWidget($setting_widget); } }
public static function getJSONPropertiesStructure() { if (!isset(self::$_JSONPropertiesStructure)) { self::$_JSONPropertiesStructure = array_merge(parent::getJSONPropertiesStructure(), array('label' => 'Actions')); } return self::$_JSONPropertiesStructure; }
public function before_filter(&$action, &$args) { $this->set_layout($GLOBALS['template_factory']->open('layouts/base')); $this->course = Course::findCurrent(); if (!$this->course) { throw new CheckObjectException(_('Sie haben kein Objekt gewählt.')); } else { $this->sem_id = $this->course->getID(); $this->seminar = new Seminar($this->sem_id); } //if ($GLOBALS['perm']->have_studip_perm('tutor', $GLOBALS['SessSemName'][1])) { $widget = new ActionsWidget(); $widget->addLink(_('Kursverwaltung'), $this->url_for('show/course'), false); $widget->addLink(_('Teilnehmerverwaltung'), $this->url_for('show'), false); Sidebar::get()->addWidget($widget); //} Navigation::activateItem('/admin/kursadmin'); }
/** * **/ public function before_filter(&$action, &$args) { parent::before_filter($action, $args); require_once 'lib/bootstrap-api.php'; $GLOBALS['perm']->check('root'); Navigation::activateItem('/admin/config/api'); PageLayout::setTitle(_('API Verwaltung')); $this->types = array('website' => _('Website'), 'desktop' => _('Herkömmliches Desktopprogramm'), 'mobile' => _('Mobile App')); // Sidebar $views = new ViewsWidget(); $views->addLink(_('Registrierte Applikationen'), $this->url_for('admin/api'))->setActive($action === 'index'); $views->addLink(_('Globale Zugriffseinstellungen'), $this->url_for('admin/api/permissions'))->setActive($action == 'permissions'); $views->addLink(_('Konfiguration'), $this->url_for('admin/api/config'))->setActive($action == 'config'); Sidebar::get()->addWidget($views); $actions = new ActionsWidget(); $actions->addLink(_('Neue Applikation registrieren'), $this->url_for('admin/api/edit'), Icon::create('add', 'clickable'))->asDialog(); Sidebar::get()->addWidget($actions); }
protected function createSidebar($active = null, $calendar = null) { parent::createSidebar($active, $calendar); $sidebar = Sidebar::Get(); if ($calendar->havePermission(Calendar::PERMISSION_WRITABLE)) { $actions = new ActionsWidget(); $actions->addLink(_('Termin anlegen'), $this->url_for('calendar/single/edit'), Icon::create('add', 'clickable'), array('data-dialog' => 'size=auto')); if ($calendar->havePermission(Calendar::PERMISSION_OWN) && get_config('CALENDAR_GROUP_ENABLE')) { $actions->addLink(_('Kalender freigeben'), $this->url_for('calendar/single/manage_access'), Icon::create('community', 'clickable'), array('id' => 'calendar-open-manageaccess', 'data-dialog' => '', 'data-dialogname' => 'manageaccess')); } $sidebar->addWidget($actions); } if ($calendar->havePermission(Calendar::PERMISSION_OWN)) { $export = new ExportWidget(); $export->addLink(_('Termine exportieren'), $this->url_for('calendar/single/export_calendar'), Icon::create('download', 'clickable'), array('data-dialog' => 'size=auto'))->setActive($active == 'export_calendar'); $export->addLink(_('Termine importieren'), $this->url_for('calendar/single/import'), Icon::create('upload', 'clickable'), array('data-dialog' => 'size=auto'))->setActive($active == 'import'); $export->addLink(_('Kalender teilen'), $this->url_for('calendar/single/share'), Icon::create('group2', 'clickable'), array('data-dialog' => 'size=auto'))->setActive($active == 'share'); $sidebar->addWidget($export); } }
/** * Entry point of the controller that displays the start page of Stud.IP * * @param string $action * @param string $widgetId * * @return void */ function index_action($action = false, $widgetId = null) { $this->left = WidgetHelper::getUserWidgets($GLOBALS['user']->id, 0); $this->right = WidgetHelper::getUserWidgets($GLOBALS['user']->id, 1); if (!(count($this->left) + count($this->right))) { WidgetHelper::setInitialPositions(); $this->left = WidgetHelper::getUserWidgets($GLOBALS['user']->id, 0); $this->right = WidgetHelper::getUserWidgets($GLOBALS['user']->id, 1); } WidgetHelper::setActiveWidget(Request::get('activeWidget')); $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/home-sidebar.png'); $sidebar->setTitle(_("Meine Startseite")); $nav = new NavigationWidget(); $nav->setTitle(_('Sprungmarken')); foreach (array_merge($this->left, $this->right) as $widget) { $nav->addLink($widget->getPluginName(), $this->url_for('start#widget-' . $widget->widget_id)); } $sidebar->addWidget($nav); // Show action to add widget only if not all widgets have already been added. $actions = new ActionsWidget(); if (WidgetHelper::getAvailableWidgets($GLOBALS['user']->id)) { $actions->addLink(_('Neues Widget hinzufügen'), $this->url_for('start/add'), Icon::create('add', 'clickable'))->asDialog(); } $actions->addLink(_('Standard wiederherstellen'), $this->url_for('start/reset'), Icon::create('accept', 'clickable')); $sidebar->addWidget($actions); // Root may set initial positions if ($GLOBALS['perm']->have_perm('root')) { $settings = new ActionsWidget(); $settings->setTitle(_('Einstellungen')); $settings->addElement(new WidgetElement(_('Standard-Startseite bearbeiten:'))); foreach ($GLOBALS['perm']->permissions as $permission => $useless) { $settings->addElement(new LinkElement(ucfirst($permission), $this->url_for('start/edit_defaults/' . $permission), Icon::create('link-intern', 'clickable'), array('data-dialog' => ''))); } $sidebar->addWidget($settings); } if ($GLOBALS['perm']->get_perm() == 'user') { PageLayout::postMessage(MessageBox::info(_('Sie haben noch nicht auf Ihre Bestätigungsmail geantwortet.'), array(_('Bitte holen Sie dies nach, um Stud.IP Funktionen wie das Belegen von Veranstaltungen nutzen zu können.'), sprintf(_('Bei Problemen wenden Sie sich an: %s'), '<a href="mailto:' . $GLOBALS['UNI_CONTACT'] . '">' . $GLOBALS['UNI_CONTACT'] . '</a>')))); PageLayout::postMessage(MessageBox::info(sprintf(_('Haben Sie die Bestätigungsmail an Ihre Adresse "%s" nicht erhalten?'), htmlReady($GLOBALS['user']->Email)), array(Studip\LinkButton::create(_('Bestätigungsmail erneut verschicken'), $this->url_for('start/resend_validation_mail')) . ' ' . Studip\LinkButton::create(_('Email-Adresse ändern'), $this->url_for('start/edit_mail_address'), array('data-dialog' => "size=auto", 'title' => _('Email-Adresse')))))); } }
function show_action() { $this->url_params = array(); if (Request::get('from')) { $this->url_params['from'] = Request::get('from'); } if (Request::get('open_node')) { $this->url_params['open_node'] = Request::get('open_node'); } if (!Request::isXhr()) { Navigation::activateItem('course/admin/study_areas'); $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/admin-sidebar.png'); if ($this->course) { $links = new ActionsWidget(); foreach (Navigation::getItem('/course/admin/main') as $nav) { if ($nav->isVisible(true)) { $image = $nav->getImage(); $links->addLink($nav->getTitle(), URLHelper::getLink($nav->getURL(), array('studip_ticket' => Seminar_Session::get_ticket())), $image); } } $sidebar->addWidget($links); // Entry list for admin upwards. if ($GLOBALS['perm']->have_studip_perm("admin", $GLOBALS['SessionSeminar'])) { $list = new SelectorWidget(); $list->setUrl("?#admin_top_links"); $list->setSelectParameterName("cid"); foreach (AdminCourseFilter::get()->getCoursesForAdminWidget() as $seminar) { $list->addElement(new SelectElement($seminar['Seminar_id'], $seminar['Name']), 'select-' . $seminar['Seminar_id']); } $list->setSelection($this->course->id); $sidebar->addWidget($list); } } } if (Request::get('open_node')) { $this->values['StudyAreasWizardStep']['open_node'] = Request::get('open_node'); } $this->tree = $this->step->getStepTemplate($this->values, 0, 0); }
/** * Before filter, set up the page by initializing the session and checking * all conditions. * * @param String $action Name of the action to be invoked * @param Array $args Arguments to be passed to the action method */ public function before_filter(&$action, &$args) { parent::before_filter($action, $args); // open session page_open(array('sess' => 'Seminar_Session', 'auth' => 'Seminar_Default_Auth', 'perm' => 'Seminar_Perm', 'user' => 'Seminar_User')); // set up user session include 'lib/seminar_open.php'; if (!Config::Get()->SCM_ENABLE) { throw new AccessDeniedException(_('Die freien Informationsseiten sind nicht aktiviert.')); } $GLOBALS['auth']->login_if(Request::get('again') && $GLOBALS['auth']->auth['uid'] == 'nobody'); $this->priviledged = $GLOBALS['perm']->have_studip_perm('tutor', $GLOBALS['SessSemName'][1]); if (Request::isXhr()) { $this->set_content_type('text/html;charset=Windows-1252'); } else { $this->set_layout($GLOBALS['template_factory']->open('layouts/base')); } if (!in_array($action, words('index create edit move delete'))) { array_unshift($args, $action); $action = 'index'; } if (in_array($action, words('create edit move delete')) && !$this->priviledged) { throw new AccessDeniedException(); } if ($GLOBALS['perm']->have_studip_perm('tutor', $GLOBALS['SessSemName'][1])) { $widget = new ActionsWidget(); $widget->addLink(_('Neuen Eintrag anlegen'), URLHelper::getLink('dispatch.php/course/scm/create'), Icon::create('add', 'clickable'))->asDialog(); Sidebar::get()->addWidget($widget); } PageLayout::setHelpKeyword('Basis.Informationsseite'); Navigation::activateItem('/course/scm'); checkObject(); // do we have an open object? checkObjectModule('scm'); object_set_visit_module('scm'); // Set sidebar image $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/info-sidebar.png'); }
/** * Displays the deputy information of a user. */ public function index_action() { if (Request::submitted('add_deputy') && ($deputy_id = Request::option('deputy_id'))) { $this->check_ticket(); if (isDeputy($deputy_id, $this->user->user_id)) { $this->reportError(_('%s ist bereits als Vertretung eingetragen.'), get_fullname($deputy_id, 'full')); } else { if ($deputy_id == $this->user->user_id) { $this->reportError(_('Sie können sich nicht als Ihre eigene Vertretung eintragen!')); } else { if (addDeputy($deputy_id, $this->user->user_id)) { $this->reportSuccess(_('%s wurde als Vertretung eingetragen.'), get_fullname($deputy_id, 'full')); } else { $this->reportError(_('Fehler beim Eintragen der Vertretung!')); } } } $this->redirect('settings/deputies'); return; } $deputies = getDeputies($this->user->user_id, true); $exclude_users = array($this->user->user_id); if (is_array($deputies)) { $exclude_users = array_merge($exclude_users, array_map(function ($d) { return $d['user_id']; }, $deputies)); } $this->deputies = $deputies; $this->search = new PermissionSearch('user', _('Vor-, Nach- oder Benutzername'), 'user_id', array('permission' => getValidDeputyPerms(), 'exclude_user' => $exclude_users)); $sidebar = Sidebar::Get(); $sidebar->setTitle(PageLayout::getTitle()); $actions = new ActionsWidget(); // add "add dozent" to infobox $mp = MultiPersonSearch::get('settings_add_deputy')->setLinkText(_('Neue Standardvertretung festlegen'))->setDefaultSelectedUser(array_keys($this->deputies))->setLinkIconPath('')->setTitle(_('Neue Standardvertretung festlegen'))->setExecuteURL(URLHelper::getLink('dispatch.php/settings/deputies/add_member'))->setSearchObject($this->search)->setNavigationItem('/links/settings/deputies')->render(); $element = LinkElement::fromHTML($mp, Icon::create('community+add', 'clickable')); $actions->addElement($element); Sidebar::Get()->addWidget($actions); }
/** * Display the categories of a user. * * @param mixed $verify_action Optional name of an action to be verified * @param mixed $verify_id Optional id that belongs to the action to * be verified */ public function index_action($verify_action = null, $verify_id = null) { $categories = Kategorie::findByUserId($this->user->user_id); $visibilities = array(); $hidden_count = 0; foreach ($categories as $index => $category) { $visibilities[$category->kategorie_id] = Visibility::getStateDescription('kat_' . $category->kategorie_id, $this->user->user_id); if ($this->restricted && $GLOBALS['perm']->have_perm('admin') && $visibilities[$category->kategorie_id] == VISIBILITY_ME) { $hidden_count += 1; unset($categories[$index]); } } $this->categories = array_values($categories); $this->count = count($categories); $this->hidden_count = $hidden_count; $this->visibilities = $visibilities; $this->verify = $verify_action ? array('action' => $verify_action, 'id' => $verify_id) : false; $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/category-sidebar.png'); $actions = new ActionsWidget(); $actions->addLink(_('Neue Kategorie anlegen'), $this->url_for('settings/categories/create'), Icon::create('add', 'clickable')); $sidebar->addWidget($actions); }
/** * Basic display of the groups */ public function index_action() { $lockrule = LockRules::getObjectRule($_SESSION['SessionSeminar']); $this->is_locked = LockRules::Check($_SESSION['SessionSeminar'], 'groups'); if ($lockrule->description && $this->is_locked) { PageLayout::postMessage(MessageBox::info(formatLinks($lockrule->description))); } // Setup sidebar. $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/group-sidebar.png'); if ($this->tutor) { $widget = new ActionsWidget(); $widget->addLink(_('Neue Gruppe anlegen'), $this->url_for('admin/statusgroups/editGroup'), Icon::create('group3+add', 'clickable'))->asDialog('size=auto'); $widget->addLink(_('Gruppenreihenfolge ändern'), $this->url_for('admin/statusgroups/sortGroups'), Icon::create('arr_2down', 'clickable'))->asDialog(); $sidebar->addWidget($widget); } // Collect all groups $this->loadGroups(); $this->membersOfInstitute = Institute::find($_SESSION['SessionSeminar'])->members->orderBy('nachname')->pluck('user_id'); // Create multiperson search type $query = "SELECT auth_user_md5.user_id, CONCAT({$GLOBALS['_fullname_sql']['full']}, ' (', auth_user_md5.username, ')') as fullname\n FROM auth_user_md5\n LEFT JOIN user_info ON (user_info.user_id = auth_user_md5.user_id)\n WHERE (CONCAT(auth_user_md5.Vorname, ' ', auth_user_md5.Nachname) LIKE :input\n OR auth_user_md5.username LIKE :input)\n AND auth_user_md5.perms IN ('autor', 'tutor', 'dozent')\n AND auth_user_md5.visible <> 'never'\n ORDER BY Vorname, Nachname"; $this->searchType = new SQLSearch($query, _('Teilnehmer suchen'), 'username'); }
</tr> <? endif; ?> <tr> <td> </td> <td colspan="2" align="center"> <br> <?php echo Button::create(_('Übernehmen')); ?> <? if ($resObject->isUnchanged()) : ?> <?php echo LinkButton::createCancel(_('Abbrechen'), URLHelper::getLink('?cancel_edit=' . $resObject->id)); ?> <? endif; ?> <br> </td> </tr> </tbody> </table> </form> <br><br> <? $sidebar = Sidebar::Get(); $sidebar->setTitle(htmlReady($resObject->getName())); $action = new ActionsWidget(); $action->addLink(_('Ressourcensuche'), URLHelper::getLink('resources.php?view=search&quick_view_mode=' . $view_mode)); $sidebar->addWidget($action); ?>
echo sprintf(_("%s öffentlich sichtbare Listen, insgesamt %s Einträge"), $list_count['visible'], $list_count['visible_entries']) . '<br>'; ?> <?php echo Icon::create('visibility-invisible', 'info')->asImg(); ?> <?php echo sprintf(_("%s unsichtbare Listen, insgesamt %s Einträge"), $list_count['invisible'], $list_count['invisible_entries']) . '<br>'; ?> <br> <? endif ?> <? $treeview->showTree(); ?> <?php $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/literature-sidebar.png'); $widget = new ActionsWidget(); $widget->addLink(_('Literatur importieren'), URLHelper::getLink('dispatch.php/literature/import_list?return_range=' . $_range_id), Icon::create('literature+add', 'clickable'), array('data-dialog' => '')); $widget->addLink(_('Neue Literatur anlegen'), URLHelper::getLink('dispatch.php/literature/edit_element?_range_id=new_entry&return_range=' . $_range_id), Icon::create('literature+add', 'clickable'), array('data-dialog' => '')); $sidebar->addWidget($widget); ob_start(); echo $clip_form->getFormStart(URLHelper::getLink($treeview->getSelf())); echo $clip_form->getFormField("clip_content", array_merge(array('size' => $clipboard->getNumElements()), (array) $attributes['lit_select'])); echo $clip_form->getFormField("clip_cmd", $attributes['lit_select']); ?> <div align="center"> <?php echo $clip_form->getFormButton("clip_ok", array('style' => 'vertical-align:middle;margin:3px;')); ?> </div> <?php echo $clip_form->getFormEnd();
</td> <td><input type="text" name="test_ip" size="50" required value="<?php echo htmlReady(Request::get("test_ip")); ?> "></td> </tr> <tr> <td style="text-align:center" colspan="2"> <?php echo Button::createAccept(_('Abschicken'), 'ok', array('title' => _('Test starten'))); ?> <?php echo LinkButton::createCancel(_('Abbrechen'), $controller->url_for('admin/webservice_access'), array('title' => _('Test abbrechen'))); ?> </a> </td> </tr> </table> </form> <? $sidebar = Sidebar::Get(); $sidebar->setImage('sidebar/admin-sidebar.png'); $sidebar->setTitle(_('Webservices')); $actions = new ActionsWidget(); $actions->addLink(_('Liste der Zugriffsregeln'),$controller->url_for('admin/webservice_access'), Icon::create('add', 'clickable')); $actions->addLink(_('Neue Zugriffsregel anlegen'),$controller->url_for('admin/webservice_access/new'), Icon::create('add', 'clickable')); $sidebar->addWidget($actions);
<? endif ?> </div> </div> </li> <? endforeach ?> </ul> <div style="text-align: center;"> <? if ($material['host_id'] || $material['user_id'] !== $GLOBALS['user']->id) : ?> <?php echo \Studip\LinkButton::create(_("Review schreiben"), PluginEngine::getLink($plugin, array(), 'market/review/' . $material->getId()), array('data-dialog' => 1)); ?> <? endif ?> </div> </div> <? Sidebar::Get()->setImage($plugin->getPluginURL()."/assets/sidebar-service.png"); if ($GLOBALS['perm']->have_perm("autor")) { $actions = new ActionsWidget(); $actions->addLink( _("Eigenes Lernmaterial hochladen"), PluginEngine::getURL($plugin, array(), "mymaterial/edit"), Icon::create("add", "clickable"), array('data-dialog' => "1") ); Sidebar::Get()->addWidget($actions); }
$widget->addLink(_('Erweitert'), URLHelper::getURL('?extend=yes'))->setActive($extend == 'yes'); $sidebar->addWidget($widget); if ($admin_view) { if (!LockRules::Check($inst_id, 'participants')) { $edit = new SidebarWidget(); $edit->setTitle(_('Personenverwaltung')); $edit->addElement(new WidgetElement($mp)); $sidebar->addWidget($edit); } if (!empty($mail_list)) { $actions = new ActionsWidget(); $actions->addLink(_('Stud.IP Rundmail'), $controller->url_for('messages/write', array('inst_id' => $inst_id, 'emailrequest' => 1)), Icon::create('mail', 'clickable'), array('data-dialog' => 'size=50%')); $sidebar->addWidget($actions); } } $widget = new OptionsWidget(); $widget->setTitle(_('Gruppierung')); // Admins can choose between different grouping functions if ($GLOBALS['perm']->have_perm("admin")) { $widget->addRadioButton(_('Funktion'), URLHelper::getLink('?show=funktion'), $show == 'funktion'); $widget->addRadioButton(_('Status'), URLHelper::getLink('?show=status'),
/** * Get contents of the info box for this action. */ function set_sidebar() { $sidebar = Sidebar::Get(); $sidebar->setImage('sidebar/admin-sidebar.png'); $actions = new ActionsWidget(); $actions->addLink(_('Neue Nutzerdomäne anlegen'), $this->url_for('admin/domain/new'), Icon::create('add', 'clickable')); $sidebar->addWidget($actions); }
echo Studip\Button::createAccept(_('Übernehmen'), 'i_edit'); ?> <?php echo Studip\LinkButton::create(_('Löschen'), $controller->url_for('institute/basicdata/index/' . $i_view, array('i_trykill' => 1)), !$may_delete ? array('disabled' => '') : array()); ?> <? if (!$may_delete && strlen($reason_txt) > 0): ?> <?php echo tooltipIcon($reason_txt, true); ?> <? endif; ?> <? else: ?> <?php echo Studip\Button::create(_('Anlegen'), 'create'); ?> <? endif; ?> <input type="hidden" name="i_view" value="<?php echo $i_view; ?> "> </footer> </form> <?php $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/institute-sidebar.png'); $widget = new ActionsWidget(); $widget->addLink(_('Infobild ändern'), URLHelper::getLink('dispatch.php/institute/avatar/update/' . $institute->id), Icon::create('edit', 'clickable')); if (InstituteAvatar::getAvatar($institute->id)->is_customized()) { $widget->addLink(_('Infobild löschen'), URLHelper::getLink('dispatch.php/institute/avatar/delete/' . $institute->id), Icon::create('trash', 'clickable')); } $sidebar->addWidget($widget);
public function index_action() { $this->prelim_discussion = vorbesprechung($this->course->id); $this->title = $this->course->getFullname(); $this->course_domains = UserDomain::getUserDomainsForSeminar($this->course->id); $this->sem = new Seminar($this->course); if ($studienmodulmanagement = PluginEngine::getPlugin('StudienmodulManagement')) { foreach ($this->course->study_areas->filter(function ($m) { return $m->isModule(); }) as $module) { $this->studymodules[] = array('nav' => $studienmodulmanagement->getModuleInfoNavigation($module->id, $this->course->start_semester->id), 'title' => $studienmodulmanagement->getModuleTitle($module->id, $this->course->start_semester->id)); } } // Retrive display of sem_tree if (Config::get()->COURSE_SEM_TREE_DISPLAY) { $this->studyAreaTree = StudipStudyArea::backwards($this->course->study_areas); } else { $this->study_areas = $this->course->study_areas->filter(function ($m) { return !$m->isModule(); }); } if (Request::isXhr()) { $this->set_layout(null); $this->response->add_header('Content-Type', 'text/html;charset=Windows-1252'); header('X-Title: ' . $this->title); } else { PageLayout::setHelpKeyword("Basis.InVeranstaltungDetails"); PageLayout::setTitle($this->title . " - " . _("Details")); PageLayout::addSqueezePackage('admission'); PageLayout::addSqueezePackage('enrolment'); if ($GLOBALS['SessionSeminar'] == $this->course->id) { Navigation::activateItem('/course/main/details'); SkipLinks::addIndex(Navigation::getItem('/course/main/details')->getTitle(), 'main_content', 100); } else { $sidebarlink = true; $enrolment_info = $this->sem->getEnrolmentInfo($GLOBALS['user']->id); } $sidebar = Sidebar::Get(); if ($sidebarlink) { $sidebar->setContextAvatar(CourseAvatar::getAvatar($this->course->id)); } $sidebar->setTitle(_('Details')); $links = new ActionsWidget(); $links->addLink(_("Drucken"), URLHelper::getScriptLink("dispatch.php/course/details/index/" . $this->course->id), Icon::create('print', 'clickable'), array('class' => 'print_action', 'target' => '_blank')); if ($enrolment_info['enrolment_allowed'] && $sidebarlink) { if (in_array($enrolment_info['cause'], words('member root courseadmin'))) { $abo_msg = _("direkt zur Veranstaltung"); } else { $abo_msg = _("Zugang zur Veranstaltung"); } $links->addLink($abo_msg, URLHelper::getScriptLink("dispatch.php/course/enrolment/apply/" . $this->course->id), Icon::create('door-enter', 'clickable'), array('data-dialog' => '')); } if (Config::get()->SCHEDULE_ENABLE && !$GLOBALS['perm']->have_studip_perm("user", $this->course->id) && !$GLOBALS['perm']->have_perm('admin') && $this->sem->getMetaDateCount()) { $query = "SELECT COUNT(*) FROM schedule_seminare WHERE seminar_id = ? AND user_id = ?"; if (!DBManager::Get()->fetchColumn($query, array($this->course->id, $GLOBALS['user']->id))) { $links->addLink(_("Nur im Stundenplan vormerken"), URLHelper::getLink("dispatch.php/calendar/schedule/addvirtual/" . $this->course->id), Icon::create('info', 'clickable')); } } if ($this->send_from_search_page) { $links->addLink(_("Zurück zur letzten Auswahl"), URLHelper::getLink($this->send_from_search_page), Icon::create('link-intern', 'clickable')); } if ($links->hasElements()) { $sidebar->addWidget($links); } $sidebar->setImage('sidebar/seminar-sidebar.png'); $sidebar->setContextAvatar(CourseAvatar::getAvatar($this->course->id)); $sidebar = Sidebar::Get(); $sidebar->setImage('sidebar/seminar-sidebar.png'); $sidebar->setContextAvatar(CourseAvatar::getAvatar($this->course->id)); if ($enrolment_info['description']) { PageLayout::postMessage(MessageBox::info($enrolment_info['description'])); } } }
private function initSidebar($active_id = null) { $sidebar = Sidebar::Get(); $letterlist = new SidebarWidget(); foreach (range('A', 'Z') as $letter) { if ($this->contacts[$letter]) { $html .= "<a href='#letter_{$letter}'>{$letter}</a>"; } else { $html .= "<span>{$letter}</span>"; } } $letterlist->setTitle(_('Schnellzugriff')); $letterlist->addElement(new WidgetElement("<div class='letterlist'>{$html}</div>")); $sidebar->addWidget($letterlist); // Groups $actions = new ActionsWidget(); $actions->addLink(_('Neue Gruppe anlegen'), $this->url_for('contact/editGroup'), Icon::create('group3+add', 'clickable'))->asDialog('size=auto'); $actions->addLink(_('Nachricht an alle'), $this->url_for('messages/write', array('rec_uname' => $this->allContacts->pluck('username'))), Icon::create('mail', 'clickable'))->asDialog(); $actions->addLink(_('E-Mail an alle'), URLHelper::getLink('mailto:' . join(',', $this->allContacts->pluck('email'))), Icon::create('mail', 'clickable')); $actions->addLink(_('Alle vCards herunterladen'), $this->url_for('contact/vcard/' . $this->filter), Icon::create('vcard', 'clickable')); $sidebar->addWidget($actions); // Groups navigation $groupsWidget = new ViewsWidget(); $groupsWidget->setTitle(_('Gruppen')); $groupsWidget->addLink(_('Alle Kontakte'), URLHelper::getLink('dispatch.php/contact/index'))->setActive(!$active_id); foreach ($this->groups as $group) { $groupsWidget->addLink($group->name, URLHelper::getLink('dispatch.php/contact/index/' . $group->id))->setActive($group->id == $active_id); } $sidebar->addWidget($groupsWidget); }
<?php echo Icon::create('checkbox-checked', 'info')->asImg(['class' => "check text-bottom"]); ?> </div> <input type="checkbox" name="filter_nohashtags_check" id="filter_nohashtags_check" onChange="jQuery(this).closest('td').toggleClass('selected');" value="1"<?php echo $stream['filter_nohashtags'] ? " checked" : ""; ?> > </td> </tr> </tbody> </table> <?php echo \Studip\Button::createAccept(_("Speichern"), array()); ?> </form> <?php $sidebar = Sidebar::get(); $sidebar->setImage("sidebar/blubber-sidebar.png"); $streamAvatar = StreamAvatar::getAvatar($stream->getId()); if ($streamAvatar->is_customized()) { $sidebar->setContextAvatar($streamAvatar); } $actions = new ActionsWidget(); if (!$stream->isNew()) { $actions->addLink(_("Diesen Stream löschen"), PluginEngine::getURL($plugin, array(), 'streams/delete/' . $stream->getId()), Icon::create("trash", "clickable"), array('onclick' => "return window.confirm('" . _("Wirklich löschen?") . "');")); } $sidebar->addWidget($actions);
/** * Displays accounts and elearning modules for active user */ public function my_accounts_action() { global $connected_cms, $current_module, $messages; Navigation::activateItem('/tools/my_elearning'); PageLayout::setTitle(_("Meine Lernmodule und Benutzer-Accounts")); if ($this->new_account_cms != "") { $this->new_account_form = ELearningUtils::getNewAccountForm($this->new_account_cms); } foreach ($GLOBALS['ELEARNING_INTERFACE_MODULES'] as $cms => $cms_preferences) { if (ELearningUtils::isCMSActive($cms)) { ELearningUtils::loadClass($cms); if ($cms_preferences["auth_necessary"] == true) { $this->new_module_form[$cms] = ELearningUtils::getNewModuleForm($cms); } $connection_status = $connected_cms[$cms]->getConnectionStatus($cms); foreach ($connection_status as $type => $msg) { if ($msg["error"] != "") { PageLayout::postMessage(MessageBox::error(_("Es traten Probleme bei der Anbindung einzelner Lermodule auf. Bitte wenden Sie sich an Ihren Systemadministrator."), array($cms . ': ' . $msg["error"]))); $GLOBALS["ELEARNING_INTERFACE_" . $cms . "_ACTIVE"] = false; } } } } $connected_cms = array(); // prepare cms list foreach ($GLOBALS['ELEARNING_INTERFACE_MODULES'] as $cms => $cms_preferences) { if (ELearningUtils::isCMSActive($cms) and $cms_preferences["auth_necessary"]) { ELearningUtils::loadClass($cms); $this->cms_list[$cms] = $cms_preferences; $this->cms_list[$cms]['name'] = $connected_cms[$cms]->getName(); $this->cms_list[$cms]['logo'] = $connected_cms[$cms]->getLogo(); $this->cms_list[$cms]['modules'] = array(); if ($this->new_account_cms != $cms) { $this->cms_list[$cms]['show_account_form'] = $cms_preferences; } if ($GLOBALS["module_type_" . $cms] != "") { $this->cms_list[$cms]['cms_anker_target'] = true; } if ($connected_cms[$cms]->user->isConnected()) { $this->cms_list[$cms]['start_link'] = $connected_cms[$cms]->link->getStartpageLink(); } if ($this->new_account_cms != $cms) { if ($connected_cms[$cms]->user->isConnected()) { $this->cms_list[$cms]['user'] = $connected_cms[$cms]->user->getUsername(); $connected_cms[$cms]->soap_client->setCachingStatus(false); $this->user_content_modules = $connected_cms[$cms]->getUserContentModules(); $connected_cms[$cms]->soap_client->setCachingStatus(true); if (!($this->user_content_modules == false)) { foreach ($this->user_content_modules as $key => $connection) { $connected_cms[$cms]->setContentModule($connection, false); $this->cms_list[$cms]['modules'][] = $connected_cms[$cms]->content_module[$current_module]->view->show(); } } $this->cms_list[$cms]['new_module_form'] = $this->new_module_form[$cms]; } } else { $this->cms_list[$cms]['account_form'] = $this->new_account_form; } } } $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/learnmodule-sidebar.png'); $widget = new ActionsWidget(); if ($GLOBALS['perm']->have_perm('autor') and count($this->cms_list)) { foreach ($this->cms_list as $cms_key => $cms_data) { if ($connected_cms[$cms_key]->user->isConnected()) { $widget->addLink(sprintf(_('Zur %s Startseite'), $cms_data['name']), URLHelper::getScriptLink($cms_data['start_link']), Icon::create('link-extern', 'clickable'), array('target' => '_blank')); $link_count++; } } } if ($link_count) { $sidebar->addWidget($widget); } // terminate objects if (is_array($connected_cms)) { foreach ($connected_cms as $system) { $system->terminate(); } } if (is_array($messages)) { foreach ($messages as $mtype => $mtext) { PageLayout::postMessage(MessageBox::$mtype($mtext)); } } }
/** * Extends this controller with neccessary infobox * * @param String $view Currently viewed group */ private function setSidebar($view) { $sidebar = Sidebar::Get(); $sidebar->setImage('sidebar/smiley-sidebar.png'); $sidebar->setTitle(PageLayout::getTitle() ?: _('Smileys')); // Render items $factory = new Flexi_TemplateFactory($this->dispatcher->trails_root . '/views/admin/smileys/'); $actions = new ActionsWidget(); $actions->addLink(_('Neues Smiley hochladen'), $this->url_for('admin/smileys/upload', $view), Icon::create('add', 'clickable'))->asDialog('size=auto'); $actions->addLink(_('Smileys zählen'), $this->url_for('admin/smileys/count', $view), Icon::create('code', 'clickable')); $actions->addLink(_('Tabelle aktualisieren'), $this->url_for('admin/smileys/refresh', $view), Icon::create('refresh', 'clickable')); $actions->addLink(_('Smiley-Übersicht öffnen'), URLHelper::getLink('dispatch.php/smileys'), Icon::create('smiley', 'clickable'))->asDialog(); $sidebar->addWidget($actions); $widget = new SidebarWidget(); $filter = $factory->render('selector', array('characters' => Smiley::getUsedCharacters(), 'controller' => $this, 'view' => $view)); $widget->setTitle(_('Filter')); $widget->addElement(new WidgetElement($filter)); $sidebar->addWidget($widget); $widget = new SidebarWidget(); $statistics = $factory->render('statistics', Smiley::getStatistics()); $widget->setTitle(_('Statistiken')); $widget->addElement(new WidgetElement($statistics)); $sidebar->addWidget($widget); }
/** * Autor / Tutor / Teacher action */ public function index_action($order_by = null, $order = 'asc') { if ($GLOBALS['perm']->have_perm('root')) { throw new AccessDeniedException(); } if ($GLOBALS['perm']->have_perm('admin')) { $this->redirect('my_courses/admin'); return; } Navigation::activateItem('/browse/my_courses/list'); PageLayout::setHelpKeyword("Basis.MeineVeranstaltungen"); PageLayout::setTitle(_("Meine Veranstaltungen")); $config_sem = $GLOBALS['user']->cfg->MY_COURSES_SELECTED_CYCLE; if (!Config::get()->MY_COURSES_ENABLE_ALL_SEMESTERS && $config_sem == 'all') { $config_sem = 'future'; } $this->_my_sem_open = $GLOBALS['user']->cfg->MY_COURSES_OPEN_GROUPS; $group_field = $GLOBALS['user']->cfg->MY_COURSES_GROUPING; $deputies_enabled = Config::get()->DEPUTIES_ENABLE; $default_deputies_enabled = Config::get()->DEPUTIES_DEFAULTENTRY_ENABLE; $deputies_edit_about_enabled = Config::get()->DEPUTIES_EDIT_ABOUT_ENABLE; $studygroups_enabled = Config::get()->MY_COURSES_ENABLE_STUDYGROUPS; $this->config_sem_number = Config::get()->IMPORTANT_SEMNUMBER; $sem_create_perm = in_array(Config::get()->SEM_CREATE_PERM, array('root', 'admin', 'dozent')) ? Config::get()->SEM_CREATE_PERM : 'dozent'; $this->sem_data = SemesterData::GetSemesterArray(); $sem = $config_sem && $config_sem != '0' ? $config_sem : Config::get()->MY_COURSES_DEFAULT_CYCLE; if (Request::option('sem_select')) { $sem = Request::get('sem_select', $sem); } if (!in_array($sem, words('future all last current')) && isset($sem)) { Request::set('sem_select', $sem); } $forced_grouping = in_array(Config::get()->MY_COURSES_FORCE_GROUPING, getValidGroupingFields()) ? Config::get()->MY_COURSES_FORCE_GROUPING : 'sem_number'; if ($forced_grouping == 'not_grouped') { $forced_grouping = 'sem_number'; } if (!$group_field) { $group_field = 'sem_number'; } if ($group_field == 'sem_number' && $forced_grouping != 'sem_number') { $group_field = $forced_grouping; } $this->group_field = $group_field === 'not_grouped' ? 'sem_number' : $group_field; // Needed parameters for selecting courses $params = array('group_field' => $this->group_field, 'order_by' => $order_by, 'order' => $order, 'studygroups_enabled' => $studygroups_enabled, 'deputies_enabled' => $deputies_enabled); // Save the semester in session $this->sem_courses = MyRealmModel::getPreparedCourses($sem, $params); $this->waiting_list = MyRealmModel::getWaitingList($GLOBALS['user']->id); $this->sem = $sem; $this->order = $order; $this->order_by = $order_by; $this->default_deputies_enabled = $default_deputies_enabled; $this->deputies_edit_about_enabled = $deputies_edit_about_enabled; $this->my_bosses = $default_deputies_enabled ? getDeputyBosses($GLOBALS['user']->id) : array(); // Check for new contents $new_contents = $this->check_for_new($this->sem_courses, $this->group_field); $this->nav_elements = MyRealmModel::calc_nav_elements($this->sem_courses, $this->group_field); // if ($tabularasa = $this->flash['tabularasa']) { $details = array(); if ($new_contents) { $details[] = sprintf(_('Seit Ihrem letzten Seitenaufruf (%s) sind allerdings neue Inhalte hinzugekommen.'), reltime($tabularasa)); } $message_box = MessageBox::success(_('Alles als gelesen markiert!'), $details); PageLayout::postMessage($message_box); } // create settings url depended on selected cycle if (isset($sem) && !in_array($sem, words('future all last current'))) { $this->settings_url = sprintf('dispatch.php/my_courses/groups/%s', $sem); } else { $this->settings_url = 'dispatch.php/my_courses/groups'; } $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/seminar-sidebar.png'); $this->setSemesterWidget($sem); $setting_widget = new ActionsWidget(); if ($new_contents) { $setting_widget->addLink(_('Alles als gelesen markieren'), $this->url_for('my_courses/tabularasa/' . $sem . '/', time()), Icon::create('accept', 'clickable')); } $setting_widget->addLink(_('Farbgruppierung ändern'), URLHelper::getLink($this->settings_url), Icon::create('group4', 'clickable'), array('data-dialog' => '')); if (Config::get()->MAIL_NOTIFICATION_ENABLE) { $setting_widget->addLink(_('Benachrichtigungen anpassen'), URLHelper::getLink('dispatch.php/settings/notification'), Icon::create('mail', 'clickable')); } if ($sem_create_perm == 'dozent' && $GLOBALS['perm']->have_perm('dozent')) { $setting_widget->addLink(_('Neue Veranstaltung anlegen'), URLHelper::getLink('dispatch.php/course/wizard'), Icon::create('seminar+add', 'clickable')); } $setting_widget->addLink(_('Veranstaltung hinzufügen'), URLHelper::getLink('dispatch.php/search/courses'), Icon::create('seminar', 'clickable')); $sidebar->addWidget($setting_widget); $this->setGroupingSelector($this->group_field); }
public function details_action($plugin_id) { $this->marketplugin = MarketPlugin::find($plugin_id); if (!$this->marketplugin) { throw new Trails_Exception(404); } Navigation::addItem('/pluginmarket/presenting/details', new AutoNavigation(_('Details'), $this->url_for('presenting/details/' . $plugin_id))); PageLayout::setTitle($this->marketplugin->name . ' - ' . $this->plugin->getDisplayTitle()); if (Request::isPost() && Request::submitted("delete_plugin") && $this->marketplugin->isRootable()) { $this->marketplugin->delete(); PageLayout::postMessage(MessageBox::success(_("Plugin wurde gelöscht."))); $this->redirect('presenting/overview'); return; } $this->marketplugin['rating'] = $this->marketplugin->calculateRating(); $this->marketplugin->store(); // Add actions widget $sidebar = Sidebar::Get(); $actions = new ActionsWidget(); $actions->addLink(_('Nutzung mitteilen'), $this->url_for('presenting/propose_usage/' . $this->marketplugin->id), Icon::create('add', "clickable"))->asDialog('size=auto'); $sidebar->addWidget($actions); }
<? if ($message_id): ?> <script> jQuery(function ($) { STUDIP.Dialog.fromURL('<?php echo $controller->url_for('messages/read/' . $message_id); ?> '); }); </script> <? endif; ?> <?php $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/mail-sidebar.png'); $actions = new ActionsWidget(); $actions->addLink(_("Neue Nachricht schreiben"), $controller->url_for('messages/write'), Icon::create('mail+add', 'clickable'), array('data-dialog' => 'width=650;height=600')); if (Navigation::getItem('/messaging/messages/inbox')->isActive() && $messages) { $actions->addLink(_('Alle als gelesen markieren'), $controller->url_for('messages/overview', array('read_all' => 1)), Icon::create('accept', 'clickable')); } $actions->addLink(_('Ausgewählte Nachrichten löschen'), "#", Icon::create('trash', 'clickable'), array('onclick' => "if (window.confirm('Wirklich %s Nachrichten löschen?'.toLocaleString().replace('%s', jQuery('#bulk tbody :checked').length))) { jQuery('#bulk').submit(); } return false;")); $sidebar->addWidget($actions); $search = new SearchWidget(URLHelper::getLink('?')); $search->addNeedle(_('Nachrichten durchsuchen'), 'search', true); $search->addFilter(_('Betreff'), 'search_subject'); $search->addFilter(_('Inhalt'), 'search_content'); $search->addFilter(_('Autor/-in'), 'search_autor'); $sidebar->addWidget($search); $folderwidget = new ViewsWidget(); $folderwidget->forceRendering(); $folderwidget->title = _('Schlagworte');
/** * displays a paginated member overview of a studygroup * * @param string id of a studypgroup * @param string page number the current page * * @return void * */ function members_action() { $id = $_SESSION['SessionSeminar']; PageLayout::setTitle(getHeaderLine($_SESSION['SessionSeminar']) . ' - ' . _("Teilnehmende")); Navigation::activateItem('/course/members'); PageLayout::setHelpKeyword('Basis.StudiengruppenBenutzer'); Request::set('choose_member_parameter', $this->flash['choose_member_parameter']); object_set_visit_module('participants'); $this->last_visitdate = object_get_visit($id, 'participants'); $sem = Course::find($id); $this->anzahl = StudygroupModel::countMembers($id); $this->groupname = $sem->getFullname(); $this->sem_id = $id; $this->groupdescription = $sem->beschreibung; $this->moderators = $sem->getMembersWithStatus('dozent'); $this->tutors = $sem->getMembersWithStatus('tutor'); $this->autors = $sem->getMembersWithStatus('autor'); $this->accepted = $sem->admission_applicants->findBy('status', 'accepted'); $this->sem_class = Course::findCurrent()->getSemClass(); $inviting_search = new SQLSearch("SELECT auth_user_md5.user_id, {$GLOBALS['_fullname_sql']['full_rev']} as fullname, username, perms " . "FROM auth_user_md5 " . "LEFT JOIN user_info ON (auth_user_md5.user_id = user_info.user_id) " . "LEFT JOIN seminar_user ON (auth_user_md5.user_id = seminar_user.user_id AND seminar_user.Seminar_id = '" . addslashes($id) . "') " . "WHERE perms NOT IN ('root', 'admin') " . "AND " . get_vis_query() . " AND (username LIKE :input OR Vorname LIKE :input " . "OR CONCAT(Vorname,' ',Nachname) LIKE :input " . "OR CONCAT(Nachname,' ',Vorname) LIKE :input " . "OR Nachname LIKE :input OR {$GLOBALS['_fullname_sql']['full_rev']} LIKE :input) " . "ORDER BY fullname ASC", _("Nutzer suchen"), "user_id"); $this->rechte = $GLOBALS['perm']->have_studip_perm("tutor", $id); $actions = new ActionsWidget(); if ($this->rechte) { $mp = MultiPersonSearch::get('studygroup_invite_' . $id)->setLinkText(_('Neue Gruppenmitglieder-/innen einladen'))->setLinkIconPath("")->setTitle(_('Neue Gruppenmitglieder/-innen einladen'))->setExecuteURL($this->url_for('course/studygroup/execute_invite/' . $id, array('view' => Request::get('view'))))->setSearchObject($inviting_search)->addQuickfilter(_('Adressbuch'), User::findCurrent()->contacts->pluck('user_id'))->setNavigationItem('/course/members')->render(); $element = LinkElement::fromHTML($mp, Icon::create('community+add', 'clickable')); $actions->addElement($element); } if ($this->rechte || $sem->getSemClass()['studygroup_mode']) { $actions->addLink(_('Nachricht an alle Gruppenmitglieder verschicken'), $this->url_for('course/studygroup/message/' . $id), Icon::create('mail', 'clickable'), array('data-dialog' => 1)); } if ($actions->hasElements()) { Sidebar::get()->addWidget($actions); } $this->invitedMembers = StudygroupModel::getInvitations($id); }