private function getLessonsList($lessons_array, $week, $day) { foreach ($lessons_array as $key => $element) { if ($element->week != $week || $element->day != $day) { unset($lessons_array[$key]); } } $lessons = $lessons_array; $items = array(); $result = array(); foreach ($lessons as $lesson) { foreach ($this->attributes as $attr) { if ($attr == $this->group) { $items[] = Html::tag('td', Html::a($lesson->{$attr}, Url::to(['//group/view', 'id' => $lesson->groupHasDiscipline->group->id]))); } elseif ($attr == $this->teacher) { $items[] = Html::tag('td', Html::button($lesson->{$attr}, ['value' => Url::to(['//teacher/view', 'id' => $lesson->teacherHasDiscipline->teacher->id]), 'class' => 'btn-link modalButton'])); } elseif ($attr == $this->discipline && (Yii::$app->user->can('chief') || isset(Yii::$app->user->identity->student) && $lesson->groupHasDiscipline->checkStudent(Yii::$app->user->identity->student->id) || isset(Yii::$app->user->identity->teacher) && $lesson->groupHasDiscipline->checkTeacher(Yii::$app->user->identity->teacher->id))) { $items[] = Html::tag('td', Html::a($lesson->groupHasDiscipline->discipline->name, Url::to(['//group-has-discipline', 'id' => $lesson->groupHasDiscipline->id]), ['class' => 'btn-link'])); } else { $items[] = Html::tag('td', $lesson->{$attr}); } } $result[] = Html::tag('tr', implode("\n", $items)); $items = null; } return Html::tag('tr', implode("\n", $result)); }
public function getFileLink($class = false) { if (!$class) { $class = ''; } return Html::a($this->vneshnee_imya_fajla, $this->getUri(), ['class' => 'file_item ' . $class, 'data-file-id' => $this->id]); }
/** * Initializes the default button rendering callbacks. */ protected function initDefaultButtons() { /* TODO: Add support! if (!isset($this->buttons['view'])) { $this->buttons['view'] = function ($url, $model, $key) { $options = array_merge([ 'title' => self::t('yii', 'View'), 'aria-label' => self::t('yii', 'View'), 'data-pjax' => '0', ], $this->buttonOptions); return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', $url, $options); }; } */ if (!isset($this->buttons['update'])) { $this->buttons['update'] = function ($url, $model, $key) { $options = array_merge(['title' => self::t('messages', 'Edit'), 'aria-label' => self::t('messages', 'Edit'), 'data-pjax' => '0'], $this->buttonOptions); return Html::a(trim(Icon::show('pencil')), $url, $options); }; } if (!isset($this->buttons['copy'])) { $this->buttons['copy'] = function ($url, $model, $key) { $options = array_merge(['title' => self::t('messages', 'Copy'), 'aria-label' => self::t('messages', 'Copy')], $this->buttonOptions); if ($model->hasMethod('duplicate') && ($model->hasAttribute('removed') && !$model->removed)) { return Html::a(trim(Icon::show('copy')), $url, $options); } }; } if (!isset($this->buttons['lock'])) { $this->buttons['lock'] = function ($url, $model, $key) { $options = array_merge(['title' => self::t('messages', 'Lock'), 'aria-label' => self::t('messages', 'Lock')], $this->buttonOptions); if ($model->hasAttribute('locked') && !$model->locked && ($model->hasAttribute('removed') && !$model->removed)) { return Html::a(trim(Icon::show('lock')), $url, $options); } }; } if (!isset($this->buttons['unlock'])) { $this->buttons['unlock'] = function ($url, $model, $key) { $options = array_merge(['title' => self::t('messages', 'Unlock'), 'aria-label' => self::t('messages', 'Unlock')], $this->buttonOptions); if ($model->hasAttribute('locked') && $model->locked && ($model->hasAttribute('removed') && !$model->removed)) { return Html::a(trim(Icon::show('unlock')), $url, $options); } }; } if (!isset($this->buttons['restore'])) { $this->buttons['restore'] = function ($url, $model, $key) { $options = array_merge(['title' => self::t('messages', 'Restore'), 'aria-label' => self::t('messages', 'Restore'), 'data-confirm' => self::t('messages', 'Are you sure you want to restore this item?'), 'data-method' => 'post', 'data-pjax' => '0'], $this->buttonOptions); if ($model->hasAttribute('removed') && $model->removed) { return Html::a(trim(Icon::show('share-square-o')), $url, $options); } }; } if (!isset($this->buttons['delete'])) { $this->buttons['delete'] = function ($url, $model, $key) { $name = $model->hasAttribute('removed') && !$model->removed ? self::t('messages', 'To trash') : self::t('messages', 'Delete'); $options = array_merge(['title' => $name, 'aria-label' => $name, 'data-confirm' => self::t('messages', 'Are you sure you want to delete this item?'), 'data-method' => 'post', 'data-pjax' => '0'], $this->buttonOptions); return Html::a(trim(Icon::show('trash')), $url, $options); }; } }
/** * Updates an existing Person model. * If update is successful, the browser will be redirected to the 'view' page. * @param integer $id * @return mixed */ public function actionUpdate($id) { $model = $this->findModel($id); if ($model->load(Yii::$app->request->post()) && $model->save()) { Yii::$app->session->setFlash('alert', ['body' => \Yii::t('app', 'Person {name} was updated', ['name' => Html::a($model->getFullName(), Url::toRoute(['view', 'id' => $model->id]))]), 'options' => ['class' => 'alert-success']]); return $this->redirect(['index']); } else { return $this->render('update', ['model' => $model]); } }
/** * * @param type $url * @param Language $model * @param type $key */ public static function deleteButtonFn($url, $model, $key) { $glyphSuffix = 'ok'; $actionPrefix = 'enable'; if ($model['status'] == 0) { $glyphSuffix = 'remove'; $actionPrefix = 'disable'; } $options = ['class' => $actionPrefix . '-language-button', 'data-pjax' => 'language-grid', 'url' => \yii\helpers\Url::to([$actionPrefix . '-language', 'id' => $model['id']]), 'title' => Yii::t('yii', 'Delete'), 'aria-label' => Yii::t('yii', 'Delete'), 'style' => 'cursor:pointer']; return Html::a('<span class="glyphicon glyphicon-' . $glyphSuffix . '"></span>', false, $options); }
public function run() { $out = ''; if (\Yii::$app->user->isGuest) { if ($this->enableSignUp) { $out .= \yii\bootstrap\Html::a('Signup', ['/user/account/signup']); $out .= $this->separator; } $out .= \yii\bootstrap\Html::a('Login', ['/user/account/login']); } else { $out = '<li>' . Html::beginForm(['/user/account/logout'], 'post') . Html::submitButton('Logout (' . \Yii::$app->user->identity->email . ')', ['class' => 'btn btn-link']) . Html::endForm() . '</li>'; } return $out; }
protected function initDefaultButtons() { if (!isset($this->buttons['update'])) { $this->buttons['update'] = function ($url, $model, $key) { $options = array_merge(['title' => \Yii::t('app', 'Edit'), 'class' => 'btn btn-xs green', 'style' => 'margin-right:0', 'data-toggle' => 'tooltip', 'data-pjax' => '0'], $this->buttonOptions); return Html::a('<span class="fa fa-edit"></span> ', $url, $options); }; } if (!isset($this->buttons['delete'])) { $this->buttons['delete'] = function ($url, $model, $key) { $options = array_merge(['title' => \Yii::t('app', 'Delete'), 'class' => 'btn red btn-xs', 'data-toggle' => 'tooltip', 'data-confirm' => \Yii::t('yii', 'Are you sure you want to delete this item?'), 'data-method' => 'post', 'data-pjax' => '0'], $this->buttonOptions); return Html::a('<span class="fa fa-trash-o"></span>', $url, $options); }; } }
public static function defaultColumns() { return ['zone' => ['class' => MainColumn::className(), 'label' => Yii::t('hipanel:dns', 'Zone'), 'attribute' => 'name'], 'domain' => ['class' => MainColumn::className(), 'filterAttribute' => 'domain_like'], 'idn' => ['class' => MainColumn::className(), 'filterAttribute' => 'idn_like'], 'actions' => ['class' => MenuColumn::class, 'menuClass' => DnsActionsMenu::class], 'nss' => ['format' => 'raw', 'attribute' => 'nss_like', 'label' => Yii::t('hipanel:dns', 'NS servers'), 'value' => function ($model) { return ArraySpoiler::widget(['data' => $model->nss]); }], 'dns_on' => ['format' => 'raw', 'filter' => function ($column, $model, $attribute) { return Html::activeDropDownList($model, $attribute, ['' => Yii::t('hipanel:dns', '---'), '1' => Yii::t('hipanel:dns', 'Enabled'), '0' => Yii::t('hipanel:dns', 'Disabled')], ['class' => 'form-control']); }, 'value' => function ($model) { return Label::widget(['color' => $model->dns_on ? 'success' : '', 'label' => $model->dns_on ? Yii::t('hipanel:dns', 'Enabled') : Yii::t('hipanel:dns', 'Disabled'), 'labelOptions' => ['title' => Yii::t('hipanel:dns', 'Means that the panel will publish DNS records on the NS servers')]]); }], 'bound_to' => ['format' => 'raw', 'label' => Yii::t('hipanel:dns', 'Bound to'), 'value' => function ($model) { if (Yii::getAlias('@domain') !== null && $model->is_reg_domain) { return Html::a(Yii::t('hipanel:dns', 'Registered domain'), ['@domain/view', 'id' => $model->id]); } elseif ($model->server_id) { return Html::a($model->account . '@' . $model->server, ['@hdomain/view', 'id' => $model->id]); } else { return Yii::$app->formatter->nullDisplay; } }]]; }
public function torMenu($parent = null, $level = 1) { $links = Links::find()->where(['categories_id' => $this->categories_id, 'parent' => $parent])->orderBy(['seq' => SORT_ASC])->all(); $items = Html::beginTag('ul', ['class' => 'tor-nav-' . $level . ' ' . ($level > 2 ? 'list-unstyled' : 'list-inline')]); /** @var $link Links */ foreach ($links as $link) { $items .= '<li>' . Html::a($link->anchor, $link->url); if ($link->child_exist == 1) { if ($link->level == 1) { $items .= '<span class="caret"></span>' . Html::tag('div', $this->torMenu($link->id, $link->level + 1), ['class' => 'tor-sub-nav']); } else { $items .= $this->torMenu($link->id, $link->level + 1); } } $items .= '</li>'; } $items .= Html::endTag('ul'); return $items; }
/** * @inheritdoc */ public function run() { if ($this->user->isCurrentUser() || \Yii::$app->user->isGuest) { return; } // Add class for javascript handling $this->followOptions['class'] .= ' followButton'; $this->unfollowOptions['class'] .= ' unfollowButton'; // Hide inactive button if ($this->user->isFollowedByUser()) { $this->followOptions['style'] .= ' display:none;'; } else { $this->unfollowOptions['style'] .= ' display:none;'; } // Add UserId Buttons $this->followOptions['data-userid'] = $this->user->id; $this->unfollowOptions['data-userid'] = $this->user->id; $this->view->registerJsFile('@web/resources/user/followButton.js'); return Html::a($this->unfollowLabel, $this->user->createUrl('/user/profile/unfollow'), $this->unfollowOptions) . Html::a($this->followLabel, $this->user->createUrl('/user/profile/follow'), $this->followOptions); }
public function run() { parent::run(); $content = Html::submitButton($this->model->isNewRecord ? self::t('messages', 'Create') : self::t('messages', 'Update'), ['class' => $this->model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); $jsCreateClose = <<<JS var action = \$(this).parents('form').attr('action'); var submitButton = \$(this).parent().find('button[type=submit]'); \$(this).parents('form').attr('action', action + '&close=true'); submitButton.click(); return false; JS; $content .= ' ' . Html::a($this->model->isNewRecord ? self::t('messages', 'Create and close') : self::t('messages', 'Update and close'), '#', ['class' => 'btn btn-default btn-sm', 'onclick' => $jsCreateClose]); $returnUrl = null; if (\Yii::$app->controller->defaultAction === null) { $returnUrl = \Yii::$app->user->returnUrl; } else { $returnUrl = [\Yii::$app->controller->defaultAction]; } $content .= ' ' . Html::a(self::t('messages', 'Close'), $returnUrl, ['class' => 'btn btn-default btn-sm']); $content = Html::tag('div', $content, ['class' => 'col-sm-8']) . Html::tag('div', $this->getInfoRecord(), ['class' => 'col-sm-4 text-right']); return Html::tag('div', $content, ['class' => 'form-group well row']); }
/** * @inheritdoc */ public function successMessage() { if (Yii::$app->hasModule($this->moduleID)) { $link = Html::a('try it now', Yii::$app->getUrlManager()->createUrl($this->moduleID), ['target' => '_blank']); return "The module has been generated successfully. You may {$link}."; } $output = <<<EOD <p>The module has been generated successfully.</p> <p>To access the module, you need to add this to your application configuration:</p> EOD; $code = <<<EOD <?php ...... 'modules' => [ '{$this->moduleID}' => [ 'class' => '{$this->moduleClass}', ], ], ...... EOD; return $output . '<pre>' . highlight_string($code, true) . '</pre>'; }
/** * @inheritdoc */ protected function initDefaultButtons() { if (!isset($this->buttons['enumeration-action'])) { $this->buttons['enumeration-action'] = function ($url, $model, $key) { $options = array_merge(['data-method' => 'POST', 'data-pjax' => '0', 'data-url' => $this->url, 'class' => 'btn btn-default btn-enumeration'], $this->buttonOptions); $options['title'] = $options['aria-label'] = $this->type == static::TypeLeft ? Yii::t('easyii', 'Enumeration|MoveRight') : Yii::t('easyii', 'Enumeration|MoveLeft'); $options['data-status'] = $this->type == static::TypeLeft ? '1' : '0'; if ($model instanceof Enumeration2Model) { $options['data-owner-id'] = $this->enumeration->owner_id; $options['data-model-id'] = $model->model->primaryKey; } else { $options['data-owner-id'] = $this->enumeration->owner_id; $options['data-model-id'] = $model->primaryKey; } if ($this->type == static::TypeLeft) { return Html::a(Html::tag('span', '', ['class' => 'glyphicon glyphicon-menu-right']), $this->url, $options); } else { return Html::a(Html::tag('span', '', ['class' => 'glyphicon glyphicon-menu-left']), $this->url, $options); } }; } }
echo FA::fw('bar-chart-o'); ?> Charts<?php echo $arrowIcon; ?> </a> <?php echo Nav::widget(['encodeLabels' => false, 'options' => ['class' => 'nav nav-second-level'], 'items' => [['label' => 'Flot Charts', 'url' => ['/site/page', 'view' => 'flot']], ['label' => 'Morris.js Charts', 'url' => ['/site/page', 'view' => 'morris']]]]); ?> </li><!-- Charts --> <li><?php echo Html::a(FA::fw('table') . 'Tables', Url::to(['/site/page', 'view' => 'tables'])); ?> </li><!-- Tables --> <li><?php echo Html::a(FA::fw('edit') . 'Forms', Url::to(['/site/page', 'view' => 'forms'])); ?> </li><!-- Forms --> <li> <a href="#"><?php echo FA::fw('calendar'); ?> Calendar</a> <!-- <a href="calendar.php"><?php echo FA::fw('calendar'); ?> Calendar</a> --> </li><!-- Calendar --> <li> <a href="#"><?php echo FA::fw('wrench');
<button type="button" class="btn btn-default btn-sm checkDeleted"><i class="fa fa-trash-o"></i></button> <button type="button" class="btn btn-default btn-sm checkPublish"><i class="fa fa-eye"></i></button> <button type="button" class="btn btn-default btn-sm checkUnpublish"><i class="fa fa-eye-slash"></i></button> </div> <button type="button" class="btn btn-default btn-sm checkSeed"><i class="fa fa-check"></i></button>', 'footer' => '<div class="btn-group"> <button type="button" class="btn btn-default btn-sm checkDeleted"><i class="fa fa-trash-o"></i></button> <button type="button" class="btn btn-default btn-sm checkPublish"><i class="fa fa-eye"></i></button> <button type="button" class="btn btn-default btn-sm checkUnpublish"><i class="fa fa-eye-slash"></i></button> </div> <button type="button" class="btn btn-default btn-sm checkSeed"><i class="fa fa-check"></i></button>'], 'panelTemplate' => '<div class="panel {type}">{panelHeading}{items}{panelFooter}<div class="text-center">{pager}</div></div>', 'panelFooterTemplate' => '{footer}<div class="clearfix"></div>', 'dataProvider' => $comments, 'bordered' => false, 'summary' => false, 'hover' => true, 'id' => 'commentsGrid', 'pjax' => true, 'pjaxSettings' => ['linkSelector' => '#commentsGrid .pagination a'], 'striped' => false, 'layout' => '{items}', 'containerOptions' => ['class' => 'box-body table-responsive no-padding'], 'resizableColumns' => false, 'columns' => [['class' => \kartik\grid\CheckboxColumn::className()], ['format' => 'raw', 'attribute' => 'author', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE, 'value' => function ($model) { return Html::tag('span', $model->author, ['title' => "IP: {$model->ip} email: {$model->email}", 'data-toggle' => 'tooltip']); }], ['label' => 'Статья', 'format' => 'raw', 'value' => function ($model) { if (empty($model->news)) { return 'отсутствует'; } return Html::a($model->news->title, '/news/show/' . $model->news->id, ['class' => 'longLink newsTitle']); }], ['attribute' => 'text', 'format' => 'html', 'hAlign' => GridView::ALIGN_LEFT, 'vAlign' => GridView::ALIGN_MIDDLE, 'value' => function ($model) { return Html::tag('span', $model->text, ['class' => 'longLink commentText']); }], ['attribute' => 'date', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE, 'value' => function ($model) { return \Yii::$app->formatter->asRelativeTime($model->date); }], ['header' => ' ', 'width' => '100px', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE, 'class' => \kartik\grid\ActionColumn::className(), 'buttons' => ['view' => function ($key, $model) { return Html::button(FA::i($model->published == 1 ? 'eye' : 'eye-slash'), ['class' => 'publishComment btn btn-sm btn-default']); }, 'update' => function ($model) { return Html::button(FA::i('pencil'), ['class' => 'editComment btn btn-sm btn-default']); }], 'template' => Html::tag('div', '{view}{update}', ['class' => 'btn-group btn-group-sm'])]]]); ?> </div> </div> </div> </div> <?php
if (!$cart->isEmpty) { ?> <?php echo \stronglab\checkout\widgets\pay::widget(['orderSum' => $cart->getCost()]); ?> <?php } ?> <?php \yii\widgets\Pjax::end(); ?> <?php if (!$cart->isEmpty) { ?> <?php echo \yii\bootstrap\Html::a('Очистить корзину', ['clear'], ['class' => 'button btn-danger']); ?> <?php } ?> </div> <div class="checkout-column col-small"> <div class="checkout-form"> <?php echo $this->render('_form', ['model' => $model]); ?> </div> </div> </div> <?php
<li role="presentation"><a href="<?php echo Url::to(['/account/rbac/actionlist']); ?> "><?php echo Yii::t('account', 'Action list'); ?> </a></li> </ul> <div class="row m-b-md"> <div class="col-lg-12"> <div class="btn-group"> <?php echo Html::a(Yii::t('yii', 'Create'), ['default/create'], ['class' => 'btn btn-success', 'onclick' => '$("#formDefault").submit();']); ?> </div> </div> </div> <div class="row"> <div class="col-lg-12"> <?php echo GridView::widget(['panel' => ['heading' => Yii::t(Yii::$app->controller->module->id, 'Product'), 'tableOptions' => ['id' => 'listDefault']], 'pjax' => TRUE, 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'kartik\\grid\\CheckboxColumn'], ['attribute' => '_id', 'mergeHeader' => TRUE, 'hAlign' => 'center'], 'email', ['header' => 'Vai trò', 'mergeHeader' => TRUE, 'hAlign' => 'center', 'vAlign' => 'middle', 'value' => function ($model, $index, $widget) { return Html::a('Quản lý vai trò', ['rbac/assign', 'user_id' => $model->_id], ['class' => 'btn btn-xs btn-primary']); }, 'format' => 'raw'], ['class' => '\\kartik\\grid\\ActionColumn']], 'responsive' => true, 'hover' => true]); ?> </div> </div> </div>
</td> <td> <?php echo Html::a('', ['remove', 'id' => $client->id], ['class' => 'glyphicon glyphicon-remove text-danger btn btn-default btn-sm']); ?> </td> </tr> <?php } ?> </tbody> <?php } ?> </table> <?php echo Html::a('Добавить клиента', ['create'], ['class' => 'btn btn-primary pull-left']); ?> <?php echo Html::a('Скачать CSV', ['export'], ['class' => 'btn btn-primary pull-right']); ?> <?php echo Html::a('Сделать рассылку', ['delivery'], ['class' => 'btn btn-primary pull-right']); ?> </div> </div> </div> </div> </div> </div>
<?php use yii\bootstrap\Html; use yii\helpers\Url; echo Html::a(Html::img($post->photo), Url::to('/post/' . $post->id), ['class' => 'ad-image']) . Html::tag('div', Html::tag('span', Html::tag('div', \rmrevin\yii\fontawesome\FA::icon($post->categoryObject->image), ['style' => 'background-color: ' . $post->categoryObject->color, 'class' => 'category-icon-box']), ['class' => 'ad-category']) . Html::a($post->title, Url::to('/post/' . $post->id)) . Html::tag('div', Html::tag('span', $post->price), ['class' => 'add-price']), ['class' => 'ad-box-content']);
<div class="box-body"> <ul class="list-unstyled"> <li> <div class="row"> <div class="col-sm-4"> <div class="checkbox"><?php echo Html::checkbox('check_user_all', true, ['id' => 'check-user-all', 'label' => 'Выделить все', 'labelOptions' => ['style' => 'font-weight: normal'], 'disabled' => Yii::$app->request->get('action') == 'send' ? true : false]); ?> </div> </div> <div class="col-sm-8"> <?php if (Yii::$app->request->get('action') == 'send') { echo Html::tag('div', 'Идёт отправка ...', ['class' => 'text-danger', 'id' => 'mail-send-status', 'data-broadcast-send-id' => Yii::$app->request->get('broadcast_send_id'), 'data-status-url' => Url::to(['status'])]); } else { echo Html::a('<i class="fa fa-paper-plane" aria-hidden="true"></i> Отправить', '#', ['class' => 'btn btn-sm btn-success btn-flat', 'data-url-redirect' => Url::current(['action' => 'send']), 'data-url-address' => Url::to(['address']), 'id' => 'brodcast-send']); } ?> </div> </div> </li> <li><hr></li> <?php /** @var $address \common\models\broadcast\BroadcastAddress */ if (ArrayHelper::getColumn($broadcast_address, 'user_id')) { echo Html::tag('li', '<h3>Зарегистрированные пользователи</h3>'); $user_exist = false; foreach ($broadcast_address as $address) { if ($address->user_id) { $user_exist = true; echo Html::tag('li', '<div class="checkbox">' . Html::checkbox('check_user_' . $address->id, true, ['label' => Html::tag('strong', $address->user->email) . ' — ' . $address->user->username, 'data-checkbox-address-id' => $address->id, 'class' => 'check-user', 'disabled' => Yii::$app->request->get('action') == 'send' ? true : false]) . (Yii::$app->request->get('action') == 'send' ? Html::tag('span', 'Ожидание', ['id' => 'status-' . $address->id, 'class' => 'text-danger', 'style' => 'margin-left: 15px;']) : '') . '</div>');
<?php use yii\bootstrap\Html; use yii\grid\GridView; use yii\log\Logger; /* @var $this yii\web\View */ /* @var $searchModel backend\models\search\LogSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('backend', 'Logs'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="log-index"> <p> <?php echo Html::a(Yii::t('backend', 'Clear'), false, ['class' => 'btn btn-danger', 'data-method' => 'delete']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['attribute' => 'level', 'value' => function ($model) { return Logger::getLevelName($model->level); }, 'filter' => [Logger::LEVEL_ERROR => 'error', Logger::LEVEL_WARNING => 'warning', Logger::LEVEL_INFO => 'info', Logger::LEVEL_TRACE => 'trace', Logger::LEVEL_PROFILE_BEGIN => 'profile begin', Logger::LEVEL_PROFILE_END => 'profile end']], 'category', ['attribute' => 'log_time', 'format' => 'datetime', 'value' => function ($model) { return (int) $model->log_time; }], 'prefix', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {delete}']]]); ?> </div>
echo $this->render('/shared/carousel'); $this->endBlock(); ?> <div class="site-index"> <div class="jumbotron"> <?php echo $page->announce; ?> <?php echo $page->content; ?> <p><?php echo Html::a(Yii::t('app', 'Check our catalog'), ['/category/index'], ['class' => 'btn btn-lg btn-success']); ?> </p> </div> <div class="body-content"> <div class="section-header"> <h2><?php echo Yii::t('app', 'New <span>products</span>'); ?> </h2> <?php echo $this->render('/product/_list', ['products' => $new_products]); ?> </div> <?php
</div> </div> <div class="box box-default"> <div class="box-header with-border"> <h3 class="box-title"><?php echo Yii::t("topology", "Last tasks"); ?> </h3> </div> <div class="box-body"> <?php Pjax::begin(['id' => 'task-pjax']); echo Grid::widget(['id' => 'search-grid', 'dataProvider' => $taskProvider, 'columns' => array('started_at:datetime', ['header' => Yii::t("topology", "Rule"), 'value' => function ($model) { return $model->getRule()->one()->name; }], 'status', ['header' => Yii::t("topology", "Discovered changes"), 'format' => 'raw', 'value' => function ($model) { return Html::a('<span class="fa fa-eye"></span> ', ['task', 'id' => $model->id]) . $model->getChanges()->count(); }])]); Pjax::end(); ?> </div> </div> </div> <div class="col-md-4"> <div class="box box-default"> <div class="box-header with-border"> <h3 class="box-title"><?php echo Yii::t("topology", "Change history"); ?> </h3> </div> <div class="box-body">
<?php use yii\bootstrap\Html; /* @var $this yii\web\View */ $this->title = 'Простая booking система'; ?> <div class="site-index"> <div class="jumbotron"> <h1>Простая booking система</h1> <?php echo Html::a('Возможные туры', ['tour/available-tours'], ['class' => 'btn btn-lg btn-default']); ?> <?php echo Html::a('Страны', ['country/index'], ['class' => 'btn btn-lg btn-warning']); ?> <?php echo Html::a('Отели', ['hotel/index'], ['class' => 'btn btn-lg btn-info']); ?> <?php echo Html::a('Туры', ['tour/index'], ['class' => 'btn btn-lg btn-success']); ?> <?php echo Html::a('Заказы', ['order/index'], ['class' => 'btn btn-lg btn-danger']); ?> </div> </div>
<?php use app\modules\cms\models\WebPage; use yii\bootstrap\Html; use yii\helpers\Url; /** * @var WebPage $model */ if (!is_null($model->base->menu_index)) { $upLink = Html::a(Html::img($this->assetManager->getBundle('app\\modules\\cms\\assets\\CmsAsset')->baseUrl . '/fleche-monter-verte-32.png'), Url::to(['/cms/base-pages/increase-menu-index/', 'id' => $model->base_id])); $downLink = Html::a(Html::img($this->assetManager->getBundle('app\\modules\\cms\\assets\\CmsAsset')->baseUrl . '/fleche-descendre-verte-32.png'), Url::to(['/cms/base-pages/decrease-menu-index/', 'id' => $model->base_id])); echo "{$upLink} {$downLink} [{$model->base->menu_index}] {$model->menu_title}"; } else { echo ''; }
<span style="margin-left:20px;font-size: 14pt;"><span class="glyphicon glyphicon-info-sign"></span> Recibida</span> <?php } } ?> </h3> </div> <div class="col-sm-6"> <div style="margin: 24px 0 0 0;text-align: center"> <?php echo Html::a('<span class="glyphicon glyphicon-eye-open"></span> ' . Yii::t('app', 'Order Details'), ['user/order', 'id' => $model->id]); ?> <?php echo Html::a('<span class="glyphicon glyphicon-repeat"></span> ' . Yii::t('app', 'Add products to Cart'), ['user/re-order', 'id' => $model->id]); ?> </div> </div> </div> <div class="row"> <div class="col-sm-6"> <table class="info"> <tr> <th nowrap="nowrap"><?php echo Yii::t('app', 'Created'); ?> </th> <td><?php
use yii\helpers\Url; use yii\helpers\ArrayHelper; use yii\widgets\Pjax; use yii\grid\GridView; $this->title = Yii::t('app', 'Words'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="words-index"> <h2><?php echo Html::encode($this->title); ?> </h2> <p> <?php echo Html::a(Yii::t('app', 'Create'), ['create'], ['class' => 'btn btn-primary']); ?> </p> <?php Pjax::begin(); ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'category_id', 'author', 'content', 'slug', 'created_at', 'updated_at', 'status', ['class' => 'yii\\grid\\ActionColumn']]]); ?> <?php Pjax::end(); ?> </div>
use frontend\models\Lang; use frontend\widgets\EventList; use yii\bootstrap\Html; use yii\helpers\Url; $this->title = Lang::t('main/index', 'title'); $keywords = 'brazilian zouk, zouk, бразильский зук, бразильский танец зук, конгресс, congress, мастер класс, фестиваль, потанцевать, научиться'; $description = 'Зук – это современный, романтичный и ритмичный танец. Найти вечиринку, конгресс по бразильскому зуку. Разместить своё мероприятие.'; $this->registerMetaTag(['name' => 'keywords', 'content' => $keywords], 'keywords'); $this->registerMetaTag(['name' => 'description', 'content' => $description], 'description'); Yii::$app->params['jsZoukVar']['dateCreateType'] = EventList::DATE_CREATE_AFTER; ?> <div class="site-index"> <div class="body-content"> <div class="row"> <div class="col-md-8"> <?php echo $this->render('/event/tabs', ['selectTab' => 2]); ?> <?php echo EventList::widget(['orderBy' => EventList::ORDER_BY_DATE, 'dateCreateType' => EventList::DATE_CREATE_AFTER]); ?> </div> <div class="col-md-4"> <?php echo Html::a(Lang::t('main', 'mainButtonAddEvent'), ['/events/add'], ['class' => 'btn btn-success btn-label-main add-item']); echo $this->render('/list/listRightBlock'); ?> </div> </div> </div> </div>
?> <?php echo $form->field($model, 'db_user'); ?> <?php echo $form->field($model, 'db_pass')->passwordInput(); ?> <style> .form-group:last-of-type { margin-bottom: 0; } </style> <div class="advancedOptionsWrapper" style="border: 1px solid #f3f5f7; padding: 7px 10px; margin-bottom: 15px"> <?php echo Html::a('▶ ' . Yii::t('setup', 'Advanced options'), '#', ['id' => 'toogleAdvancedOptions', 'style' => 'font-size: 0.875em; color: #313941; font-weight: bold; text-transform: uppercase; text-decoration:none']); ?> <div id="advancedOptions" style="margin-top: 15px"> <p style="color: #68798a"> <?php echo Yii::t('setup', "These options are only necessary for some sites. If you're not sure what you should enter here, leave the default settings or check with your hosting provider."); ?> </p> <?php echo $form->field($model, 'db_host')->hint(Yii::t('setup', 'If your database is located on a different server, change this.')); ?> <?php echo $form->field($model, 'db_port')->hint(Yii::t('setup', 'If your database server is listening to a non-standard port, enter its number.')); ?> <?php echo $form->field($model, 'tablePrefix')->hint(Yii::t('setup', "If more than one application will be sharing this database, a unique table prefix - such as 'ef_' - will prevent collisions."));
?> </p> <table class="table table-bordered table-striped"> <tbody> <?php foreach ($rows as $row) { ?> <tr> <td> <b><?php echo $row['title']; ?> </b><br> <?php echo $row['description']; ?> </td> <td style="text-align: center; vertical-align: middle;"> <?php echo Html::a(Html::icon($row['icon']) . ' ' . $row['title'], $row['url'], $row['options']); ?> </td> </tr> <?php } ?> </tbody> </table> </div> </div>