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; } }
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; }
function link_for($to = '', $params = array()) { if ($to === '') { $to = substr(strtolower(get_class($this)), 0, -10) . '/' . $this->current_action; } return PluginEngine::getLink($this->plugin, $params, $to); }
public function perform($unconsumed_path) { //$this->setupAutoload(); $dispatcher = new Trails_Dispatcher($this->getPluginPath(), rtrim(PluginEngine::getLink($this, array(), null), '/'), 'show'); $dispatcher->plugin = $this; $dispatcher->dispatch($unconsumed_path); }
public function initialize() { PageLayout::addSqueezePackage('lightbox'); $this->addStylesheet('assets/pluginmarket.less'); PageLayout::addHeadElement('link', array('rel' => 'alternate', 'type' => 'application/rss+xml', 'href' => PluginEngine::getLink($this, array(), 'rss/newest'), 'title' => _('Neueste Plugins'))); $sidebar = Sidebar::Get(); $sidebar->setImage('../../' . $this->getPluginPath() . '/assets/sidebar-marketplace.png'); }
public function getPortalTemplate() { PageLayout::addScript($this->getPluginUrl() . '/js/QuickSelection.js'); $names = WidgetHelper::getWidgetUserConfig($GLOBALS['user']->id, 'QUICK_SELECTION'); $template_factory = new Flexi_TemplateFactory(__DIR__ . '/templates'); $template = $template_factory->open('list'); $template->navigation = $this->getFilteredNavigation($names); $navigation = new Navigation('', PluginEngine::getLink($this, array(), 'configuration')); $navigation->setImage(Icon::create('edit', 'clickable', ["title" => _('Konfigurieren')]), array('data-dialog' => 'size=auto')); $template->icons = array($navigation); return $template; }
function edit_action($area_id) { ForumPerm::check('edit_area', $this->getId(), $area_id); if (Request::isAjax()) { ForumEntry::update($area_id, studip_utf8decode(Request::get('name')), studip_utf8decode(Request::get('content'))); $this->render_json(array('content' => ForumEntry::killFormat(ForumEntry::killEdit(studip_utf8decode(Request::get('content')))))); } else { ForumEntry::update($area_id, Request::get('name'), Request::get('content')); $this->flash['messages'] = array('success' => _('Die Änderungen am Bereich wurden gespeichert.')); $this->redirect(PluginEngine::getLink('coreforum/index/index')); } }
public function profile_action() { PageLayout::addHeadElement("script", array('src' => $this->assets_url . "/javascripts/autoresize.jquery.min.js"), ""); PageLayout::addHeadElement("script", array('src' => $this->assets_url . "/javascripts/blubberforum.js"), ""); PageLayout::addHeadElement("script", array('src' => $this->assets_url . "/javascripts/formdata.js"), ""); if (Request::get("extern")) { $this->user = BlubberExternalContact::find(Request::get("user_id")); } else { $this->user = new BlubberUser(Request::get("user_id")); } PageLayout::setTitle(htmlReady($this->user->getName()) . " - Blubber"); PageLayout::addHeadElement("link", array('rel' => "alternate", 'type' => "application/atom+xml", 'href' => PluginEngine::getLink($this->plugin, array(), "forum/feed/" . $this->user->getId()), 'title' => "Blubber von " . get_fullname($user_id))); $this->threads = ForumPosting::getThreads(array('user_id' => $this->user->getId(), 'limit' => $this->max_threads + 1)); $this->more_threads = count($this->threads) > $this->max_threads; $this->course_id = $_SESSION['SessionSeminar']; if ($this->more_threads) { $this->threads = array_slice($this->threads, 0, $this->max_threads); } }
<? foreach ($releases as $release) : ?> <tr> <td> <a href="<?php echo PluginEngine::getLink($plugin, array(), "download/" . $release['name']); ?> "> <?php echo htmlReady($release['name']); ?> </a> </td> <td> <?php echo date("j.n.Y", strtotime($release['date'])); ?> </td> <td style="text-align: right;"> <a href="<?php echo PluginEngine::getLink($plugin, array(), "download/" . $release['name']); ?> "> <?php echo Icon::create("download", "clickable")->asImg("20px", ['class' => "text-bottom"]); ?> </a> </td> </tr> <? endforeach ?> </tbody> </table>
echo formatReady($scm->content); ?> <? else: ?> <?php echo MessageBox::info(_('In diesem Bereich wurden noch keine Inhalte erstellt.')); ?> <? endif; ?> </td> </tr> </tbody> <? if ($priviledged): ?> <tfoot class="table_footer"> <tr> <td colspan="2"> <?php echo LinkButton::create(_('Bearbeiten'), PluginEngine::getLink($this->plugin, array(), 'show/edit/' . $scm->id), array('data-dialog' => '')); ?> <? if (count($scms) > 1): ?> <? if ($scm->position == 0): ?> <?php echo Button::create(_('Nach vorne'), array('disabled' => 'disabled')); ?> <? else: ?> <? endif; ?> <?php echo LinkButton::create(_('Löschen'), $controller->url_for('show/' . $scm->id . '?verify=delete'), array('title' => _('Diese Seite löschen'))); ?> <? endif; ?> </td> </tr> </tfoot>
echo Icon::create($plugin->getPluginURL() . "/assets/star{$v}.svg")->asImg($starwidth); ?> <? $v = $material['rating'] >= 3.75 ? 3 : ($material['rating'] >= 3.25 ? 2 : "") ?> <?php echo Icon::create($plugin->getPluginURL() . "/assets/star{$v}.svg")->asImg($starwidth); ?> <? $v = $material['rating'] >= 4.75 ? 3 : ($material['rating'] >= 4.25 ? 2 : "") ?> <?php echo Icon::create($plugin->getPluginURL() . "/assets/star{$v}.svg")->asImg($starwidth); ?> <? endif ?> </td> <td> <? if ($material['user_id'] === $GLOBALS['user']->id) : ?> <a href="<?php echo PluginEngine::getLink($plugin, array(), "mymaterial/edit/" . $material->getId()); ?> " data-dialog title="<?php echo _("Lernmaterial bearbeiten"); ?> "> <?php echo Icon::create("edit", "clickable")->asImg(20); ?> </a> <? endif ?> </td> </tr> <? endforeach ?> </tbody> </table>
?> <?php echo _("Dazu einen Kommentar schreiben"); ?> </a> <? 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"),
<form action="<?php echo PluginEngine::getLink($plugin, array(), "mymaterial/add_tags"); ?> " method="post" class="default"> <input type="text" name="tag" placeholder="<?php echo _("Thema oder Schlagwort ..."); ?> "> <input type="hidden" name="material_id" value="<?php echo $this->material->getId(); ?> "> <div data-dialog-button> <?php echo \Studip\Button::create(_("Hinzufügen")); ?> </div> </form>
<form action="<?php echo PluginEngine::getLink($plugin, array(), "market/review/" . $material->getId()); ?> " method="post" class="default"> <select name="rating"> <option value="0">0 <?php echo _("Sterne"); ?> </option> <option value="1"<?php echo $review['rating'] == 1 ? " selected" : ""; ?> >1 <?php echo _("Stern"); ?> </option> <option value="2"<?php echo $review['rating'] == 2 ? " selected" : ""; ?> >2 <?php echo _("Sterne"); ?> </option> <option value="3"<?php echo $review['rating'] == 3 ? " selected" : ""; ?> >3 <?php echo _("Sterne"); ?> </option> <option value="4"<?php
<form method="post" action="<?php echo PluginEngine::getLink('coreforum/index/edit_category/' . $category_id); ?> "> <input type="text" required name="name" size="40" maxlength="255" value="<?php echo htmlReady($categories[$category_id]); ?> "> <?php echo Studip\Button::createAccept(_('Kategorie speichern'), '', array('onClick' => "javascript:STUDIP.Forum.saveCategoryName('" . $category_id . "'); return false;")); ?> <?php echo Studip\LinkButton::createCancel(_('Abbrechen'), PluginEngine::getLink('coreforum/index/index#cat_' . $category_id), array('onClick' => "STUDIP.Forum.cancelEditCategoryName('" . $category_id . "'); return false;")); ?> </form>
'content' => array( array( 'kategorie' => _("Information"), 'eintrag' => array( array( 'icon' => "icons/16/black/info", 'text' => _("Suchen Sie nach Veranstaltungen, Personen, Räumen, Dateien, Forenpostings.") ), array( 'icon' => "icons/16/black/info", 'text' => _("Nutzen Sie die Filtermöglichkeiten oben, um schneller ans Ziel zu kommen. So können Sie alle Veranstaltungen eines Studienbereiches finden.") ) ) ), array( 'kategorie' => _("Aktionen"), 'eintrag' => array( array( 'icon' => "", 'text' => _("Wenn Sie mehrere Suchergebnisse durchgehen wollen, klicken Sie auf diese, um sie zu markieren. Öffnen Sie jedes abzuarbeitende Ergebnis in einem neuen Tab und arbeiten Sie so die Liste am elegantesten ab.") ), $GLOBALS['perm']->have_perm("root") ? array( 'icon' => "icons/16/black/refresh", 'text' => sprintf(_("%sErstellen%s Sie den Suchindex neu."), '<a href="'.PluginEngine::getLink($plugin, array(), "indexing").'">', '</a>') ) : null ) ) ) );
?> " data-table_id="<?php echo $table->getId(); ?> "> <div style="float: right;"> <a href="<?php echo PluginEngine::getLink($plugin, array(), "setup/table/" . $table->getId()); ?> " data-dialog> <?php echo version_compare($GLOBALS['SOFTWARE_VERSION'], "3.4", ">=") ? Icon::create("admin", "clickable")->asImg(20) : Assets::img("icons/20/blue/admin"); ?> </a> <a href="<?php echo PluginEngine::getLink($plugin, array(), "setup/removetable/" . $table->getId()); ?> " onClick="STUDIP.Dialog.confirm('<?php echo _("Wirklich die Tabelle löschen?"); ?> ', function () { STUDIP.Fleximport.deleteTable('<?php echo $table->getId(); ?> ') }); return false;"> <?php echo version_compare($GLOBALS['SOFTWARE_VERSION'], "3.4", ">=") ? Icon::create("trash", "clickable")->asImg(20) : Assets::img("icons/20/blue/trash"); ?> </a> </div> <h2> <? switch ($table['import_type']) {
<?/* $this->flash['new_entry_title'] */ ?> <div id="new_entry_box" <?php echo $this->flash['edit_entry'] ? '' : 'style="display: none;"'; ?> > <a name="create"></a> <form action="<?php echo PluginEngine::getLink('coreforum/index/add_entry'); ?> " method="post" id="forum_new_entry" onSubmit="$(window).off('beforeunload')"> <div class="posting bg2"> <div class="postbody" <?php echo $constraint['depth'] == 0 ? 'style="width: 97%"' : ''; ?> > <? if ($constraint['depth'] == 1) : ?> <span class="title"><?php echo _('Neues Thema erstellen'); ?> </span> <p class="content" style="margin-bottom: 0pt"> <? if ($GLOBALS['user']->id == 'nobody') : ?> <input type="text" name="author" style="width: 99%" placeholder="<?php echo _('Ihr Name'); ?> " required tabindex="1"><br> <br> <? endif ?> <input type="text" name="name" style="width: 99%" value="<?php echo htmlReady($this->flash['new_entry_title']); ?>
echo _('Letzte Beiträge'); ?> </a> <? elseif ($section == 'favorites') : ?> <a href="<?php echo PluginEngine::getURL('coreforum/index/favorites'); ?> "> <?php echo _('Gemerkte Beiträge'); ?> </a> <? else: ?> <? $first = true ?> <? foreach (ForumEntry::getPathToPosting($topic_id) as $path_part) : ?> <? if (!$first) : ?> >> <? endif ?> <a href="<?php echo PluginEngine::getLink('coreforum/index/index/' . $path_part['id']); ?> "> <?php echo htmlReady(ForumEntry::killFormat($path_part['name'])); ?> </a> <? $first = false ?> <? endforeach ?> <? endif ?> </span> </div>
echo Studip\LinkButton::create(_('Thema öffnen'), PluginEngine::getLink('coreforum/index/open_thread/' . $topic_id . '/' . $topic_id . '/' . ForumHelpers::getPage()), array('onClick' => 'STUDIP.Forum.openThreadFromThread("' . $topic_id . '"); return false;', 'class' => 'closeButtons')); ?> <? endif ?> <? endif ?> <? if ($constraint['depth'] > 0 && ForumPerm::has('abo', $seminar_id)) : ?> <span id="abolink"> <?php echo $this->render_partial('index/_abo_link', compact('constraint')); ?> </span> <? endif ?> <? if (ForumPerm::has('pdfexport', $seminar_id)) : ?> <?php echo Studip\LinkButton::create(_('Beiträge als PDF exportieren'), PluginEngine::getLink('coreforum/index/pdfexport/' . $topic_id), array('target' => '_blank')); ?> <? endif ?> </div> </div> </div> <? endif ?> <? endif ?> <? if (ForumPerm::has('add_entry', $seminar_id)): ?> <?php echo $this->render_partial('index/_new_entry'); ?> <? endif ?>
function perform($unconsumed_path) { $dispatcher = new Trails_Dispatcher($this->getPluginPath() . '/app', rtrim(PluginEngine::getLink($this, array(), null), '/'), 'generator'); $dispatcher->plugin = $this; $dispatcher->dispatch($unconsumed_path); }
<tbody> <? $item_ids = array() ?> <? if ($table['display_lines'] !== "ondemand") : ?> <? foreach ($table->fetchLines() as $line) : ?> <? if (($displayed_lines >= (int) $limit) && ($limit !== false)) { break; } ?> <? $report = $table->checkLine($line) ?> <? if ($report['pk']) { $item_ids[] = is_array($report['pk']) ? implode("-", $report['pk']) : $report['pk']; } ?> <? if (($count < (int) $limit || $report['errors']) || $limit === false) : ?> <tr> <td> <a href="<?php echo PluginEngine::getLink($plugin, array('table' => $table['name']), "import/targetdetails/" . $line['IMPORT_TABLE_PRIMARY_KEY']); ?> " data-dialog> <? $icon = $report['found'] ? "accept" : "star" ?> <? if ($report['errors']) : ?> <?php echo version_compare($GLOBALS['SOFTWARE_VERSION'], "3.4", ">=") ? Icon::create($icon, "navigation")->asImg(20, array('title' => $report['found'] ? _("Datensatz wurde in Stud.IP gefunden") : _("Objekt würde neu angelegt werden. Zur Datenvorschau."))) : Assets::img("icons/20/lightblue/" . $icon, array('title' => $report['found'] ? _("Datensatz wurde in Stud.IP gefunden") : _("Objekt würde neu angelegt werden. Zur Datenvorschau."))); ?> <? else :?> <?php echo version_compare($GLOBALS['SOFTWARE_VERSION'], "3.4", ">=") ? Icon::create($icon, "clickable")->asImg(20, array('title' => $report['found'] ? _("Datensatz wurde in Stud.IP gefunden und wird geupdated") : _("Objekt wird neu angelegt werden. Zur Datenvorschau."))) : Assets::img("icons/20/blue/" . $icon, array('title' => $report['found'] ? _("Datensatz wurde in Stud.IP gefunden und wird geupdated") : _("Objekt wird neu angelegt werden. Zur Datenvorschau."))); ?> <? endif ?> </a> </td> <td>
?> "> <?php echo htmlReady(($temp_user = User::find($entry['last_posting']['user_id'])) ? $temp_user->getFullname() : $entry['last_posting']['user_fullname']); ?> </a> <? endif; ?> <br> <?php echo _("am"); ?> <?php echo strftime($time_format_string_short, (int) $entry['last_posting']['date']); ?> <a href="<?php echo PluginEngine::getLink('coreforum/index/index/' . $entry['last_posting']['topic_id']); ?> #<?php echo $entry['last_posting']['topic_id']; ?> " alt="<?php echo $infotext; ?> " title="<?php echo $infotext; ?> "> <?php echo Icon::create('link-intern', 'clickable', ['title' => $infotext = _("Direkt zum Beitrag...")])->asImg(); ?> </a>
<? if (!ForumPerm::has('fav_entry', $seminar_id)) return; ?> <!-- set/unset favorite --> <? if (!$favorite) : ?> <a href="<?php echo PluginEngine::getLink('coreforum/index/set_favorite/' . $topic_id); ?> " onClick="STUDIP.Forum.setFavorite('<?php echo $topic_id; ?> ');return false;"> <?php echo Icon::create('exclaim', 'clickable', ['title' => _('Beitrag merken')])->asImg(); ?> </a> <? else : ?> <a href="<?php echo PluginEngine::getLink('coreforum/index/unset_favorite/' . $topic_id); ?> " onClick="STUDIP.Forum.unsetFavorite('<?php echo $topic_id; ?> ');return false;"> <?php echo Icon::create('exclaim', 'attention', ['title' => _('Beitrag nicht mehr merken')])->asImg(); ?> </a> <? endif ?>
<form action="<?php echo PluginEngine::getLink($plugin, array(), "market/overview"); ?> " method="GET" style="text-align: center;"> <div> <input type="text" name="search" value="" style="line-height: 130%; display: inline-block; border: 1px solid #28497c; vertical-align: middle; padding: 5px 5px; font-size: 14px;" placeholder="<?php echo _("Mathematik, Jura ..."); ?> "> <?php echo \Studip\Button::create(_("Suchen")); ?> </div> <a href="<?php echo PluginEngine::getLink($plugin, array('search' => "%"), "market/overview"); ?> "> <?php echo _("alle anzeigen"); ?> </a> </form> <? if (count($best_nine_tags)) : ?> <div class="material_navigation"> <?php echo $this->render_partial("market/_breadcrumb.php", array('plugin' => $plugin, 'tag_history' => $tag_history)); ?> <?php echo $this->render_partial("market/_matrix.php", array('topics' => $best_nine_tags));
/** * Unsubscribe from the passed topic * * @param string $topic_id */ function remove_abo_action($topic_id) { ForumPerm::check('abo', $this->getId(), $topic_id); ForumAbo::delete($topic_id); if (Request::isXhr()) { $this->constraint = ForumEntry::getConstraints($topic_id); $this->render_template('index/_abo_link'); } else { $this->flash['messages'] = array('success' => _('Abonnement aufgehoben.')); $this->redirect(PluginEngine::getLink('coreforum/index/index/' . $topic_id)); } }
<td class="areaentry"> <form class="add_area_form" method="post" action="<?php echo PluginEngine::getLink('coreforum/area/add/' . $category_id); ?> "> <?php echo CSRFProtection::tokenTag(); ?> <input type="text" name="name" size="50" maxlength="255" style="width: 99%;" placeholder="<?php echo _('Name des neuen Bereiches'); ?> " required><br> <textarea name="content" style="height: 3em; width: 99%;" placeholder="<?php echo _('Optionale Beschreibung des neuen Bereiches'); ?> "></textarea> <?php echo Studip\Button::create(_('Bereich hinzufügen')); ?> <?php echo Studip\LinkButton::createCancel(_('Abbrechen'), PluginEngine::getLink('coreforum/index/index#cat_' . $category_id)); ?> </form> </td> <td class="postings">0</td> <td class="answer" colspan="2"><br><?php echo _('keine Antworten'); ?> </td> </tr>
<form action="<?php echo PluginEngine::getLink($plugin, array(), "setup/tablemapping/" . $table->getId()); ?> " method="post" class="studip_form" data-dialog> <table class="default nohover"> <caption> <?php echo _("Einfache Mappings"); ?> </caption> <thead> <tr> <th><?php echo _("Spalte der Zieltabelle"); ?> </th> <th><?php echo _("Spalte der Datentabelle"); ?> </th> </tr> </thead> <tbody> <? foreach ($table->getTargetFields() as $fieldname) : ?> <?php echo $this->render_partial("setup/_field_mapping.php", array('field' => $fieldname, 'table' => $table)); ?>
<table class="default"> <tbody> <? foreach ($courses as $course) : ?> <tr> <td><?php echo htmlReady($course['name']); ?> </td> <td> <form action="<?php echo PluginEngine::getLink($plugin, array(), "market/add_to_course/" . $material->getId()); ?> " method="post"> <button name="seminar_id" value="<?php echo htmlReady($course->getId()); ?> " style="border: none; background: none; cursor: pointer;"> <?php echo Icon::create("add", "clickable")->asImg("20px", array('class' => "text-bottom")); ?> </button> </form> </td> </tr> <? endforeach ?> </tbody> </table>
<? $tags || $tags = array() ?> <div class="matrix"> <? foreach ($topics as $topic) : ?> <? $new_history = implode(",", array_merge((array) $tag_history, array($topic['tag_hash']))) ?> <a data-tags="<?php echo $new_history; ?> " href="<?php echo PluginEngine::getLink($plugin, array('tags' => $new_history), "market/overview"); ?> "> <?php echo Icon::create("topic", "clickable")->asImg("20px", array('class' => "text-bottom")); ?> <?php echo htmlReady($topic['name']); ?> </a> <? endforeach ?> </div>