function initialize()
 {
     $styles = $this->combineAssets('plugingenerator', words('form buttons tooltip generator styles'), '.css');
     PageLayout::addStylesheet($styles);
     $scripts = $this->combineAssets('plugingenerator', words('form-protect generator application'), '.js');
     PageLayout::addScript($scripts);
 }
 public function show_action()
 {
     //JavaScript Datei hinzufühen
     PageLayout::addScript($this->getPluginURL() . '/assets/js/raumbelegungen.js');
     //CSS Datei hinzufügen
     PageLayout::addStylesheet($this->getPluginURL() . '/assets/css/raumbelegung.css');
     //Sammeln der Informationen die Auf der Startseite benoetigt werden
     $template = $this->getTemplate("start.php");
     $start = $this->raumbelegung->getStart();
     $template->set_attribute('gebaude', $start["gebaeude"]);
     $template->set_attribute('auswahl', $start["auswahl"]);
     if (isset($_REQUEST["gebaude"])) {
         //echo $auswahlgeb;
         if (isset($_REQUEST["von"]) and $_REQUEST["von"] != "00.00.0000") {
             $von = $this->raumbelegung->dateToUnix($_GET["von"]);
         } else {
             $von = time();
         }
         if (isset($_REQUEST["bis"]) and $_REQUEST["bis"] != "00.00.0000") {
             if ($_REQUEST["bis"] != $_REQUEST["von"]) {
                 $bis = $this->raumbelegung->dateToUnix($_REQUEST["bis"], "24");
             } else {
                 $bis = $this->raumbelegung->dateToUnix($_REQUEST["bis"], "22");
             }
             // Wenn gleicher Tag dann nur bis 22Uhr
         } else {
             $bis = $von;
         }
         $termine = $this->getTermine($von, $bis, $start["auswahl"]["gebaeude"]);
         $template->set_attribute('termine', $termine);
     } else {
         $template->set_attribute('termine', "");
     }
     echo $template->render();
 }
Exemple #3
0
 public function initialize()
 {
     PageLayout::addStylesheet($this->getPluginUrl() . '/css/style.css');
     //PageLayout::addStylesheet($this->getPluginURL().'/assets/style.css');
     PageLayout::addScript($this->getPluginURL() . '/js/script.js');
     $this->setupAutoload();
 }
Exemple #4
0
 /**
  * This method dispatches all actions.
  *
  * @param string $unconsumed_path  part of the dispatch path that was not consumed
  */
 public function perform($unconsumed_path)
 {
     $this->setupAutoload();
     // Add JS and StyleSheet to header
     PageLayout::addScript($this->getPluginURL() . '/javascript/forum.js');
     PageLayout::addStylesheet($this->getPluginURL() . '/stylesheets/forum.css');
     parent::perform($unconsumed_path);
 }
 /**
  *
  **/
 public function initialize()
 {
     require_once 'config_plugin.inc.php';
     require_once 'bootstrap.php';
     $this->addStylesheet('assets/form-settings.less');
     $this->addStylesheet('assets/oauth.less');
     PageLayout::addScript($this->getPluginURL() . '/assets/oauth.js');
 }
 public function getPortalTemplate()
 {
     PageLayout::addScript('https://www.google.com/jsapi');
     $this->template_factory = new Flexi_TemplateFactory($this->getPluginPath() . '/templates');
     $template = $this->template_factory->open('show');
     $template->set_attribute('load', self::getCPU());
     $template->set_layout($GLOBALS['template_factory']->open('layouts/base_without_infobox'));
     return $template;
 }
Exemple #7
0
 function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     if (!$GLOBALS['perm']->have_perm("root")) {
         throw new AccessDeniedException();
     }
     PageLayout::addScript($this->plugin->getPluginURL() . "/assets/fleximport.js");
     Navigation::activateItem("/fleximport/config");
 }
Exemple #8
0
 public function overview_action()
 {
     PageLayout::addScript($this->plugin->getPluginURL() . "/assets/jquery.elastic.source.js");
     $this->configs = FleximportConfig::all();
     $this->possibleConfigs = array();
     foreach (FleximportTable::findAll() as $table) {
         $this->possibleConfigs = array_merge($this->possibleConfigs, $table->neededConfigs());
     }
     $this->possibleConfigs = array_unique($this->possibleConfigs);
 }
Exemple #9
0
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     global $perm;
     checkObject();
     checkObjectModule("participants");
     $this->course_id = $_SESSION['SessSemName'][1];
     $this->course_title = $_SESSION['SessSemName'][0];
     $this->user_id = $GLOBALS['auth']->auth['uid'];
     // Check dozent-perms
     if ($perm->have_studip_perm('dozent', $this->course_id)) {
         $this->is_dozent = true;
     }
     // Check tutor-perms
     if ($perm->have_studip_perm('tutor', $this->course_id)) {
         $this->is_tutor = true;
     }
     // Check autor-perms
     if ($perm->have_studip_perm('autor', $this->course_id)) {
         $this->is_autor = true;
     }
     if ($this->is_tutor) {
         PageLayout::setHelpKeyword("Basis.VeranstaltungenVerwaltenTeilnehmer");
     } else {
         PageLayout::setHelpKeyword("Basis.InVeranstaltungTeilnehmer");
     }
     // Check lock rules
     $this->dozent_is_locked = LockRules::Check($this->course_id, 'dozent');
     $this->tutor_is_locked = LockRules::Check($this->course_id, 'tutor');
     $this->is_locked = LockRules::Check($this->course_id, 'participants');
     // Layoutsettings
     PageLayout::setTitle(sprintf('%s - %s', Course::findCurrent()->getFullname(), _("Teilnehmende")));
     PageLayout::addScript('members.js');
     SkipLinks::addIndex(Navigation::getItem('/course/members')->getTitle(), 'main_content', 100);
     object_set_visit_module('participants');
     $this->last_visitdate = object_get_visit($this->course_id, 'participants');
     // Check perms and set the last visit date
     if (!$this->is_tutor) {
         $this->last_visitdate = time() + 10;
     }
     // Get the max-page-value for the pagination
     $this->max_per_page = Config::get()->ENTRIES_PER_PAGE;
     $this->status_groups = array('dozent' => get_title_for_status('dozent', 2), 'tutor' => get_title_for_status('tutor', 2), 'autor' => get_title_for_status('autor', 2), 'user' => get_title_for_status('user', 2), 'accepted' => get_title_for_status('accepted', 2), 'awaiting' => _("Wartende Personen"), 'claiming' => _("Wartende Personen"));
     // StatusGroups for the view
     $this->decoratedStatusGroups = array('dozent' => get_title_for_status('dozent', 1), 'autor' => get_title_for_status('autor', 1), 'tutor' => get_title_for_status('tutor', 1), 'user' => get_title_for_status('user', 1));
     //check for admission / waiting list
     update_admission($this->course_id);
     // Create new MembersModel, to get additionanl informations to a given Seminar
     $this->members = new MembersModel($this->course_id, $this->course_title);
     $this->members->checkUserVisibility();
     // Set default sidebar image
     $sidebar = Sidebar::get();
     $sidebar->setImage('sidebar/person-sidebar.png');
 }
Exemple #10
0
 function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     Navigation::activateItem("/pluginmarket/presenting");
     if ($GLOBALS['perm']->have_perm("user")) {
         $config = UserConfig::get($GLOBALS['user']->id);
         $this->last_pluginmarket_visit = $config->getValue("last_pluginmarket_visit") ?: time();
         $_SESSION['last_pluginmarket_visit'] = time();
         $config->store("last_pluginmarket_visit", $_SESSION['last_pluginmarket_visit']);
     }
     PageLayout::addScript($this->plugin->getPluginURL() . "/assets/studiptable.js");
     PageLayout::addScript($this->plugin->getPluginURL() . "/assets/pluginmarket.js");
     $tags_statement = DBManager::get()->prepare("\n            SELECT pluginmarket_tags.tag, COUNT(*) AS number\n            FROM pluginmarket_tags\n                INNER JOIN pluginmarket_plugins ON (pluginmarket_plugins.plugin_id = pluginmarket_tags.plugin_id)\n            WHERE pluginmarket_tags. proposal = '0'\n                AND pluginmarket_plugins.approved = 1\n                AND pluginmarket_plugins.publiclyvisible = 1\n            GROUP BY pluginmarket_tags.tag\n            ORDER BY number DESC, RAND()\n            LIMIT 25\n        ");
     $tags_statement->execute();
     $this->tags = $tags_statement->fetchAll(PDO::FETCH_ASSOC);
     // Set view
     $_SESSION['pluginmarket']['view'] = Request::get('view') ?: $_SESSION['pluginmarket']['view'];
     if (!isset($_SESSION['pluginmarket']['view'])) {
         $_SESSION['pluginmarket']['view'] = 'tiles';
     }
     // Sidebar
     $sidebar = Sidebar::Get();
     // Create search widget
     $searchWidget = new SearchWidget($this->url_for('presenting/all'));
     $searchWidget->addNeedle(_('Suche'), 'search', true);
     $sidebar->addWidget($searchWidget);
     // Create cloud
     $tagWidget = new LinkCloudWidget();
     $tagWidget->setTitle(_("Beliebte Tags"));
     foreach ($this->tags as $tag) {
         $tagWidget->addLink($tag['tag'], $this->url_for('presenting/all', array('tag' => $tag['tag'])), $tag['number']);
     }
     $sidebar->addWidget($tagWidget);
     // Create view widget
     if ($action != 'details') {
         $viewWidget = new ViewsWidget();
         $viewWidget->addLink(_('Kacheln'), URLHelper::getLink('', array('view' => 'tiles')))->setActive($_SESSION['pluginmarket']['view'] == 'tiles');
         $viewWidget->addLink(_('Liste'), $this->url_for('presenting/all', array('view' => 'list')))->setActive($_SESSION['pluginmarket']['view'] == 'list');
         $sidebar->addWidget($viewWidget);
     }
     // Create versionfilter widget
     $versionWidget = new OptionsWidget();
     $versionWidget->setTitle(_('Stud.IP Version'));
     // Create options for all studip versions
     $_SESSION['pluginmarket']['version'] = Request::submitted('version') ? Request::get('version') : $_SESSION['pluginmarket']['version'];
     $options[] = "<option value='" . URLHelper::getLink('', array('version' => 0)) . "'>" . _('Alle Versionen') . "</option>";
     foreach (array_reverse(PluginMarket::getStudipReleases()) as $version) {
         $options[] = "<option value='" . URLHelper::getLink('', array('version' => $version)) . "' " . ($_SESSION['pluginmarket']['version'] == $version ? "SELECTED" : "") . ">{$version}</option>";
     }
     $versionWidget->addElement(new WidgetElement('<select style="width: 100%" onchange="location = this.options[this.selectedIndex].value;">' . join("", $options) . '</select>'));
     // Add checkbox to ignore older releases (use invese logic to be applied on startup)
     $sidebar->addWidget($versionWidget, 'comments');
 }
Exemple #11
0
 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;
 }
Exemple #12
0
 function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     if (!$GLOBALS['perm']->have_perm("root")) {
         throw new AccessDeniedException();
     }
     if (FleximportConfig::get("MAXIMUM_EXECUTION_TIME")) {
         set_time_limit(FleximportConfig::get("MAXIMUM_EXECUTION_TIME"));
     }
     PageLayout::addScript($this->plugin->getPluginURL() . "/assets/fleximport.js");
     Navigation::activateItem("/fleximport");
 }
    function before_filter($action, $args) {
        $this->current_action = $action;
        $this->flash = Trails_Flash::instance();
        $this->standard_templates = $GLOBALS['STUDIP_BASE_PATH'] . '/templates/';
        $this->set_layout($GLOBALS['template_factory']->open('layouts/base'));

        $this->assets_url = $this->plugin->getPluginUrl(). '/assets/';
        PageLayout::addScript('jquery.tablesorter.min.js');
        PageLayout::addHeadElement("link",
            array("href" => $this->assets_url.'stylesheets/blubberforum.css',
                  "rel" => "stylesheet"),
            "");

    }
Exemple #14
0
    public function before_filter(&$action, &$args) 
    {
        parent::before_filter($action, $args);
        Navigation::activateItem('/admin/config/document_area');
        PageLayout::setTitle(_('Dateibereich') . ' - ' . _('Administration'));
         if (Request::isXhr()) {
            $this->set_layout(null);
            $this->set_content_type('text/html;Charset=windows-1252');
        } else {
            $this->set_layout($GLOBALS['template_factory']->open('layouts/base'));
        }
        if(empty($_SESSION['document_config_filter'])){
            $_SESSION['document_config_filter'] = 'all';
        }
        PageLayout::addScript('ui.multiselect.js');
        PageLayout::addStylesheet('jquery-ui-multiselect.css');
        $this->getInfobox();

    }
Exemple #15
0
<?
global $template_factory;
$this->set_layout($template_factory->open('layouts/base_without_infobox'));

$ASSETS = $plugin->getPluginURL() . '/assets/';
PageLayout::addStylesheet($ASSETS . 'css/questions/styles.css');
PageLayout::addScript($ASSETS . 'js/vendor/validator.js');

PageLayout::addHeadElement('script', array(),
'
var cliqr = {bootstrap: {}, config: {
    PLUGIN_URL : "' . htmlReady(current(explode('?', $controller->url_for("")))) . '"
  , CID        : "' . htmlReady($cid) . '"
  , ASSETS     : "' . htmlReady($ASSETS) . '"
  , SHORT_URL  : "' . htmlReady($short_url) . '"
}};
');
?>

<!-- BEGIN CLIQR PAGE -->
<script>
cliqr.bootstrap.POLLS = <?php 
echo json_encode(array_map(function ($q) {
    return $q->toJSON();
}, $questions));
?>
;
</script>
<div id="cliqr-container"></div>
<!-- END CLIQR PAGE -->
Exemple #16
0
 public function sidebar_graphics_generator_action()
 {
     PageLayout::addScript($this->plugin->getPluginURL() . "/assets/sidebar/jquery.color.js");
     PageLayout::addScript($this->plugin->getPluginURL() . "/assets/sidebar/sidebar_graphics_generator.js");
 }
Exemple #17
0
// Start of Output

PageLayout::setHelpKeyword("Basis.Dateien");
PageLayout::setTitle($SessSemName["header_line"]. " - " . _("Dateien"));

if ($folder_system_data['cmd'] == 'all') {
    Navigation::activateItem('/course/files/all');
} else {
    Navigation::activateItem('/course/files/tree');
}

$config = Config::get();
if ($config['FILESYSTEM_MULTICOPY_ENABLE']) {
    PageLayout::addStylesheet('jquery-ui-multiselect.css');
    PageLayout::addScript('ui.multiselect.js');
}

ob_start();

// Hauptteil

 if (!isset($range_id))
    $range_id = $SessSemName[1] ;

//JS Routinen einbinden, wenn benoetigt. Wird in der Funktion gecheckt, ob noetig...
JS_for_upload();
//we need this <body> tag, sad but true :)
echo "\n<body onUnLoad=\"STUDIP.OldUpload.upload_end()\">";
?>
<table cellspacing="0" cellpadding="0" border="0" width="100%" id="main_content">
 public function perform($unconsumed_path)
 {
     $this->addStylesheet("assets/lernmarktplatz.less");
     PageLayout::addScript($this->getPluginURL() . "/assets/lernmarktplatz.js");
     parent::perform($unconsumed_path);
 }