<?php echo Html::csrfMetaTags(); ?> <title><?php echo Html::encode($this->title); ?> </title> <?php $this->head(); ?> </head> <body> <?php $this->beginBody(); $this->registerCssFile("/css/layout-main.css", ['depends' => [BootstrapAsset::className()]], 'css-print-theme'); ?> <div class="wrap"> <?php NavBar::begin(['brandLabel' => Html::img('/assets/images/logo-blanco.png', ['alt' => Yii::$app->name, 'style' => 'max-height:100%;']), 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]); $menuItems = [['label' => 'Home', 'url' => ['/site/index']], $menuItems[] = ['label' => 'About Us', 'url' => ['/site/about']]]; if (Yii::$app->user->isGuest) { $menuItems[] = ['label' => 'Signup', 'url' => ['/site/signup']]; $menuItems[] = ['label' => 'Login', 'url' => ['/site/login']]; } else { $menuItems[] = ['label' => Yii::t('app', Yii::t('app', "Change your address!")), 'url' => ['/site/changedirection']]; $menuItems[] = ['label' => 'Logout (' . Yii::$app->user->identity->username . ')', 'url' => ['/site/logout'], 'linkOptions' => ['data-method' => 'post']]; } echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => $menuItems]); NavBar::end();
<?php use backend\assets\AppAsset; use yii\bootstrap\BootstrapAsset; AppAsset::register($this); $this->registerCssFile('/matis/lib/bootstrap/css/bootstrap.min.css', ['depends' => BootstrapAsset::className()]); $this->registerCssFile('/matis/lib/font-awesome/css/font-awesome.min.css', ['depends' => BootstrapAsset::className()]); $this->registerCssFile('/matis/css/main.min.css', ['depends' => BootstrapAsset::className()]); $this->registerCssFile('/matis/lib/metismenu/metisMenu.min.css', ['depends' => BootstrapAsset::className()]); $this->registerCssFile('http://fonts.googleapis.com/css?family=Open+Sans:400,600,700', ['depends' => BootstrapAsset::className()]); $this->registerCssFile('http://fonts.googleapis.com/css?family=Kaushan+Script:400', ['depends' => BootstrapAsset::className()]); //$this->registerJsFile('/js/last/jquery.js', ['depends' => AppAsset::className()]); //$this->registerJsFile('/matis/lib/jquery/jquery.min.js', ['depends' => AppAsset::className()]); //$this->registerJsFile('/matis/lib/switch/js/bootstrap-switch.min.js', ['depends' => AppAsset::className()]); //$this->registerJsFile('/matis/lib/bootstrap/js/bootstrap.min.js', ['depends' => AppAsset::className()]); $this->registerJsFile('/matis/lib/modernizr/modernizr.min.js', ['depends' => AppAsset::className()]); $this->registerJsFile('/matis/lib/metismenu/metisMenu.min.js', ['depends' => AppAsset::className()]); $this->registerJsFile('/js/youtube.js', ['depends' => AppAsset::className()]); $this->registerJsFile('/js/custom/flash.js', ['depends' => AppAsset::className()]); $this->registerCssFile('/switch/bootstrap-switch.min.css', ['depends' => BootstrapAsset::className()]); $this->registerJsFile('/switch/bootstrap-switch.min.js', ['depends' => AppAsset::className()]);
public function init() { parent::init(); $this->sourcePath = __DIR__ . DIRECTORY_SEPARATOR . 'source'; $this->depends[] = WidgetGeneratorAsset::className(); $this->depends[] = BootstrapAsset::className(); }
/** * Renders the widget. */ public function run() { BootstrapAsset::register($this->getView()); $options = $this->options; $_id = $this->getId(); Html::addCssClass($options, $_id); return $this->renderTreeView($this->items, $options); }
/** * Registers the js code if necessary */ protected function registerJs() { if (static::$JS_REGISTERED) { return; } JqueryAsset::register($this->getView()); BootstrapAsset::register($this->getView()); $js = new JsExpression("\n\t\t\tvar widgetClass = 'widget-memory-tabs';\n\t\t\tvar storageName = 'widget-memory-tabs';\n\n\t\t\tvar hasStorage = function() {\n\t\t\t\tvar test = 'test';\n\t\t\t\ttry {\n\t\t\t\t\tsessionStorage.setItem(test, test);\n\t\t\t\t\tsessionStorage.removeItem(test);\n\t\t\t\t\treturn true;\n\t\t\t\t} catch(e) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (hasStorage) {\n\n\t\t\t\tvar loadData = function() {\n\t\t\t\t\tvar dataStr = sessionStorage.getItem(storageName);\n\t\t\t\t\tif (dataStr == null) return {};\n\t\t\t\t\treturn JSON.parse(dataStr);\n\t\t\t\t};\n\n\t\t\t\tvar saveData = function(dataObj) {\n\t\t\t\t\tdataStr = JSON.stringify(dataObj);\n\t\t\t\t\tsessionStorage.setItem(storageName, dataStr);\n\t\t\t\t};\n\n\t\t\t\tvar activateIndex = function(tabId, index) {\n\t\t\t\t\tvar tab = \$('#' + tabId);\n\t\t\t\t\tvar items = tab.children('li');\n\t\t\t\t\tif (items.length <= index) return;\n\n\t\t\t\t\t\$('#' + tabId + ' li:eq(' + index + ') a').tab('show');\n\t\t\t\t};\n\n\t\t\t\tvar initIndexes = function() {\n\t\t\t\t\tvar data = loadData();\n\t\t\t\t\tvar curUrl = window.location.href;\n\t\t\t\t\tif (data[curUrl] == null) return;\n\n\t\t\t\t\tvar tabs = \$('.' + widgetClass);\n\t\t\t\t\ttabs.each(function(i, el) {\n\t\t\t\t\t\tvar tabId = \$(this).attr('id');\n\t\t\t\t\t\tif (tabId != null) {\n\t\t\t\t\t\t\tvar index = data[curUrl][tabId];\n\t\t\t\t\t\t\tactivateIndex(tabId, index);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t};\n\n\t\t\t\tvar setIndex = function(tabId, index) {\n\t\t\t\t\tvar curUrl = window.location.href;\n\t\t\t\t\tvar data = loadData();\n\t\t\t\t\tif (data[curUrl] == null) data[curUrl] = {};\n\t\t\t\t\tdata[curUrl][tabId] = index;\n\n\t\t\t\t\tsaveData(data);\n\t\t\t\t};\n\n\t\t\t\t\$('.widget-memory-tabs > li > a').mouseup(function(event) {\n\t\t\t\t\tvar tabs = \$(this).closest('.' + widgetClass);\n\t\t\t\t\tvar selectedIndex = \$(this).parent().prevAll().length;\n\n\t\t\t\t\tsetIndex(tabs.attr('id'), selectedIndex);\n\t\t\t\t});\n\n\t\t\t\tinitIndexes();\n\t\t\t}\n\t\t"); $this->view->registerJs($js); static::$JS_REGISTERED = true; }
/** * @return string */ public function actionIndex() { $model = new ApplicantForm(); if ($model->load(Yii::$app->request->post()) && $model->validate()) { $fileName = time() . '.pdf'; $filePath = Yii::getAlias('@webroot/files/' . time() . '.pdf'); $this->layout = 'pdf'; $this->view->params['css'] = [file_get_contents(Yii::getAlias('@webroot/css/pdf.css'))]; $html = $this->render('pdf', ['model' => $model]); $pdf = new \DOMPDF(); $pdf->set_base_path(Yii::$app->assetManager->getBundle(BootstrapAsset::className())->basePath . '/css'); $pdf->load_html($html); $pdf->render(); $output = $pdf->output(); file_put_contents($filePath, $output); Yii::$app->session->setFlash('reportGenerated'); Yii::$app->session->setFlash('reportURL', Url::to(['files/' . $fileName])); return $this->refresh(); } return $this->render('index', ['model' => $model]); }
public function getCKEditorStylesheets() { // No cached version found if (!$this->_ckEditorStylesheets) { // Get the bootstrap asset url $bootstrapAsset = BootstrapAsset::register(Yii::$app->view); // Add default css $css = [$bootstrapAsset->baseUrl . '/css/bootstrap.min.css', Yii::getAlias('@frontendUrl') . '/css/main.css', Yii::getAlias('@frontendUrl') . '/css/editor.css']; // Add font assets if they exist if (class_exists('\\frontend\\assets\\FontAsset')) { // Get the font asset $fontAsset = new FontAsset(); // Add google fonts foreach ($fontAsset->css as $font) { $css[] = $fontAsset->basePath . '/' . $font; } } $this->_ckEditorStylesheets = $css; } return $this->_ckEditorStylesheets; }
public function init() { if ($this->useNativeBootstrap == true) { \Yii::info('Registering a bootstrap assets', __METHOD__); $this->view->registerAssetBundle(BootstrapAsset::className(), View::POS_HEAD); $this->view->registerAssetBundle(BootstrapPluginAsset::className(), View::POS_HEAD); } $this->view->registerAssetBundle(AssetBundle::className(), View::POS_BEGIN); $this->options['id'] = $this->id; if (!empty($this->value) && !isset($this->sliderOptions['value'])) { $this->sliderOptions['value'] = $this->value; } if (strtolower($this->mode) === 'js') { $this->view->registerJs(sprintf('var slider%1$s = window.slider%1$s = new Slider(\'#%2$s\',%3$s);', Inflector::id2camel($this->id), $this->id, Json::encode($this->sliderOptions)), View::POS_END); } elseif (strtolower($this->mode) === 'data') { $data = ['provide' => 'slider']; foreach ($this->sliderOptions as $k => $v) { $data[sprintf('slider-%s', $k)] = $v; } $this->options['data'] = $data; } else { throw new InvalidParamException('A \'mode\' must be set to \'data\' or \'js\'!'); } }
<!DOCTYPE html> <html> <head> <meta charset="<?php echo Yii::$app->charset; ?> "/> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?php echo Html::encode($this->title); ?> </title> <?php // Css $this->registerCssFile($this->theme->baseUrl . '/font-awesome/css/font-awesome.min.css', ['depends' => \yii\bootstrap\BootstrapAsset::className()]); $this->registerCssFile($this->theme->baseUrl . '/css/style.css', ['depends' => \yii\bootstrap\BootstrapAsset::className()]); ?> <?php $this->head(); ?> </head> <body class="gray-bg"> <?php $this->beginBody(); ?> <?php echo $content; ?> <?php $this->endBody();
<?php use app\models\Transport; use yii\bootstrap\BootstrapAsset; use yii\helpers\Html; use yii\helpers\Url; use yii\jui\AutoComplete; use yii\jui\DatePicker; use yii\web\JsExpression; use yii\widgets\ActiveForm; /* @var $this yii\web\View */ /* @var $model app\models\Transport */ /* @var $form yii\widgets\ActiveForm */ $this->registerCssFile(Yii::getAlias('@web') . '/css/transport.css', ['depends' => [BootstrapAsset::className()]]); $this->registerJsFile(Yii::getAlias('@web') . '/js/transport.js', ['depends' => [\yii\web\JqueryAsset::className()]]); ?> <div class="transport-form"> <?php $form = ActiveForm::begin(); ?> <h4><?php echo Yii::t('app', 'Route'); ?> </h4> <?php echo $form->field($model, 'charge_city_id')->widget(AutoComplete::className(), ['clientOptions' => ['source' => Url::to(['site/autocomplete']), 'autoFill' => true, 'minLength' => '3', 'select' => new JsExpression("function(event, ui) {\n this.value = ui.item.label;\n \$('#city_input1').val(ui.item.value);\n return false;\n }")], 'options' => ['id' => 'charge_city', 'class' => 'form-control', 'placeholder' => Yii::t('app', 'Start typing the name')]]); ?> <?php echo $form->field($model, 'charge_city_id')->hiddenInput(['id' => 'city_input1'])->label(false);
<?php require_once '../components/MainView.php'; require_once '../models/Languages.php'; use app\components\MainView; use app\models\Languages; $params = array_merge(require __DIR__ . '/params.php', require __DIR__ . '/params-local.php'); $config = ['id' => 'basic', 'language' => 'en-US', 'basePath' => dirname(__DIR__), 'bootstrap' => ['log'], 'defaultRoute' => 'site/login', 'aliases' => ['@file_save_dir' => '@app/web/files/', '@file_view_url' => '/files/', '@beacon_save_dir' => '@app/web/beacon_images/', '@beacon_view_url' => '/beacon_images', '@backend_beacon_view_dir' => '@app/web/beacon_images', '@frontend_beacon_view_dir' => '@app/web/beacon_images'], 'components' => ['cache' => ['class' => 'yii\\caching\\FileCache'], 'view' => ['class' => 'app\\components\\MainView'], 'user' => ['identityClass' => 'app\\models\\Users', 'enableAutoLogin' => true], 'assetManager' => ['bundles' => [\yii\web\JqueryAsset::className() => ['js' => ["http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js", "http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"], 'jsOptions' => ['position' => MainView::POS_HEAD]], \yii\bootstrap\BootstrapAsset::className() => ['baseUrl' => '@web', 'basePath' => '@webroot', 'css' => ['css/bootstrap.min.css']], \yii\bootstrap\BootstrapPluginAsset::className() => ['js' => ['https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js']]], 'appendTimestamp' => true], 'errorHandler' => ['errorAction' => 'site/error'], 'urlManager' => ['enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => ['<controller:\\w+>/<id:\\d+>' => '<controller>/view', '<controller:\\w+>/<action:\\w+>/<id:\\d+>' => '<controller>/<action>', '<controller:\\w+>/<action:\\w+>' => '<controller>/<action>']], 'authManager' => ['class' => yii\rbac\DbManager::className(), 'cache' => 'cache', 'defaultRoles' => ['super_admin', 'admin', 'user', 'promo_user']], 'apcCache' => ['class' => yii\caching\MemCache::className()], 'mailer' => ['class' => '\\zyx\\phpmailer\\Mailer', 'viewPath' => '@app/mail', 'useFileTransport' => false, 'messageConfig' => ['from' => ['*****@*****.**' => 'Beacon CMS']]], 'log' => ['traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [['class' => 'yii\\log\\FileTarget', 'levels' => ['error', 'warning']]]], 'session' => ['class' => 'yii\\web\\DbSession'], 'i18n' => ['translations' => ['*' => ['class' => 'yii\\i18n\\DbMessageSource', 'sourceLanguage' => 'en-US', 'forceTranslation' => true]]], 'languagepicker' => ['class' => '\\lajax\\languagepicker\\widgets\\LanguagePicker', 'languages' => function () { return Languages::getLanguageNames(true); }]], 'params' => $params]; return $config;
<?php /* @var $this yii\web\View */ /* @var $form yii\bootstrap\ActiveForm */ /* @var $model \frontend\models\ContactForm */ // use yii\helpers\Html; // use yii\bootstrap\ActiveForm; // use yii\captcha\Captcha; use yii\helpers\Url; use yii\bootstrap\BootstrapAsset; $this->registerCssFile("/statics/style/all-18bb1055.css", [BootstrapAsset::className()]); $this->registerCssFile("/statics/style/family=Lato&subset=latin,latin-ext.css", [BootstrapAsset::className()]); $this->registerCssFile("/statics/style/family.css", [BootstrapAsset::className()]); $this->title = '象记'; $this->params['breadcrumbs'][] = $this->title; ?> <div id="main" role="main"> <nav> <a href="/"> <img width="200" class="logo" src="/statics/images/oozou-5a43422c.gif" /> </a> <h1 class='blog-title'>Welcome to the Oozou Blog</h1> <p>Edited by the marvellous people of <a href="http://oozou.com">Oozou</a></p> </nav> <div class="article-summary"> <h4><a href="an-intro-to-otp-in-elixir.html">Towards a More Maintainable CSS</a></h4> <p>Or, what I learned from building our new Oozou website.</p> <div class="article-info"> <img width="30" src="/statics/images/Thai-1fcc6e94.png" /> By <span class="author">Thai Pangsakulyanont</span> - <span>March 3, 2015</span> <span class="tags"><a href="an-intro-to-otp-in-elixir.html">css</a></span> </div> </div>
/** * Renders the widget. */ public function run() { echo Html::beginTag('div', $this->options) . "\n"; echo $this->renderProgress() . "\n"; echo Html::endTag('div') . "\n"; BootstrapAsset::register($this->getView()); }
<?php //классы стилей добавлять в frontend/web/css/our-cars.css //$accountModel->name Название аккаунта //$accountModel->phone телефон //$accountModel->url - ссылка на сайт //$accountModel->address - адрес салона //$accountModel->balance - баланс use yii\helpers\Html; use yii\helpers\Url; use yii\widgets\ListView; use yii\web\View; $this->registerCssFile('/css/ourCars.css', ['depends' => [\yii\bootstrap\BootstrapAsset::className()], 'position' => View::POS_END]); $Punycode = new \idna_convert(array('idn_version' => 2008)); $siteUrl = parse_url($accountModel->url); if (isset($siteUrl['host'])) { $siteUrl['host'] = $Punycode->decode($siteUrl['host']); $siteUrl = Html::encode($siteUrl['scheme'] . '://' . $siteUrl['host']); } else { $siteUrl = Html::encode($accountModel->url); } ?> <div class="container system-our-cars"> <div class="row" style="margin-bottom:20px;"> <div class="col-xs-12"> <?php echo $this->render('_breadscrumb2', ['model' => $accountModel]); ?> </div> </div>
/** * Renders the widget. */ public function run() { echo $this->renderItems(); echo Html::endTag('div'); BootstrapAsset::register($this->getView()); }
public function init() { parent::init(); $bundle = \yii\bootstrap\BootstrapAsset::register(\Yii::$app->view); $this->editorOptions = \mihaildev\elfinder\ElFinder::ckeditorOptions('/admin/file-manager-elfinder', ['preset' => 'full', 'extraPlugins' => 'codemirror', 'entities' => false, 'allowedContent' => true, 'baseHref' => \Yii::$app->homeUrl, 'contentsCss' => [$bundle->baseUrl . '/css/bootstrap.css', '/main.css']]); }
foreach ($modelGroup as $groupSales) { $items[] = ['label' => $groupSales['name'], 'url' => ['', 'group' => $groupSales['id'], 'year' => $year]]; } echo Dropdown::widget(['items' => $items]); ?> </span> IN <span id="tahunCreateTitle" class="dropdown"> <a href="#" data-toggle="dropdown" class="dropdown-toggle"><?php echo Html::encode($year); ?> </a> <?php $start = 2014; $end = date('Y'); $items = []; for ($iYear = $start; $iYear <= $end; $iYear++) { $items[] = ['label' => $iYear, 'url' => ['', 'group' => $group_active, 'year' => $iYear]]; } echo Dropdown::widget(['items' => $items]); ?> </span> </h3> <?php // View::registerCssFile('@web/css/bootsnip-timeline.css'); View::registerCssFile('@web/css/moTimeline.css', ['depends' => [BootstrapAsset::className()]]); echo Tabs::widget(['items' => [['label' => '<span class="glyphicon glyphicon-tasks"></span>', 'encode' => false, 'content' => $this->render('timeline2', ['dataProvider' => $dataProvider]), 'active' => true], ['label' => '<span class="glyphicon glyphicon-stats"></span>', 'encode' => false, 'content' => $this->render('charts', ['charts' => $charts, 'series' => $series])], ['label' => '<span class="glyphicon glyphicon-search"></span>', 'encode' => false, 'content' => $this->render('_search', ['model' => $salesActivityForm])]]]); ?>
//$model->w_driver; - с водитем (Y-да, N-нет, empty); //$model->account->name Название аккаунта //$model->account->phone телефон //$model->account->url - ссылка на сайт //$model->account->address - адрес салона //$model->account->balance - баланс use yii\helpers\Html; use yii\helpers\Url; use yii\widgets\MaskedInput; use yii\widgets\DetailView; use app\components\KirovCalendarClass\KirovCalendarClass; use app\modules\profile\models\Rentact; use app\modules\profile\models\Busy; use yii\widgets\ActiveForm; use yii\widgets\Pjax; $this->registerCssFile('/css/reserve-a-car.css', ['depends' => [\yii\bootstrap\BootstrapAsset::className()]], 'css-reserve-a-car-theme'); $this->registerJsFile('/js/reserve-a-car.js', ['depends' => [\yii\web\JqueryAsset::className()]]); $this->registerCssFile('/css/magnific.css'); $this->registerJsFile('/js/magnific.js', ['depends' => [\yii\web\JqueryAsset::className()]]); $allday = array(); $actives = array(); $rentact = Rentact::find()->where(['system_id' => $model->id])->all(); foreach ($rentact as $itm) { $allday[] = $itm->day; } $beetween = array(); $cur_m_n = date('n'); $cur_m_n = intval($cur_m_n); // текущий месяц $cur_y_n = date('Y'); $cur_y_n = intval($cur_y_n);
<?php use yii\helpers\Url; use yii\bootstrap\BootstrapAsset; /* @var $this yii\web\View */ $this->registerCssFile("/statics/style/style-894e3466.css", [BootstrapAsset::className()]); $this->title = '象记首页'; ?> <header class="jumbotron jumbotron-m-index"> <div class="jumbotron--background"> </div> <div class="jumbotron--content introduction"> <h1 class="introduction--logo">Oozou</h1> <p class="what-we-do"> We Handcraft <span class="what-we-do--emphasis"><strong>Web</strong> & <strong>Mobile</strong></span> <span class="what-we-do--emphasis">Applications</span> </p> <hr> <p class="introduction--description">Expert Design & Development</p> <a class="introduction--button button button-m-white-transparent js-scrollto" href="#welcome">Find out more</a> <div class="introduction--scroll-down"> <a class='js-scrollto' href="#welcome"><span class="fa fa-angle-double-down"></span><span class="u-sr-only"></span></a> </div> </div> </header> <div class="navbar-container navbar-container-m-sticky js-sticky">
/** * Renders the widget. */ public function run() { BootstrapAsset::register($this->getView()); return $this->renderItems(); }
/** * Renders the widget. */ public function run() { BootstrapAsset::register($this->getView()); return implode("\n", [Html::beginTag('div', $this->options), $this->renderProgress(), Html::endTag('div')]) . "\n"; }
<?php use yii\helpers\Html; use yii\bootstrap\BootstrapAsset; BootstrapAsset::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 echo YII_DEBUG ? 'Development' : ''; ?> </title> <?php $this->head(); ?>
/** * Renders the widget. */ public function run() { BootstrapAsset::register($this->getView()); return Html::tag('div', $this->renderButtons(), $this->options); }
<?php use yii\web\View; /* @var $this \yii\web\View */ /* @var $content string */ \yii\bootstrap\BootstrapAsset::register($this); ?> <?php $this->beginContent('@app/modules/admin/views/layouts/bootstrap.php'); ?> <?php echo $content; ?> <?php $script = <<<JS \$(window) .on('beforeunload', function(){ window.top.postMessage('iframeBeforeUnload', '*'); }) .on('unload', function() { window.top.postMessage('iframeUnload', '*'); }); JS; $this->registerJs($script, View::POS_READY); ?>
<?php use yii\helpers\Html; use yii\helpers\Url; use yii\widgets\ActiveForm; use kartik\file\FileInput; use yii\web\View; use yii\widgets\MaskedInput; $this->registerCssFile('/css/profile/system-form.css', ['depends' => [\yii\bootstrap\BootstrapAsset::className()], 'position' => View::POS_END]); /* @var $this yii\web\View */ /* @var $model frontend\modules\profile\models\SystemAuto */ /* @var $form yii\widgets\ActiveForm */ if (!empty($model->photo)) { $prluginOptions = ['showCaption' => false, 'showRemove' => false, 'showUpload' => false, 'browseClass' => 'btn btn-primary btn-block', 'browseLabel' => 'Загрузить фото', 'previewFileType' => 'any', 'initialPreview' => [Html::img($model->photo, ['class' => 'file-preview-image'])]]; } else { $prluginOptions = ['showCaption' => false, 'showRemove' => false, 'showUpload' => false, 'browseClass' => 'btn btn-primary btn-block', 'browseLabel' => 'Загрузить фото', 'previewFileType' => 'any']; } ?> <?php $form = ActiveForm::begin(['options' => ['action' => 'profile/system/create', 'enctype' => 'multipart/form-data', 'enableClientValidation' => false, 'validateOnSubmit' => false, 'validateOnBlur' => false]]); ?> <div class="system-auto-form"> <?php echo $form->errorSummary($model); ?> <div class="row"> <?php
<?php use backend\assets\AppAsset; use yii\bootstrap\BootstrapAsset; AppAsset::register($this); $this->registerCssFile('/css/bootstrap.css', ['depends' => BootstrapAsset::className()]); $this->registerCssFile('/css/responsive.css', ['depends' => BootstrapAsset::className()]); $this->registerCssFile('/css/camera.css', ['depends' => BootstrapAsset::className()]); $this->registerCssFile('/css/style.css', ['depends' => BootstrapAsset::className()]); //$this->registerCssFile('http://fonts.googleapis.com/css?family=Open+Sans:400,600,700', ['depends' => BootstrapAsset::className()]); //$this->registerCssFile('http://fonts.googleapis.com/css?family=Kaushan+Script:400', ['depends' => BootstrapAsset::className()]); $this->registerJsFile('/js/jquery.js', ['depends' => AppAsset::className()]); $this->registerJsFile('/js/jquery.easing.1.3.js', ['depends' => AppAsset::className()]); $this->registerJsFile('/js/camera.js', ['depends' => AppAsset::className()]); $this->registerJsFile('/js/jquery.ui.totop.js', ['depends' => AppAsset::className()]); $this->registerJsFile('/js/jquery.mobile.customized.min.js', ['depends' => AppAsset::className()]); $this->registerJsFile('/js/bootstrap.js', ['depends' => AppAsset::className()]); $this->registerJsFile('/js/custom/index.js', ['depends' => AppAsset::className()]); //$this->registerJsFile('/js/superfish.js', ['depends' => AppAsset::className()]); //$this->registerJsFile('/js/custom/header.js', ['depends' => AppAsset::className()]); //$this->registerJsFile('/js/forms.js', ['depends' => AppAsset::className()]); //$this->registerJsFile('/js/jquery.cookie.js', ['depends' => AppAsset::className()]); ?> <style> @font-face { font-family: kaushan; /* Гарнитура шрифта */ src: url('/fonts/kaushan.ttf'); /* Путь к файлу со шрифтом */ } .logo { font-family: kaushan!important;
<?php /** * Created by Alex Semenov hejvkt@yandex.ru. * Author: Alex Semenov * Date: 08.11.2015 */ use yii\widgets\ActiveForm; use yii\helpers\Html; use yii\helpers\Url; use frontend\modules\profile\models\Rentact; use yii\bootstrap\Alert; use frontend\modules\account\Module; use yii\helpers\Json; $this->registerCssFile('/css/reserve-a-car.css', ['depends' => [\yii\bootstrap\BootstrapAsset::className()]], 'css-reserve-a-car-theme'); $this->registerCssFile('/js/datepicker/datepicker.css', ['depends' => [\yii\bootstrap\BootstrapAsset::className()]], 'css-reserve-a-car-theme2'); $this->registerJsFile('/js/reserve-a-car.js', ['depends' => [\yii\web\JqueryAsset::className()]]); $this->registerJsFile('/js/moment.min.js', ['depends' => [\yii\web\JqueryAsset::className()]]); $this->registerJsFile('/js/datepicker/datepicker.js', ['depends' => [\yii\web\JqueryAsset::className()]]); $this->registerCssFile('/css/magnific.css'); $this->registerJsFile('/js/magnific.js', ['depends' => [\yii\web\JqueryAsset::className()]]); $this->registerJsFile('/js/moment.min.js', ['depends' => [\yii\web\JqueryAsset::className()]]); $rentact = Rentact::find()->asclients()->where(['system_id' => $systemModel->id])->active()->asArray()->all(); $rentact = Json::encode($rentact); $errors = $rentModel->getErrors(); if (!empty($errors)) { $errorSumText = ''; foreach ($errors as $attr => $errorsAttr) { foreach ($errorsAttr as $errorText) { if (!is_integer($errorText)) { $errorSumText .= $errorText . "<br/>";
?> "> <head> <meta charset="<?php echo Yii::$app->charset; ?> "/> <meta name="viewport" content="width=device-width, initial-scale=1"> <title><?php echo Html::encode($this->title); ?> </title> <?php // Css $this->registerCssFile($this->theme->baseUrl . '/assets/css/letbootstrap.css', [\yii\bootstrap\BootstrapAsset::className()]); $this->registerCssFile($this->theme->baseUrl . '/assets/css/let.css', [\yii\bootstrap\BootstrapAsset::className()]); // Javascript // $this->registerJsFile($this->theme->baseUrl . '/assets/js/let.js', [\yii\web\JqueryAsset::className()]); ?> <?php $this->head(); ?> </head> <body> <?php $this->beginBody(); ?> <div class="wrap"> <?php echo $this->render('//block/_box_menu'); ?>
/** * * @param \yii\web\Application $app */ public function bootstrap($app) { $app->set('view', ['class' => 'yii\\web\\View', 'theme' => ['pathMap' => ['' => '']]]); $view = $app->getView(); $pathMap = []; if (!isset($this->features['datecontrol'])) { $this->features['datecontrol'] = true; } if ($this->features['datecontrol'] != false) { $app->setModules(['datecontrol' => ['class' => '\\kartik\\datecontrol\\Module', 'displaySettings' => [\kartik\datecontrol\Module::FORMAT_DATE => 'dd-MM-yyyy', \kartik\datecontrol\Module::FORMAT_TIME => 'HH:mm:ss', \kartik\datecontrol\Module::FORMAT_DATETIME => 'dd-MM-yyyy HH:mm:ss'], 'saveSettings' => [\kartik\datecontrol\Module::FORMAT_DATE => 'php:Y-m-d', \kartik\datecontrol\Module::FORMAT_TIME => 'php:H:i:s', \kartik\datecontrol\Module::FORMAT_DATETIME => 'php:Y-m-d H:i:s'], 'autoWidget' => true, 'autoWidgetSettings' => [\kartik\datecontrol\Module::FORMAT_DATE => ['pluginOptions' => ['autoclose' => true]], \kartik\datecontrol\Module::FORMAT_DATETIME => ['pluginOptions' => ['autoclose' => true]], \kartik\datecontrol\Module::FORMAT_TIME => ['pluginOptions' => ['autoclose' => true]]]]]); Yii::$container->set('kartik\\datecontrol\\DateControl', ['ajaxConversion' => false]); } if (!isset($this->features['gridview'])) { $this->features['gridview'] = true; } if ($this->features['gridview'] != false) { $app->setModules(['gridview' => ['class' => '\\kartik\\grid\\Module']]); } if (!isset($this->features['gii'])) { $this->features['gii'] = true; } if ($this->features['gii'] != false) { $app->setModules(['gii' => ['class' => 'yii\\gii\\Module', 'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.*', '192.168.178.20'], 'generators' => ['crud' => ['class' => 'hscstudio\\heart\\modules\\gii\\crud\\Generator', 'templates' => ['my' => '@hscstudio/heart/modules/gii/crud/default']]]]]); } if (!isset($this->features['privilege'])) { $this->features['privilege'] = true; } if ($this->features['privilege'] != false) { $authManager = ArrayHelper::remove($this->features['privilege'], 'authManager', ['class' => 'yii\\rbac\\DbManager']); $allowActions = ArrayHelper::remove($this->features['privilege'], 'allowActions', ['debug/*', 'site/*', 'gii/*', 'privilege/*', 'gridview/*']); $app->set('authManager', $authManager); $app->setModule('privilege', array_merge(['class' => '\\mdm\\admin\\Module', 'layout' => '@hscstudio/heart/views/layouts/column2'], $this->features['privilege'])); $app->attachBehavior('access', ['class' => '\\mdm\\admin\\components\\AccessControl', 'allowActions' => $allowActions]); //$app->getModule('privilege')->bootstrap($app); /* $pathMap['@mdm/admin/views'] = '@hscstudio/heart/modules/admin/views'; */ } $pathMap['@app/views/layouts'] = '@hscstudio/heart/views/layouts'; if (!empty($pathMap)) { $view->theme = Yii::createObject(['class' => 'yii\\base\\Theme', 'pathMap' => $pathMap]); } $assets = $view->assetManager->publish('@hscstudio/heart/assets/heart'); $view->registerCssFile($assets[1] . '/css/heart.css', ['depends' => [BootstrapAsset::className()]], 'css-heart'); $view->registerCssFile($assets[1] . '/css/metroui.css', ['depends' => [BootstrapAsset::className()]], 'css-metroui'); $view->registerCssFile($assets[1] . '/css/family-tree.css', ['depends' => [BootstrapAsset::className()]], 'css-family-tree'); $view->registerJsFile($assets[1] . '/js/heart.js', ['depends' => [BootstrapPluginAsset::className()]]); $css = ' .overlay, .loading-img { position: fixed; top: 0; left: 0; width: 100%; height: 100%; } .overlay { z-index: 1010; background: rgba(255, 255, 255, 0.7); } .overlay.dark { background: rgba(0, 0, 0, 0.5); } .loading-img { z-index: 1020; background: transparent url("' . $assets[1] . '/img/ajax-loader1.gif") 50% 20% no-repeat; } .bootstrap-switch { min-width:125px !important; } '; $view->registerCss($css); $view->registerJsFile($assets[1] . '/js/bootstrap-growl.min.js', ['depends' => [BootstrapPluginAsset::className()]]); \yii\base\Event::on('yii\\web\\Controller', 'beforeAction', function ($event) { if ($event->sender->uniqueId == 'site') { $event->sender->layout = 'column1'; } }); }
<?php use yii\helpers\Html; use yii\helpers\Url; use yii\widgets; $this->registerAssetBundle(\yii\web\YiiAsset::className(), \yii\web\View::POS_HEAD); $this->registerAssetBundle(\yii\bootstrap\BootstrapAsset::className(), \yii\web\View::POS_HEAD); $this->registerAssetBundle(\app\assets\AppAsset::className(), \yii\web\View::POS_HEAD); $this->beginPage(); ?> <!DOCTYPE html> <html lang="<?php echo Yii::$app->language; ?> "> <head> <meta charset="<?php echo Yii::$app->charset; ?> "/> <link rel="icon" type="image/png" href="/img/fav.png" /> <title><?php echo Html::encode($this->title); ?> </title> <?php $this->head(); ?> <?php echo Html::csrfMetaTags(); ?>