示例#1
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     Metronic::registerThemeAsset($this->getView());
     Html::addCssClass($this->options, 'page-sidebar-menu');
     if (!$this->visible || Metronic::getComponent()->layoutOption == Metronic::LAYOUT_FULL_WIDTH) {
         Html::addCssClass($this->options, 'visible-sm visible-xs');
     }
 }
示例#2
0
 /**
  * Renders toggle button
  * @return string the rendering result
  */
 protected function renderToggleButton()
 {
     return Html::tag('a', Html::img(Metronic::getAssetsUrl($this->view) . '/img/menu-toggler.png'), ['href' => '#', 'class' => 'navbar-toggle', 'data-toggle' => 'collapse', 'data-target' => '.navbar-collapse']);
 }
示例#3
0
                <!-- END PAGE CONTENT-->
            </div>
        </div>
        <!-- END CONTENT -->
    </div>
    <!-- END CONTAINER -->
    <!-- BEGIN FOOTER -->
    <div class="footer">
        <div class="footer-inner">
            <?php 
echo date('Y');
?>
 &copy; YiiMetronic.
        </div>
        <div class="footer-tools">
		<span class="go-top">
			<i class="fa fa-angle-up"></i>
		</span>
        </div>
    </div>
    <?php 
echo Metronic::getComponent()->layoutOption == Metronic::LAYOUT_BOXED ? Html::endTag('div') : '';
?>
    <?php 
$this->endBody();
?>
    </body>
    <!-- END BODY -->
    </html>
<?php 
$this->endPage();
示例#4
0
 /**
  * Renders the widget.
  */
 public function run()
 {
     if (!empty($this->scroller)) {
         echo Html::endTag('div');
         $footer = ArrayHelper::getValue($this->scroller, 'footer', '');
         if (!empty($footer)) {
             echo Html::beginTag('div', ['class' => 'scroller-footer']);
             if (is_array($footer)) {
                 echo Html::tag('div', Link::widget($footer), ['class' => 'pull-right']);
             } elseif (is_string($footer)) {
                 echo $footer;
             }
             echo Html::endTag('div');
         }
     }
     echo Html::endTag('div');
     // End portlet body
     echo Html::endTag('div');
     // End portlet div
     $loader = Html::img(Metronic::getAssetsUrl($this->view) . '/img/loading-spinner-grey.gif');
     $this->clientOptions['loader'] = ArrayHelper::getValue($this->clientOptions, 'loader', $loader);
     $this->registerPlugin('portlet');
 }
示例#5
-1
 public static function getHtmlOptions($tag, $asString = true)
 {
     $tag = strtolower($tag);
     $options = [];
     switch ($tag) {
         case 'body':
             if (strcasecmp(Metronic::getComponent()->headerOption, 'fixed') === 0) {
                 Html::addCssClass($options, 'page-header-fixed');
             }
             switch (Metronic::getComponent()->layoutOption) {
                 case Metronic::LAYOUT_FULL_WIDTH:
                     Html::addCssClass($options, Metronic::LAYOUT_FULL_WIDTH);
                     break;
                 case Metronic::LAYOUT_BOXED:
                     Html::addCssClass($options, Metronic::LAYOUT_BOXED);
                     break;
             }
             break;
         case 'header':
             Html::addCssClass($options, 'header navbar');
             if (strcasecmp(Metronic::getComponent()->headerOption, 'fixed') === 0) {
                 Html::addCssClass($options, 'navbar-fixed-top');
             } else {
                 Html::addCssClass($options, 'navbar-static-top');
             }
             break;
     }
     return $asString ? Html::renderTagAttributes($options) : $options;
 }