<?php /* @var $this \yii\web\View */ /* @var $content string */ use yii\helpers\Html; use yii\bootstrap\Nav; use yii\bootstrap\NavBar; use yii\widgets\Breadcrumbs; use app\assets\AppAsset; 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
<?php use app\assets\AppAsset; use yii\helpers\Html; /* @var $this \yii\web\View */ /* @var $content string */ if (class_exists('backend\\assets\\AppAsset')) { backend\assets\AppAsset::register($this); } else { app\assets\AppAsset::register($this); } dmstr\web\AdminLteAsset::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); ?>
<?php use yii\helpers\Html; use yii\grid\GridView; use yii\widgets\ActiveForm; use app\models\Users; use app\assets\AppAsset; /* @var $this yii\web\View */ /* @var $form yii\bootstrap\ActiveForm */ /* @var $model app\models\LoginForm */ $this->title = 'Class List'; // $this->params['breadcrumbs'][] = $this->title; $bundle = AppAsset::register($this); ?> <div class="site-list"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a('Create Users', ['create'], ['class' => 'btn btn-success']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'StudentNumber', 'FirstName', 'MiddleName', 'LastName', 'ClassSection', ['class' => 'yii\\grid\\ActionColumn']]]);
<?php use yii\helpers\Html; use yii\helpers\Url; use app\assets\AppAsset; use yii\bootstrap\Nav; use yii\bootstrap\NavBar; use yii\widgets\Breadcrumbs; use app\widgets\Alert; use app\helpers\Bugitor; AppAsset::register($view); $view->beginPage();
/** * */ 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)); }
public function init() { AppAsset::register($this->getView()); NotifyJsAsset::register($this->getView()); }