<?php use backend\assets\AppAsset; use yii\helpers\Html; use yii\widgets\Breadcrumbs; use yii\helpers\Url; /* @var $this \yii\web\View */ /* @var $content string */ AppAsset::register($this); $this->beginPage(); ?> <!DOCTYPE html> <html lang="<?php echo Yii::$app->language; ?> "> <head> <meta charset="<?php echo Yii::$app->charset; ?> "> <meta name="viewport" content="width=device-width, initial-scale=1"> <?php echo Html::csrfMetaTags(); ?> <title><?php echo Html::encode($this->title); ?> </title> <?php $this->head();
/** * */ public function registerClientScript() { $view = $this->getView(); if ($this->language !== null) { $this->clientOptions['locale'] = $this->language; AppAsset::register($view)->js[] = $this->localePath . $this->language . '.js'; } else { AppAsset::register($view); } $id = $this->options['id']; $selector = "jQuery('#{$id}')"; if (strpos($this->template, '{button}') !== false) { $selector .= ".parent()"; } $options = !empty($this->clientOptions) ? Json::encode($this->clientOptions) : ''; $js[] = "{$selector}.datetimepicker({$options});"; if (!empty($this->clientEvents)) { foreach ($this->clientEvents as $event => $handler) { $js[] = "{$selector}.on('{$event}', {$handler});"; } } $view->registerJs(implode("\n", $js)); }
<?php use yii\helpers\Html; use yii\helpers\Url; use yii\widgets\Breadcrumbs; use yii\widgets\Menu; \backend\assets\AppAsset::register($this); $this->title = $this->title . " | Панель Управления"; $this->beginPage(); ?> <!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta charset="<?php echo Yii::$app->charset; ?> "> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> <?php echo Html::csrfMetaTags(); ?> <title><?php echo Html::encode($this->title); ?> </title> <?php $this->head(); ?> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
/** * Renders the widget. */ public function run() { AppAsset::register($this->getView()); return $this->renderItems($this->items, $this->options); }