</script> <?php echo $this->render_partial('index/_js_templates'); ?> <!-- set a CSS "namespace" for Forum --> <div id="forum"> <?php $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/forum-sidebar.png'); if (ForumPerm::has('search', $seminar_id)) { $search = new SearchWidget(PluginEngine::getLink('coreforum/index/search?backend=search')); $search->setId('tutorSearchInfobox'); $search->addNeedle(_('Beiträge durchsuchen'), 'searchfor', true); $search->addFilter(_('Titel'), 'search_title'); $search->addFilter(_('Inhalt'), 'search_content'); $search->addFilter(_('Autor/-in'), 'search_author'); $sidebar->addWidget($search); } $actions = new ActionsWidget(); if ($section == 'index') { if (ForumPerm::has('abo', $seminar_id)) { if (ForumAbo::has($constraint['topic_id'])) { $abo_text = _('Nicht mehr abonnieren'); $abo_url = PluginEngine::getLink('coreforum/index/remove_abo/' . $constraint['topic_id']); } else { switch ($constraint['depth']) { case '0': $abo_text = _('Komplettes Forum abonnieren'); break;
</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'); $folderwidget->id = 'messages-tags'; $folderwidget->addLink(_("Alle Nachrichten"), URLHelper::getURL("?"), null, array('class' => "tag"))->setActive(!Request::submitted("tag")); if (empty($tags)) { $folderwidget->style = 'display:none'; } else { foreach ($tags as $tag) { $folderwidget->addLink(ucfirst($tag), URLHelper::getURL("?", array('tag' => $tag)), null, array('class' => "tag"))->setActive(Request::get("tag") === $tag); } }
/** * Returns an infobox string holding information and action links for * current page. * If newest version is displayed, infobox includes backlinks. * * @param string WikiPage name * @param bool Is version displayed latest version? * **/ function getShowPageInfobox($keyword, $latest_version) { $versions = getWikiPageVersions($keyword); if (!$latest_version) { $message = sprintf(_('Sie betrachten eine alte Version, die nicht mehr geändert werden kann. Verwenden Sie dazu die %saktuelle Version%s.'), '<a href="' . URLHelper::getLink('?keyword='.urlencode($keyword)) . '">', '</a>'); PageLayout::postMessage(MessageBox::info($message)); } $sidebar = Sidebar::get(); // Table of Contents/QuickLinks $widget = new ListWidget(); $widget->setTitle(_('QuickLinks')); $toccont = get_toc_content(); $toccont_empty = !trim(strip_tags($toccont)); if ($GLOBALS['perm']->have_studip_perm('autor', $GLOBALS['SessSemName'][1])){ $extra = sprintf('<a href="%s">%s</a>', URLHelper::getLink('?keyword=toc&view=edit'), $toccont_empty ? Icon::create('add', 'clickable', ['title' => _('erstellen')])->asImg() : Icon::create('edit', 'clickable', ['title' => _('bearbeiten')])->asImg()); $widget->setExtra($extra); } $element = new WidgetElement($toccont_empty ? _('Keine QuickLinks vorhanden') : $toccont); $element->icon = Icon::create('link-intern', 'clickable'); $widget->addElement($element); $sidebar->addWidget($widget); // Backlinks if ($latest_version) { $widget = new LinksWidget(); $widget->setTitle(_('Seiten, die auf diese Seite verweisen')); foreach(getBacklinks($keyword) as $backlink) { $widget->addLink($backlink, URLHelper::getLink('?keyword=' . urlencode($backlink))); } $sidebar->addWidget($widget); } // Ansichten $widget = new ViewsWidget(); $widget->addLink(_('Standard'), URLHelper::getLink('?keyword=' . urlencode($keyword) . '&view=show'), Icon::create('wiki', 'clickable')) ->setActive(true); if (count($versions) >= 1) { $widget->addLink(_('Textänderungen anzeigen'), URLHelper::getLink('?keyword=' . urlencode($keyword) . '&view=diff')); $widget->addLink(_('Text mit Autor/-innenzuordnung anzeigen'), URLHelper::getLink('?keyword=' . urlencode($keyword) . '&view=combodiff')); } $sidebar->addWidget($widget); // Suche $widget = new SearchWidget(URLHelper::getLink('?view=search&keyword=' . urlencode($keyword))); $widget->addNeedle(_('Im Wiki suchen'), 'searchfor', true); $widget->addFilter(_('Nur in aktuellen Versionen'), 'searchcurrentversions'); $sidebar->addWidget($widget); // Versionen if (count($versions) > 0) { $widget = new SelectWidget(_('Alte Versionen dieser Seite'), URLHelper::getLink('?keyword=' . urlencode($keyword)), 'version'); $widget->addElement(new SelectElement('', _('Aktuelle Version'))); foreach ($versions as $version) { $element = new SelectElement($version['version'], sprintf(_('Version %u (%s)'), $version['version'], date('d.m.Y, H:i', $version['chdate'])), $version['version'] == Request::int('version', 0)); $widget->addElement($element); } $sidebar->addWidget($widget); } // Kommentare $widget = new OptionsWidget(); $widget->setTitle(_('Kommentare')); $widget->addRadioButton(_('einblenden'), URLHelper::getLink('?keyword=' . urlencode($keyword) . '&wiki_comments=all'), $GLOBALS['show_wiki_comments'] === 'all'); $widget->addRadioButton(_('als Icons einblenden'), URLHelper::getLink('?keyword=' . urlencode($keyword) . '&wiki_comments=icon'), $GLOBALS['show_wiki_comments'] === 'icon'); $widget->addRadioButton(_('ausblenden'), URLHelper::getLink('?keyword=' . urlencode($keyword) . '&wiki_comments=none'), $GLOBALS['show_wiki_comments'] === 'none'); $sidebar->addWidget($widget, 'comments'); // Exportfunktionen $version = Request::int('version') ?: ''; $widget = new ExportWidget(); $widget->addLink(_('Druckansicht'), URLHelper::getLink('?keyword=' . urlencode($keyword) . '&version=' . $version . '&view=wikiprint'), Icon::create('print', 'clickable'), array('target' => '_blank')); $widget->addLink(_('PDF-Ausgabe'), URLHelper::getLink('?keyword=' . urlencode($keyword) . '&version=' . $version . '&view=export_pdf'), Icon::create('file-pdf', 'clickable'), array('target' => '_blank')); $sidebar->addWidget($widget); return array(); }