/** * Lists all StaticPageTable models. * @return mixed */ public function actionIndex() { if (!Yii::$app->user->can('static-page-table/index')) { Yii::$app->session->setFlash('error', 'Нет доступа!'); return $this->redirect('/'); } if (isset($_POST['sort_list_2'])) { $mas = explode(',', $_POST['sort_list_2']); for ($i = 0; $i <= sizeof($mas) - 1; $i++) { $model = $this->findModel($mas[$i]); $model->position = $i; $model->save(); } } $staticPagesTrue = StaticPageTable::find()->where(['status' => 1])->orderBy(['position' => SORT_ASC])->all(); $staticPagesFalse = StaticPageTable::find()->where(['status' => 0])->orderBy(['position' => SORT_ASC])->all(); $list = []; $value = ""; foreach ($staticPagesTrue as $statispage) { $list[$statispage->id] = ['content' => Html::a(FA::icon($statispage->icon) . " " . $statispage->name, ['view', 'url' => $statispage->url])]; $value .= $statispage->id . ","; } foreach ($staticPagesFalse as $statispage) { $list[$statispage->id] = ['content' => Html::a(FA::icon($statispage->icon) . " " . $statispage->name, ['view', 'url' => $statispage->url]), 'disabled' => true]; $value .= $statispage->id . ","; } $value = substr($value, 0, -1); return $this->render('index', ['list' => $list, 'value' => $value]); }
/** * @inheritdoc */ public function init() { parent::init(); Html::addCssClass($this->options, ['widget' => 'info-box']); $iconOptions = ['class' => 'info-box-icon']; if ($this->type === self::COLORED_ICON) { Html::addCssClass($iconOptions, 'bg-' . $this->color); } else { Html::addCssClass($this->options, 'bg-' . $this->color); } echo Html::beginTag('div', $this->options); echo Html::tag('span', FA::icon($this->icon), $iconOptions); echo '<div class="info-box-content">'; if (!empty($this->contents)) { foreach ($this->contents as $content) { if (is_array($content)) { $type = ArrayHelper::getValue($content, 'type', 'text'); $text = ArrayHelper::getValue($content, 'text', ''); if (in_array($type, ['text', 'number'])) { echo Html::tag('span', $text, ['class' => 'info-box-' . $type]); } elseif ($type == 'progress') { $value = ArrayHelper::getValue($content, 'value', $text); echo '<div class="progress">'; echo Html::tag('div', '', ['class' => 'progress-bar', 'style' => ['width' => $value . '%']]); echo '</div>'; } else { echo Html::tag('span', $text, ['class' => $type]); } } else { echo $content; } } } }
/** * Creates the label for a button * * @return string the label */ protected function createLabel() { $icon = empty($this->icon) ? '' : FA::icon($this->icon); if (empty($this->label) || strcmp($this->label, 'Button') === 0) { $label = ''; } else { $label = Html::tag('span', $this->encodeLabel ? Html::encode($this->label) : $this->label); } return $icon . $label; }
/** * @param array|string $item * @return null|string */ function renderItem($item) { $options = []; if (isset($item['visible']) && $item['visible'] !== true) { return null; } $anchor_options = []; if (!isset($item['items']) || empty($item['items'])) { $label = ''; $subitems = ''; if (isset($item['icon']) && !empty($item['icon'])) { $label .= $item['icon'] . ' '; } $label .= Html::tag('span', $item['label']); if (isset($item['badge'])) { if (!is_array($item['badge'])) { $item['badge'] = ['text' => $item['badge']]; } $opt = ['class' => 'label pull-right']; if (isset($item['badge']['class'])) { Html::addCssClass($opt, $item['badge']['class']); } $label .= ' ' . Html::tag('small', $item['badge']['text'], $opt); } } else { $label = ''; $subitems = ''; if (isset($item['icon']) && !empty($item['icon'])) { $label .= $item['icon'] . ' '; } $label .= Html::tag('span', $item['label']) . FA::icon('angle-left')->pullRight(); foreach ($item['items'] as $subitem) { $subitems .= renderItem($subitem); } $opt = ['class' => 'treeview-menu']; if (true === $item['selected']) { Html::addCssClass($opt, 'menu-open'); } $subitems = Html::tag('ul', $subitems, $opt); Html::addCssClass($options, 'treeview'); } if (true === $item['selected']) { Html::addCssClass($options, 'active'); } return Html::tag('li', Html::a($label, $item['url'], $anchor_options) . $subitems, $options); }
protected function initDefaultButtons() { // $this->template = '<div class="btn-group">' . $this->template . '</div>'; if (!isset($this->buttons['view'])) { $this->buttons['view'] = function ($url, $model, $key) { return Html::a(FA::i('eye'), $url, array_merge(['title' => Yii::t('yii', 'View'), 'class' => 'btn btn-default btn-xs'], $this->buttonOptions)); }; } if (!isset($this->buttons['update'])) { $this->buttons['update'] = function ($url, $model, $key) { return Html::a(FA::i('edit'), $url, array_merge(['title' => Yii::t('yii', 'Update'), 'class' => 'btn btn-primary btn-xs'], $this->buttonOptions)); }; } if (!isset($this->buttons['delete'])) { $this->buttons['delete'] = function ($url, $model, $key) { return Html::a(FA::i('trash'), $url, array_merge(['title' => Yii::t('yii', 'Delete'), 'class' => 'btn btn-danger btn-xs', 'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'data-method' => 'post'], $this->buttonOptions)); }; } }
public function getMenuItems() { return [['label' => ($this->_model ? FA::icon(FA::_EDIT) : FA::icon(FA::_PLUS_SQUARE)) . ' <b>' . $this->generateKey() . '</b> <span class="label label-danger">HTML</span>', 'url' => $this->_model ? $this->generateEditRoute($this->_model->id) : $this->generateCreateRoute()]]; }
<div class="col-lg-3"> <h2><?php echo FA::icon('youtube-play'); ?> Видео</h2> <p>Вставка видео на главной странице и описания к нему</p> <p><a class="btn btn-primary" href="<?php echo Url::to(['/admin/video']); ?> ">Начать »</a></p> </div> <div class="col-lg-3"> <h2><?php echo FA::icon('floppy-o'); ?> Релизы</h2> <p>Добавление и редактирование вышедших релизов для отображения на странице /releases</p> <p><a class="btn btn-primary" href="<?php echo Url::to(['/admin/release']); ?> ">Начать »</a></p> </div> </div> </div> </div>
/** * @inheritdoc */ public function menu($Controller) { return [['label' => \Yii::t('cookyii.feed', 'Feeds'), 'url' => ['/feed/list/index'], 'icon' => FA::icon('bars'), 'visible' => User()->can(Feed\backend\Permissions::ACCESS), 'selected' => $Controller->module->id === 'feed', 'sort' => 1000]]; }
/** * @inheritdoc */ public function menu($Controller) { return [['label' => \Yii::t('cookyii.translation', 'Translation'), 'url' => ['/translation/list/index'], 'icon' => FA::icon('globe'), 'visible' => User()->can(Permissions::ACCESS), 'selected' => $Controller->module->id === 'translation', 'sort' => 9000]]; }
/** @var \backend\modules\announcements\models\AnnouncementForm $model */ use rmrevin\yii\fontawesome\FA; use yii\bootstrap\Html; $this->title = 'Редактирование анонса'; $this->params['breadcrumbs'][] = ['url' => ['/announcements/default/index'], 'label' => 'Анонсы']; $this->params['breadcrumbs'][] = $this->title; $js = <<<'JS' $("body").on('click', '.saveBtn', function(){ $("#edit-announcement-form").submit(); }); JS; $this->registerJs($js); ?> <div class="panel panel-default"> <div class="panel-heading"> <?php echo Html::a(FA::i('arrow-left') . Html::tag('small', 'Назад'), ['/announcements'], ['class' => 'btn btn-app']); ?> <?php echo Html::button(FA::i('save') . Html::tag('small', 'Сохранить'), ['class' => 'btn btn-app saveBtn']); ?> </div> <div class="panel-body"> <div class="col-xs-8 col-xs-offset-2"> <?php echo $this->render('editForm', ['model' => $model]); ?> </div> </div> </div>
<div class="divider mt2 mb1"></div> <ul> <li class="inline mr1"><a href="#!" class="grey-text text-lighten-1"><?php echo FA::icon('vk')->size(FA::SIZE_2X); ?> </a></li> <li class="inline mr1"><a href="#!" class="grey-text text-lighten-1"><?php echo FA::icon('google-plus')->size(FA::SIZE_2X); ?> </a></li> <li class="inline mr1"><a href="#!" class="grey-text text-lighten-1"><?php echo FA::icon('twitter')->size(FA::SIZE_2X); ?> </a></li> <li class="inline mr1"><a href="mailto::info@tc-alpha.ru" class="grey-text text-lighten-1"><?php echo FA::icon('envelope')->size(FA::SIZE_2X); ?> </a></li> </ul> </div> </div> </div> <div class="footer-copyright"> <div class="container p0 grey-text text-darken-1 center-align"> © <?php echo date('Y'); ?> Торговый дом "Альфа" </div> </div> </footer>
<li><?php echo Html::a('Отзывы о проекте ' . FA::icon('book'), ['/site/review']); ?> </li> <li><?php echo Html::a('Обратная связь <span class="glyphicon glyphicon-envelope">', ['/feedback/create']); ?> </li> </ul> </span> <span class="pull-right copy">© Dosh <?php echo date('Y'); ?> </span> </div> </footer> <div id="scrollup"> <span class="scrollup">Наверх <?php echo FA::icon('arrow-up '); ?> </span> </div> <?php $this->endBody(); ?> </body> </html> <?php $this->endPage();
<h2 class="text-center"> Вход<small> (<?php echo Html::a('зарегистрироваться', ['/site/reg']); ?> )</small> </h2> <div class="col-md-6 col-md-offset-3"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'username', ['addon' => ['prepend' => ['content' => \rmrevin\yii\fontawesome\FA::icon('user')]]]); ?> <?php echo $form->field($model, 'password', ['addon' => ['prepend' => ['content' => \rmrevin\yii\fontawesome\FA::icon('key')]]])->passwordInput(); ?> <?php echo $form->field($model, 'rememberMe')->checkbox(); ?> <?php echo Html::a('Забыли пароль?', ['site/send-email']); ?> <div class="form-group"> <div class="text-centre"> <?php echo Html::submitButton('Войти', ['class' => 'btn btn-primary btn-block']); ?> </div>
/** * Renders a widget's item. * @param string|array $item the item to render. * @return string the rendering result. * @throws InvalidConfigException */ public function renderItem($item) { if (is_string($item)) { return $item; } if (!isset($item['label']) && !isset($item['icon'])) { throw new InvalidConfigException("The 'label' option is required."); } $encodeLabel = isset($item['encode']) ? $item['encode'] : $this->encodeLabels; $label = ArrayHelper::getValue($item, 'label', ''); if ($encodeLabel) { $label = Html::encode($label); } $icon = ArrayHelper::getValue($item, 'icon'); if ($icon) { $label = FA::icon($icon) . ' ' . $label; } $badge = ArrayHelper::getValue($item, 'badge'); if (!empty($badge)) { $badgeColor = ArrayHelper::getValue($item, 'badgeColor', 'red'); $label .= ' ' . Html::tag('small', $badge, ['class' => 'badge pull-right bg-' . $badgeColor]); } $options = ArrayHelper::getValue($item, 'options', []); $items = ArrayHelper::getValue($item, 'items'); $url = ArrayHelper::getValue($item, 'url', '#'); $linkOptions = ArrayHelper::getValue($item, 'linkOptions', []); if (isset($item['active'])) { $active = ArrayHelper::remove($item, 'active', false); } else { $active = $this->isItemActive($item); } if ($items !== null) { Html::addCssClass($options, ['widget' => 'treeview']); if ($this->treeviewCaret !== '') { $label .= ' ' . $this->treeviewCaret; } if (is_array($items)) { if ($this->activateItems) { $items = $this->isChildActive($items, $active); } $items = $this->renderItems($items, ['class' => 'treeview-menu']); } } if ($this->activateItems && $active) { Html::addCssClass($options, 'active'); } return Html::tag('li', Html::a($label, $url, $linkOptions) . $items, $options); }
</script> <script type="text/ng-template" id="toast-warning.html"> <md-toast class="warning"> <span flex> <?php echo FA::icon('exclamation-triangle')->fixedWidth(); ?> <strong ng-show="false">{{ message.title }}<br></strong> <span>{{ message.text }}</span> </span> <md-button ng-click="resolve()" class="md-action"> {{ action }} </md-button> </md-toast> </script> <script type="text/ng-template" id="toast-danger.html"> <md-toast class="danger"> <span flex> <?php echo FA::icon('times')->fixedWidth(); ?> <strong ng-show="false">{{ message.title }}<br></strong> <span>{{ message.text }}</span> </span> <md-button ng-click="resolve()" class="md-action"> {{ action }} </md-button> </md-toast> </script>
?> </div> <?php } ?> <div class="actions"> <?php if (!$Comment->isDeleted()) { if ($Comment->canCreate()) { echo Html::a(FA::icon('reply') . ' ' . Yii::t('app', 'Reply'), '#', ['class' => 'btn btn-info btn-xs', 'data-role' => 'reply']); } if ($Comment->canUpdate()) { echo Html::a(FA::icon('pencil') . ' ' . Yii::t('app', 'Edit'), '#', ['data-role' => 'edit', 'class' => 'btn btn-primary btn-xs']); } if ($Comment->canDelete()) { echo Html::a(FA::icon('times') . ' ' . Yii::t('app', 'Delete'), ['', 'delete-comment' => $Comment->id], ['class' => 'btn btn-danger btn-xs']); } } ?> </div> </div> </div> <?php return ob_get_clean(); }]); /** @var Comments\models\Comment $CommentModel */ $CommentModel = \Yii::createObject(Comments\Module::instance()->model('comment')); if ($CommentListWidget->showCreateForm && $CommentModel::canCreate()) { echo Html::tag('h3', Yii::t('app', 'Add comment'), ['class' => 'comment-title']); echo Comments\widgets\CommentFormWidget::widget(['theme' => $CommentListWidget->theme, 'entity' => $CommentListWidget->entity, 'Comment' => $CommentModel, 'anchor' => $CommentListWidget->anchorAfterUpdate]); }
<?php use rmrevin\yii\fontawesome\FA; use yii\bootstrap\Html; $subcategories = []; echo Html::tag('div', Html::tag('div', Html::tag('span', !empty($category->image) ? Html::tag('div', FA::i($category->image), ['class' => 'category-icon-box', 'style' => 'background-color: ' . $category->color]) : '', ['class' => 'category-icon']) . Html::tag('span', Html::a(Html::tag('h4', $category->name), $category->link), ['class' => 'cat-title']) . Html::tag('span', Html::tag('h4', $category->postsCount), ['class' => 'category-total']), ['class' => 'category-header']) . Html::tag('div', Html::tag('ul', implode('', $subcategories)), ['class' => 'category-content']), ['class' => 'category-box span3' . ($current % 4 == 0 ? ' first' : '')]);
public function testIconAddCssClassCondition() { $this->assertEquals(FA::icon('cog')->addCssClass('highlight', true), '<i class="fa fa-cog highlight"></i>'); $this->setExpectedException('yii\\base\\InvalidConfigException', 'Condition is false'); FA::icon('cog')->addCssClass('highlight', false, true); }
/** * @param string $type * @param string $label * @return string */ function sortLink($type, $label) { $label .= ' ' . FA::icon('sort-numeric-desc', ['ng-show' => 'items.sort.order === "-' . $type . '"']); $label .= ' ' . FA::icon('sort-numeric-asc', ['ng-show' => 'items.sort.order === "' . $type . '"']); return Html::a($label, null, ['ng-click' => 'items.sort.setOrder("' . $type . '")']); }
echo Html::encode(Yii::$app->id . ' | ' . $this->title); ?> </title> <?php $this->head(); ?> </head> <body> <?php $this->beginBody(); ?> <div class="wrap"> <?php NavBar::begin(['brandLabel' => 'Админка Lollipops ' . FA::icon('star'), 'brandUrl' => Url::to('/admin'), 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]); echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'encodeLabels' => false, 'items' => [['label' => FA::icon('newspaper-o') . ' Новости', 'url' => ['/admin/news']], ['label' => FA::icon('music') . ' Концерты', 'url' => ['/admin/concert']], ['label' => FA::icon('youtube-play') . ' Видео', 'url' => ['/admin/video']], ['label' => FA::icon('floppy-o') . ' Релизы', 'url' => ['/admin/release']], Yii::$app->user->isGuest ? ['label' => FA::icon('sign-in') . ' Авторизация', 'url' => ['/login']] : ['label' => FA::icon('sign-out') . ' Выход (' . Yii::$app->user->identity->username . ')', 'url' => ['/logout'], 'linkOptions' => ['data-method' => 'post']], ['label' => 'Открыть сайт', 'url' => Url::home(), 'linkOptions' => ['target' => '_blank']]]]); NavBar::end(); ?> <div class="container"> <?php echo Breadcrumbs::widget(['homeLink' => ['label' => 'Home', 'url' => Url::to('/admin')], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]); ?> <?php echo $content; ?> </div> </div> <footer class="footer"> <div class="container">
public function testIconFlipException() { $this->setExpectedException('yii\\base\\InvalidConfigException', 'FA::flip() - invalid value. Use one of the constants: FA::FLIP_HORIZONTAL, FA::FLIP_VERTICAL.'); FA::icon('cog')->flip('badvalue'); }
</div> <div class="col-md-1"> <div class="equal"> <?php echo Html::img('@web/images/equal.png', ['class' => 'multiply']); ?> </div> </div> <div class="col-md-3"> <div class="form-group" style="display: inline;" > <div class="input-group"> <input type="number" id="prise" disabled class="form-control" form="buy_coupon" name="prise" min="1" placeholder="Сумма" > <span class="input-group-addon"><?php echo FA::icon('rub'); ?> </span> </div> </div> </div> <div class="col-md-3"> <div class="form-group"> <?php echo Html::submitButton('КУПИТЬ', ['class' => 'btn btn-warning btn-block', 'id' => 'payCoupon']); ?> </div> </div>
echo $this->render('_general_content', ['ActiveForm' => $ActiveForm, 'PageEditForm' => $PageEditForm]); ?> </uib-tab> <uib-tab heading="Meta"> <?php echo $this->render('_general_meta', ['ActiveForm' => $ActiveForm, 'PageEditForm' => $PageEditForm]); ?> </uib-tab> </uib-tabset> <?php ?> </div> </div> </div> <div class="box-footer"> <?php echo Html::submitButton(FA::icon('check') . ' ' . Yii::t('cookyii', 'Save'), ['class' => 'btn btn-success', 'ng-disabled' => 'in_progress']); echo Html::button(Yii::t('cookyii', 'Cancel'), ['class' => 'btn btn-link', 'ng-click' => 'reload()']); ?> </div> <div class="overlay" ng-if="inProgress"> <?php echo FA::icon('cog')->spin(); ?> </div> </div> <?php ActiveForm::end();
/** * Renders menu items. * @param array $items the menu items to be rendered * @param array $options the container HTML attributes * @return string the rendering result. * @throws InvalidConfigException if the label option is not specified in one of the items. */ protected function renderItems($items, $options = []) { $lines = []; foreach ($items as $item) { if (isset($item['visible']) && !$item['visible']) { continue; } if (is_string($item)) { $lines[] = $item; continue; } if (!isset($item['label']) && !isset($item['icon'])) { throw new InvalidConfigException("The 'label' option is required."); } $encodeLabel = isset($item['encode']) ? $item['encode'] : $this->encodeLabels; $label = ArrayHelper::getValue($item, 'label', ''); if ($encodeLabel) { $label = Html::encode($label); } $icon = ArrayHelper::getValue($item, 'icon'); if ($icon) { $label .= ' ' . FA::icon($icon); } $itemOptions = ArrayHelper::getValue($item, 'options', []); $linkOptions = ArrayHelper::getValue($item, 'linkOptions', []); $linkOptions['tabindex'] = '-1'; $url = array_key_exists('url', $item) ? $item['url'] : null; if (empty($item['items'])) { if ($url === null) { $content = $label; } else { $content = Html::a($label, $url, $linkOptions); } } else { $submenuOptions = $this->submenuOptions; if (isset($item['submenuOptions'])) { $submenuOptions = array_merge($submenuOptions, $item['submenuOptions']); } $content = Html::a($label, $url === null ? '#' : $url, $linkOptions) . $this->renderItems($item['items'], $submenuOptions); Html::addCssClass($itemOptions, ['widget' => 'dropdown-submenu']); } $lines[] = Html::tag('li', $content, $itemOptions); } return Html::tag('ul', implode("\n", $lines), $options); }
<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 \yii\widgets\Pjax::end(); echo $this->render('editModal', ['model' => new \backend\modules\comments\models\CommentForm()]);
</div> <div class="col-md-10"> <span class="pull-left creater"> <?php echo $commentt->user->username; ?> </span> <span><?php echo strftime('%d.%m.%Y %H:%M', $commentt->create_at - 60 * 60); ?> </span> <span class="pull-right "> <?php if (Yii::$app->user->can('admin')) { ?> <?php echo Html::a(FA::icon('trash'), ['delete-comment', 'id' => $commentt->id], ['class' => 'btn btn-danger btn-xs', 'onclick' => 'delete_comment("' . $commentt->id . '",' . $commentt->product_id . ');return false;', 'data-toggle' => "tooltip", 'data-placement' => "top", 'title' => "Удалить комментарий"]); ?> <?php } ?> </span> <div class="review"> <?php echo $commentt->comment; ?> </div> </div> <hr> </div> <?php
<?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']);
/** * @inheritdoc */ public function menu($Controller) { return [['label' => \Yii::t('cookyii.postman', 'Postman'), 'url' => ['/postman'], 'icon' => FA::icon('envelope'), 'visible' => User()->can(\cookyii\modules\Postman\backend\Permissions::ACCESS), 'selected' => $Controller->module->id === 'postman', 'sort' => 9000, 'items' => [['label' => \Yii::t('cookyii.postman', 'Messages'), 'url' => ['/postman/message/list'], 'icon' => FA::icon('send'), 'selected' => $Controller->module->id === 'postman' && $Controller->id === 'message'], ['label' => \Yii::t('cookyii.postman', 'Templates'), 'url' => ['/postman/template/list'], 'icon' => FA::icon('table'), 'selected' => $Controller->module->id === 'postman' && $Controller->id === 'template']]]]; }
$AuthAuthChoiceClients = $authAuthChoice->getClients(); if (!empty($AuthAuthChoiceClients)) { ?> <div class="social-auth-links text-center"> <p>- OR -</p> <?php foreach ($authAuthChoice->getClients() as $Client) { $name = $Client->getName(); $icon = $name; if ($icon === 'live') { $icon = 'windows'; } if ($icon === 'vkontakte') { $icon = 'vk'; } if ($icon === 'yandex') { $icon = 'yahoo'; } $icon = FA::icon($icon); echo Html::a(sprintf('%s Sign in using %s', $icon, $Client->getName()), $authAuthChoice->createClientUrl($Client), ['class' => sprintf('btn btn-block btn-flat btn-social btn-%s', $name)]); } ?> </div> <?php } \yii\authclient\widgets\AuthChoice::end(); ?> <a href="#">I forgot my password</a><br> </div> </div>
/** * @inheritdoc */ public function menu($Controller) { return [['label' => \Yii::t('cookyii.account', 'Accounts'), 'url' => ['/account/list/index'], 'icon' => FA::icon('user'), 'visible' => User()->can(Account\backend\Permissions::ACCESS), 'selected' => $Controller->module->id === 'account', 'sort' => 10000]]; }