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


PHP Layout::addStyle方法代码示例

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


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

示例1: getForm

 public function getForm()
 {
     \Layout::addStyle('filecabinet', 'FC_Forms/form_style.css');
     $this->loadJavascript();
     $this->loadTemplate();
     return $this->template->get();
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:7,代码来源:FC_Multimedia.php

示例2: getHtmlView

 public function getHtmlView($data, \Request $request)
 {
     \Layout::addStyle('election', 'User/style.css');
     // TODO.. Fill this in with an actual template
     $content = "<div class='well'><p><strong>You've already voted in this election.</strong></p>";
     $view = new \View\HtmlView($content);
     return $view;
 }
开发者ID:AppStateESS,项目名称:election,代码行数:8,代码来源:AlreadyVoted.php

示例3: getHtmlView

 public function getHtmlView($data, \Request $request)
 {
     \Layout::addStyle('election', 'User/style.css');
     // TODO.. Fill this in with an actual template
     $content = 'No elections open right now.';
     $view = new \View\HtmlView($content);
     return $view;
 }
开发者ID:AppStateESS,项目名称:election,代码行数:8,代码来源:NoOpenElections.php

示例4: showHMS

 public function showHMS($content)
 {
     $tpl = array();
     $tpl['MAIN'] = $content;
     $navbar = new NavBar();
     $tpl['NAVBAR'] = $navbar->show();
     \Layout::addStyle('hms', 'css/hms.css');
     \Layout::add(\PHPWS_Template::process($tpl, 'hms', 'hms.tpl'));
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:9,代码来源:HomesteadView.php

示例5: getHtmlView

    public function getHtmlView($data, \Request $request)
    {
        \Layout::addStyle('election', 'User/style.css');
        $reason = $this->getMessage();
        // TODO.. Fill this in with an actual template
        $content = <<<EOF
<div class='well'><p><strong>Sorry, but you are not eligible to vote.</strong></p>
<p><strong>Reason:</strong> {$reason}</p>
EOF;
        $view = new \View\HtmlView($content);
        return $view;
    }
开发者ID:AppStateESS,项目名称:election,代码行数:12,代码来源:NotAllowed.php

示例6: getHtmlView

    public function getHtmlView($data, \Request $request)
    {
        \Layout::addStyle('election', 'User/style.css');
        $reason = $this->getMessage();
        // TODO.. Fill this in with an actual template
        $content = <<<EOF
<div class='well'><p><strong>Sorry, a Banner server error occurred.</strong></p>
<p>{$reason}</p>
EOF;
        $view = new \View\HtmlView($content);
        return $view;
    }
开发者ID:AppStateESS,项目名称:election,代码行数:12,代码来源:ServerError.php

示例7: showResults

 public function showResults($electionId)
 {
     \Layout::addStyle('election', 'Admin/Report/style.css');
     $singleResults = Factory::getSingleResults($electionId);
     $multipleResults = Factory::getMultipleResults($electionId);
     $referendumResults = Factory::getReferendumResults($electionId);
     $template = new \Template();
     $template->add('single', $singleResults);
     $template->add('multiple', $multipleResults);
     $template->add('referendum', $referendumResults);
     $template->setModuleTemplate('election', 'Admin/Report/Results.html');
     return $template->get();
 }
开发者ID:AppStateESS,项目名称:election,代码行数:13,代码来源:Report.php

示例8: show

 public function show()
 {
     $tpl = array();
     foreach ($this->container as $item) {
         // Show each item
         if ($item instanceof NewRow) {
             $tpl['menus'][] = array('CONTENT' => $item->show());
         } else {
             $tpl['menus'][] = array('CONTENT' => $item->show());
         }
     }
     Layout::addStyle('othermenu', 'css/style.css');
     return PHPWS_Template::process($tpl, 'othermenu', 'main_menu.tpl');
 }
开发者ID:bostrt,项目名称:othermenu,代码行数:14,代码来源:MainMenu.php

示例9: electionList

    private function electionList()
    {
        javascript('datetimepicker');
        \Layout::addStyle('election', 'Admin/style.css');
        $deity = \Current_User::isDeity() ? 'true' : 'false';
        $date_format = '<script type="text/javascript">var admin = ' . $deity . ';var dateFormat = "' . ELECTION_DATETIME_FORMAT . '";var tomorrow="' . strftime('%Y/%m/%d', time() + 86400) . '";</script>';
        $script[] = $this->getScript('list');
        $react = implode("\n", $script);
        $content = <<<EOF
{$date_format}
<div id="election-listing"></div>
{$react}
EOF;
        return $content;
    }
开发者ID:AppStateESS,项目名称:election,代码行数:15,代码来源:Election.php

示例10: getHtmlView

    public function getHtmlView($data, \Request $request)
    {
        \Layout::addStyle('tailgate', 'Admin/Setup/style.css');
        javascript('datetimepicker');
        javascript('ckeditor');
        javascript('jquery');
        $script = \tailgate\Factory\React::load('setup', REACT_DEVMODE);
        $content = <<<EOF
<h2>Tailgate</h2>
<div id="tailgate-setup"></div>
{$script}
EOF;
        $view = new \View\HtmlView($content);
        return $view;
    }
开发者ID:AppStateESS,项目名称:tailgate,代码行数:15,代码来源:Base.php

示例11: getForm

    public function getForm()
    {
        \Layout::addStyle('filecabinet', 'FC_Forms/form_style.css');
        $this->loadJavascript();
        $this->loadTemplate();
        $thumbnail = <<<EOF
<span class="show-thumbs pointer fa-stack" title="Show thumbnails">
  <i class="fa fa-camera fa-stack-1x" ></i>
</span>
<span class="hide-thumbs pointer fa-stack" title="Hide thumbnails" style="display:none">
  <i class="fa fa-camera fa-stack-1x"></i>
  <i class="fa fa-ban fa-stack-2x text-danger"></i>
</span>
EOF;
        $this->template->add('admin_option', $thumbnail);
        return $this->template->get();
    }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:17,代码来源:FC_Images.php

示例12: welcomeScreen

 public static function welcomeScreen()
 {
     \Layout::addStyle('election', 'User/style.css');
     $template = new \Template();
     $template->setModuleTemplate('election', 'User/welcome.html');
     if (!\Current_User::isLogged()) {
         $template->add('color', 'primary');
         $template->add('label', '<i class="fa fa-check-square-o"></i> Sign in to Vote');
         $template->add('url', ELECTION_LOGIN_DIRECTORY);
     } else {
         $template->add('color', 'success');
         $template->add('label', '<i class="fa fa-check-square-o"></i> Get started voting!');
         $template->add('url', 'election/');
     }
     $template->add('image', PHPWS_SOURCE_HTTP . 'mod/election/img/background1.jpg');
     \Layout::add($template->get());
 }
开发者ID:AppStateESS,项目名称:election,代码行数:17,代码来源:User.php

示例13: getHtmlView

    public function getHtmlView($data, \Request $request)
    {
        $script[] = '<script type="text/javascript">var defaultPicture = \'' . PHPWS_SOURCE_HTTP . 'mod/election/img/no-picture.gif\';</script>';
        $script[] = $this->getScript('user');
        $react = implode("\n", $script);
        \Layout::addStyle('election', 'style.css');
        \Layout::addStyle('election', 'User/style.css');
        $content = null;
        // Shows student data
        //$content .= '<pre>' . var_export($this->student, true) . '</pre>';
        $content .= <<<EOF
<div id="election"></div>
{$react}
EOF;
        $view = new \View\HtmlView($content);
        return $view;
    }
开发者ID:AppStateESS,项目名称:election,代码行数:17,代码来源:Election.php

示例14: week

 public function week()
 {
     if (PHPWS_Settings::get('calendar', 'use_calendar_style')) {
         Layout::addStyle('calendar');
     }
     $start_day = PHPWS_Settings::get('calendar', 'starting_day');
     $current_weekday = date('w', $this->calendar->current_date);
     if ($current_weekday != $start_day) {
         $week_start = $current_weekday - $start_day;
     } else {
         $week_start = 0;
     }
     $startdate = $this->calendar->current_date - 86400 * $week_start;
     $enddate = $startdate + 86400 * 7 - 1;
     $this->calendar->loadEventList($startdate, $enddate);
     if (PHPWS_Settings::get('calendar', 'use_calendar_style')) {
         Layout::addStyle('calendar');
     }
     $tpl = new PHPWS_Template('calendar');
     $tpl->setFile('view/week.tpl');
     $start_range = strftime(CALENDAR_WEEK_HEADER, $startdate);
     if (date('Y', $startdate) != date('Y', $enddate)) {
         $start_range .= strftime(', %Y', $startdate);
     }
     if (date('m', $startdate) == date('m', $enddate)) {
         $end_range = strftime('%e, %Y', $enddate);
     } else {
         $end_range = strftime(CALENDAR_WEEK_HEADER, $enddate);
         $end_range .= strftime(', %Y', $enddate);
     }
     $events_found = false;
     for ($i = $startdate; $i <= $enddate; $i += 86400) {
         $day_result = $this->getDaysEvents($i, $tpl);
         if ($day_result) {
             $events_found = true;
             $link = PHPWS_Text::linkAddress('calendar', array('date' => $i, 'view' => 'day'));
             $day_tpl['FULL_WEEKDAY'] = sprintf('<a href="%s">%s</a>', $link, strftime('%A', $i));
             $day_tpl['ABBR_WEEKDAY'] = sprintf('<a href="%s">%s</a>', $link, strftime('%a', $i));
             $day_tpl['DAY_NUMBER'] = sprintf('<a href="%s">%s</a>', $link, strftime('%e', $i));
             $tpl->setCurrentBlock('days');
             $tpl->setData($day_tpl);
             $tpl->parseCurrentBlock();
         }
     }
     if (!$events_found) {
         $tpl->setVariable('MESSAGE', dgettext('calendar', 'No events this week.'));
     }
     $main_tpl = $this->viewLinks('week');
     $main_tpl['DAY_RANGE'] = '<a href="index.php?module=calendar&amp;view=grid&amp;date=' . $startdate . '">' . sprintf(dgettext('calendar', 'From %s to %s'), $start_range, $end_range) . '</a>';
     $main_tpl['SCHEDULE_TITLE'] = $this->calendar->schedule->title;
     $main_tpl['FULL_YEAR'] = strftime('%Y', $this->calendar->current_date);
     $main_tpl['ABRV_YEAR'] = strftime('%y', $this->calendar->current_date);
     $main_tpl['SCHEDULE_PICK'] = $this->schedulePick();
     $main_tpl['PICK'] = $this->getDatePick();
     $main_tpl['SUGGEST'] = $this->suggestLink();
     $main_tpl['DOWNLOAD'] = $this->downloadLink($startdate, $enddate);
     if ($this->calendar->schedule->checkPermissions()) {
         $main_tpl['ADD_EVENT'] = '<button class="add-event btn btn-success" data-view="week" data-schedule-id="' . $this->calendar->schedule->id . '" data-date="' . $this->calendar->current_date * 1000 . '"><i class="fa fa-plus"></i> ' . dgettext('calendar', 'Add event') . '</button>';
     }
     $tpl->setData($main_tpl);
     return $tpl->get();
 }
开发者ID:par-orillonsoft,项目名称:phpwebsite,代码行数:62,代码来源:User.php

示例15: blockList

 public static function blockList()
 {
     Layout::addStyle('block');
     PHPWS_Core::initCoreClass('DBPager.php');
     $pageTags['NEW_BLOCK'] = PHPWS_Text::secureLink(dgettext('block', 'Create new block'), 'block', array('action' => 'new'), null, dgettext('block', 'Create new block'), 'button');
     $pageTags['NEW_BLOCK_URI'] = PHPWS_Text::linkAddress('block', array('action' => 'new'), true);
     $pageTags['CONTENT'] = dgettext('block', 'Content');
     $pageTags['ACTION'] = dgettext('block', 'Action');
     $pager = new DBPager('block', 'Block_Item');
     $pager->setModule('block');
     $pager->setTemplate('list.tpl');
     $pager->addToggle('class="bgcolor1"');
     $pager->addPageTags($pageTags);
     $pager->addRowTags('getTpl');
     $pager->addSortHeader('title', dgettext('block', 'Title'));
     $content = $pager->get();
     return $content;
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:18,代码来源:Block_Admin.php


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