当前位置: 首页>>代码示例>>PHP>>正文


PHP PageLayout::addScript方法代码示例

本文整理汇总了PHP中PageLayout::addScript方法的典型用法代码示例。如果您正苦于以下问题:PHP PageLayout::addScript方法的具体用法?PHP PageLayout::addScript怎么用?PHP PageLayout::addScript使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PageLayout的用法示例。


在下文中一共展示了PageLayout::addScript方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initialize

 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);
 }
开发者ID:noackorama,项目名称:studip-plugin-generator,代码行数:7,代码来源:Plugingenerator.class.php

示例2: show_action

 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();
 }
开发者ID:robert-hanke,项目名称:Raumbelegungen,代码行数:35,代码来源:raumbelegungen.class.php

示例3: initialize

 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();
 }
开发者ID:anantace,项目名称:SeminarTabs,代码行数:7,代码来源:SeminarTabs.php

示例4: perform

 /**
  * 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);
 }
开发者ID:ratbird,项目名称:hope,代码行数:13,代码来源:CoreForum.class.php

示例5: initialize

 /**
  *
  **/
 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');
 }
开发者ID:noackorama,项目名称:source-talk-2012,代码行数:11,代码来源:RestipPlugin.class.php

示例6: getPortalTemplate

 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;
 }
开发者ID:derfl0,项目名称:CPU-Meter-Widget,代码行数:9,代码来源:CPUMeterPlugin.php

示例7: before_filter

 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");
 }
开发者ID:Krassmus,项目名称:Fleximport,代码行数:9,代码来源:process.php

示例8: overview_action

 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);
 }
开发者ID:Krassmus,项目名称:Fleximport,代码行数:10,代码来源:config.php

示例9: before_filter

 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');
 }
开发者ID:ratbird,项目名称:hope,代码行数:54,代码来源:members.php

示例10: before_filter

 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');
 }
开发者ID:studip,项目名称:PluginMarket,代码行数:53,代码来源:presenting.php

示例11: getPortalTemplate

 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;
 }
开发者ID:ratbird,项目名称:hope,代码行数:12,代码来源:QuickSelection.php

示例12: before_filter

 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");
 }
开发者ID:Krassmus,项目名称:Fleximport,代码行数:12,代码来源:import.php

示例13: before_filter

    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"),
            "");

    }
开发者ID:noackorama,项目名称:blubberforum,代码行数:14,代码来源:application.php

示例14: before_filter

    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();

    }
开发者ID:ratbird,项目名称:hope,代码行数:19,代码来源:administration.php

示例15: json_encode

<?
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 -->
开发者ID:swindhab,项目名称:CliqrPlugin,代码行数:30,代码来源:index.php


注:本文中的PageLayout::addScript方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。