For example, breadcrumbs like "Home / Sample Post / Edit" means the user is viewing an edit page
for the "Sample Post". He can click on "Sample Post" to view that page, or he can click on "Home"
to return to the homepage.
To use Breadcrumbs, you need to configure its [[links]] property, which specifies the links to be displayed. For example,
php
$this is the view object currently being used
echo Breadcrumbs::widget([
'itemTemplate' => "{link} \n", // template for all links
'links' => [
[
'label' => 'Post Category',
'url' => ['post-category/view', 'id' => 10],
'template' => "{link} \n", // template for this link only
],
['label' => 'Sample Post', 'url' => ['post/edit', 'id' => 1]],
'Edit',
],
]);
Because breadcrumbs usually appears in nearly every page of a website, you may consider placing it in a layout view.
You can use a view parameter (e.g. $this->params['breadcrumbs']) to configure the links in different
views. In the layout view, you assign this view parameter to the [[links]] property like the following:
php
$this is the view object currently being used
echo Breadcrumbs::widget([
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
]);
public function run() { $default = Lang::getLang()->code; $currentCode = \Yii::$app->language; foreach ($this->links as &$link) { if (is_array($link) && $default != $currentCode) { $link['url']['lang'] = $currentCode; } } return parent::run(); }
public function run() { echo Html::beginTag('div', ['class' => 'header']); if (isset($this->title)) { echo Html::tag('h2', $this->title); } echo Html::beginTag('div', ['class' => 'breadcrumb-wrapper']); parent::run(); echo Html::endTag('div'); echo Html::endTag('div'); }
public function addBreadcrumbs() { $view = Yii::$app->getView(); // No need to add breadcrumbs, if they are completely empty if (!isset($view->params['breadcrumbs'])) { return null; } $header = Html::tag('h1', $view->title . ($view->params['subtitle'] ? Html::tag('small', $view->params['subtitle']) : '')); $breadcrumbs = Breadcrumbs::widget(['homeLink' => ['label' => '<i class="fa fa-dashboard"></i> ' . Yii::t('hipanel', 'Home'), 'url' => '/'], 'encodeLabels' => false, 'tag' => 'ol', 'links' => isset($view->params['breadcrumbs']) ? $view->params['breadcrumbs'] : []]); $content = Json::htmlEncode(Html::tag('section', $header . $breadcrumbs, ['class' => 'content-header'])); Yii::$app->getView()->registerJs(new JsExpression(<<<JS \$('.content-header li a').on('click', function (event) { var container = \$('#{$this->id}'); \$.pjax.click(event, {container: container}); }); \$('.content-header').replaceWith({$content}); JS ), \yii\web\View::POS_READY); }
public function init() { if ($this->title === null) { $this->title = 'Dashboard'; } if ($this->subtitle === null) { $this->subtitle = '<small>Version 2.0</small>'; } elseif ($this->subtitle != '') { $this->subtitle = '<small>' . Html::encode($this->subtitle) . '</small>'; } if ($this->breadcrumbs === null) { $this->breadcrumbs = '<ol class="breadcrumb"> <li><a href="#">Home</a></li> <li class="active">Dashboard</li> </ol>'; } elseif ($this->breadcrumbs === []) { $this->breadcrumbs = '<ol class="breadcrumb"> <li><pre>SET $this[params]->breadcrumbs</pre></li> </ol>'; } else { $this->breadcrumbs = Breadcrumbs::widget(['links' => $this->breadcrumbs]); } }
/** * Initializes the widget. * This renders the form open tag. */ public function init() { $breadcrumbs = \yii\widgets\Breadcrumbs::widget(['homeLink' => ['label' => \Yii::t("yii", "Home"), 'url' => ['admin/index', 'namespace' => 'admin']], 'links' => isset(\Yii::$app->view->params['breadcrumbs']) ? \Yii::$app->view->params['breadcrumbs'] : []]); $alert = \skeeks\cms\modules\admin\widgets\Alert::widget(); $actions = \Yii::$app->view->params['actions']; echo <<<HTML <div class="main"> <div class="col-lg-12"> <div class="panel panel-primary sx-panel sx-panel-content"> <div class="panel-heading sx-no-icon"> <h2> {$breadcrumbs} </h2> <div class="panel-actions"></div> </div><!-- End .panel-heading --> <div class="panel-body"> <div class="panel-content-before"> {$actions} </div> <div class="panel-content"> {$alert} HTML; }
<section class="content-header"> <?php if (isset($this->params['header'])) { ?> <h1><?php echo $this->params['header']; ?> </h1> <?php } ?> <?php if (isset($this->params['breadcrumbs'])) { ?> <?php echo Breadcrumbs::widget(['options' => ['class' => 'breadcrumb'], 'encodeLabels' => false, 'homeLink' => ['label' => '<i class="fa fa-dashboard"></i> Главная', 'url' => ['/site/index']], 'links' => $this->params['breadcrumbs']]); ?> <?php } ?> </section> <?php if (isset($this->params['toolbar'])) { echo '<div class="content-header">'; foreach ($this->params['toolbar'] as $button) { echo $button . " "; } echo '</div>'; } ?>
<?php use yii\helpers\Html; use yii\widgets\Breadcrumbs; use zabachok\burivuh\assets\BurivuhAsset; BurivuhAsset::register($this); $this->registerJs('burivuh.view.init();'); echo Breadcrumbs::widget(['links' => isset($breadcrumbs) ? $breadcrumbs : [], 'homeLink' => false]); ?> <?php echo $this->render('_panel', ['model' => $model]); ?> <div class="row"> <div class="col-md-12"> <h2><?php echo Yii::t('burivuh', 'Hot keys'); ?> </h2> <span class="label label-default">Ctrl</span> + <span class="label label-default">e</span> - <?php echo Yii::t('burivuh', 'edit the document'); ?> <br> </div> </div>
$iduser = $an['ID']; $nama = $an['NAMA']; $email = $an['EMAIL']; } } else { $iduser = ''; $nama = ""; $email = ""; } ?> <!-- Main content --> <section class="content"> <div class="col-md-12"> <h5> <?php echo Breadcrumbs::widget(['itemTemplate' => "<li><b>{link}</b></li>\n", 'links' => [['label' => 'User Management', 'url' => [''], 'template' => "<li><b>{link}</b></li>\n"]]]); ?> </h5> </div> <table><div id="form_user"> <input type="hidden" name="iduser" id="iduser" value="<?php echo $iduser; ?> "> <tr><td>Nama</td><td><input type="text" class="form-control" id="nama" name="nama" size="50" value=""/></td> <td width="50"></td><td>Password</td><td><input type="text" class="form-control" id="pass" name="pass" value="" size="50"/></td> </tr> <tr><td>Nik</td><td><input type="text" class="form-control" id="nik" name="nik" value="" size="50"/></td> <td width="50"></td><td>Access</td> <td><input type="checkbox" name="dsb" id="dsb" value="DSB"> Dashboard <input type="checkbox" id="scc" name="scc" value="SCC"> Scalling Campaign <input type="checkbox" name="suc" id="suc" value="SUC"> Sustaining Campaign</td></tr>
public function init() { parent::init(); $this->options = ['class' => 'page-breadcrumb']; //Html::addCssClass($this->options, 'page-breadcrumb'); }
// $menuItems[] = ['label' => 'Зарегистрироваться', 'url' => ['/site/signup']]; // $menuItems[] = ['label' => 'Войти', 'url' => ['/site/login']]; // } else { // $menuItems[] = [ // 'label' => 'Выйти (' . 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(); ?> <div class="container"> <?php echo Breadcrumbs::widget(['homeLink' => ['label' => 'Главная', 'url' => '/'], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]); ?> <?php echo Alert::widget(); ?> <?php echo $content; ?> </div> </div> <footer class="footer"> <div class="container"> <p class="pull-left">© Меняла <?php echo date('Y'); ?>
/* @var $this yii\web\View */ /* @var $searchModel backend\models\UserSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('backend', 'Users'); $this->params['breadcrumbs'][] = $this->title; ?> <!-- BEGIN PAGE HEADER--> <h3 class="page-title"> <?php echo Html::encode($this->title); ?> </h3> <div class="page-bar"> <?php echo Breadcrumbs::widget(['itemTemplate' => "<li>{link}<i class='fa fa-angle-right'></i></i></li>\n", 'activeItemTemplate' => "<li>{link}</li>\n", 'options' => ['class' => 'page-breadcrumb'], 'homeLink' => ['label' => Yii::t('backend', 'Home'), 'url' => Yii::$app->homeUrl, 'template' => "<li><i class='fa fa-home'></i>{link}<i class='fa fa-angle-right'></i></li>\n"], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]); ?> </div> <!-- END PAGE HEADER--> <!-- BEGIN PAGE CONTENT--> <div class="row"> <div class="col-md-12"> <?php echo Alert::widget(); ?> <!-- Begin: life time stats --> <div class="user-index portlet light"> <div class="portlet-title"> <div class="caption"> <?php echo Html::encode($this->title);
echo $this->blocks['content-header']; ?> <?php } else { ?> <div class="col-sm-<?php echo isset($this->blocks['content-header-actions']) ? 6 : 12; ?> "> <h2><?php echo $this->title; ?> </h2> <?php echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], 'activeItemTemplate' => "<li class=\"active\"><strong>{link}</strong></li>\n"]); ?> </div> <?php if (isset($this->blocks['content-header-actions'])) { ?> <div class="col-sm-6"> <div class="title-action"> <?php echo $this->blocks['content-header-actions']; ?> </div> </div> <?php } }
use backend\models\ErrorLogSearch; use yii\grid\GridView; use yii\widgets\Pjax; use yii\helpers\Html; use yii\widgets\Breadcrumbs; use yii\widgets\ActiveForm; use backend\services\LogTypeService; ?> <div class="row"> <div id="breadcrumb" class="col-xs-12"> <a href="#" class="show-sidebar"> <i class="fa fa-bars"></i> </a> <ol class="breadcrumb pull-left"> <?php echo Breadcrumbs::widget(['itemTemplate' => "<li>{link}</li>\n", 'links' => [['label' => '错误信息', 'url' => ['/ajax/error/index'], 'class' => 'ajax-link']]]); ?> </ol> <div id="social" class="pull-right"> <?php /** <a href="#"><i class="fa fa-google-plus"></i></a> <a href="#"><i class="fa fa-facebook"></i></a> <a href="#"><i class="fa fa-twitter"></i></a> <a href="#"><i class="fa fa-linkedin"></i></a> <a href="#"><i class="fa fa-youtube"></i></a> * */ ?> </div> </div>
function __construct() { parent::__construct(); $this->defaultOptions = ['itemscope' => true, 'itemtype' => 'http://schema.org/BreadcrumbList']; }
<?php /* * @author Lmy * QQ:6232967 * Create at 2015-12-24 11:09:21 */ echo \yii\widgets\Breadcrumbs::widget(['homeLink' => ['label' => '首页', 'url' => yii\helpers\Url::to(['site/index']), 'template' => '<div class="weizhi-zt">您现在的位置:{link}'], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], 'options' => ['class' => 'weizhi'], 'tag' => 'div', 'itemTemplate' => ' > {link}', 'activeItemTemplate' => ' > {link}']) . "</div>"; ?>
<?php use yii\helpers\Html; use yii\widgets\Breadcrumbs; use yii\widgets\ActiveForm; use backend\services\LogTypeService; use yii\helpers\Url; ?> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> 自定义日志 </h1> <?php echo Breadcrumbs::widget(['tag' => 'ol', 'itemTemplate' => "<li>{link}</li>\n", 'links' => [['label' => '日志列表', 'url' => ['/ajax/customlog/index']]]]); ?> </section> <section class="content"> <div class="row"> <div class="col-xs-12"> <div class="box"> <div class="box-header"> <h3 class="box-title">增加自定义日志</h3> <div class="box-tools"> <ul class="pagination pagination-sm no-margin pull-right"> <li><a href="<?php echo Url::toRoute('/ajax/customlog/add'); ?> "><i class="fa fa-fw fa-plus"></i></a></li> </ul>
<?php echo $this->title; ?> <?php if (isset($this->params['subtitle'])) { ?> <small><?php echo $this->params['subtitle']; ?> </small> <?php } ?> </h1> <?php echo Breadcrumbs::widget(['homeLink' => ['label' => '<i class="fa fa-dashboard"></i> ' . Yii::t('app', 'Home'), 'url' => ['/']], 'encodeLabels' => false, 'tag' => 'ol', 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]); ?> </section> <!-- Main content --> <section class="content"> <div class="box box-primary"> <div class="box-body"> <?php echo \common\widgets\Alert::widget(); ?> <?php echo $content; ?> </div> </div>
<?php use yii\widgets\Breadcrumbs; $this->title = Yii::t('burivuh', 'History of document: {title}', ['title' => $model->title]); $breadcrumbs = array_merge($model->getBreadcrumbs(1), ['label' => Yii::t('burivuh', 'History')]); echo Breadcrumbs::widget(['links' => $breadcrumbs, 'homeLink' => ['label' => Yii::t('burivuh', 'Root'), 'url' => ['/burivuh/category/index']]]); $callback = \Yii::$app->getModule('burivuh')->usernameCallback; ?> <h1><?php echo $this->title; ?> </h1> <table class="table"> <tr> <th><?php echo Yii::t('burivuh', 'Date'); ?> </th> <th><?php echo Yii::t('burivuh', 'Title'); ?> </th> <th><?php echo Yii::t('burivuh', 'Diff'); ?> </th> <th><?php echo Yii::t('burivuh', 'User'); ?> </th> <th></th>
<body> <?php $this->beginBody(); ?> <div class="wrap"> <?php //TODO переделать меню под нормальный вид NavBar::begin(['brandLabel' => 'MYKEYWORDS.RU', 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]); echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => [['label' => 'Главная', 'url' => ['/site/index'], 'visible' => Yii::$app->user->isGuest], ['label' => 'О нас', 'url' => ['/site/about'], 'visible' => Yii::$app->user->isGuest], ['label' => 'Контакты', 'url' => ['/site/contact'], 'visible' => Yii::$app->user->isGuest], ['label' => 'Пользователи', 'url' => ['/user/admin/'], 'visible' => Yii::$app->user->identity && Yii::$app->user->identity->isAdmin()], ['label' => 'Профиль', 'url' => ['/user/default/profil/'], 'visible' => !Yii::$app->user->isGuest], ['label' => 'Изменить пароль', 'url' => ['/user/default/change-password/'], 'visible' => !Yii::$app->user->isGuest], ['label' => 'Задания', 'url' => ['/tasks/'], 'visible' => !Yii::$app->user->isGuest], ['label' => 'Тикеты', 'url' => ['/ticket/'], 'visible' => !Yii::$app->user->isGuest], ['label' => 'Финансы', 'url' => ['/financy/'], 'visible' => !Yii::$app->user->isGuest], Yii::$app->user->isGuest ? ['label' => 'Регистрация', 'url' => ['/user/default/signup']] : '', Yii::$app->user->isGuest ? ['label' => 'Авторизация', 'url' => ['/user/default/login']] : ['label' => 'Выход (' . Yii::$app->user->identity->username . ')', 'url' => ['/user/default/logout'], 'linkOptions' => ['data-method' => 'post']]]]); NavBar::end(); ?> <div class="container"> <?php echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) && !Yii::$app->user->isGuest ? $this->params['breadcrumbs'] : []]); ?> <?php Alert::widget(); ?> <?php echo $content; ?> </div> </div> <footer class="footer"> <div class="container">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- beauty_up_adapt --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-6721896084353188" data-ad-slot="9892796747" data-ad-format="auto"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <div id="content"> <?php echo Breadcrumbs::widget(['itemTemplate' => '<span>{link}</span>', 'activeItemTemplate' => '<span class="breadcrumbs_active">{link}</span>', 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], 'options' => ['class' => 'breadcrumbs'], 'tag' => 'div']); ?> <?php echo AdvertWidget::widget(['block_number' => 4]); ?> <!-- Таблица контент-->
?> <div class="wrap"> <?php NavBar::begin(['options' => ['class' => 'navbar-inverse navbar-top']]); if (Yii::$app->user->isGuest) { echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-top'], 'items' => [['label' => 'Login', 'url' => ['/admin/default/login']]]]); } else { echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-top'], 'items' => [['label' => 'Logout (' . Yii::$app->user->identity->username . ')', 'url' => ['/admin/default/logout'], 'linkOptions' => ['data-method' => 'post']], ['label' => 'Керування користувачами', 'url' => ['/admin/admins/index']], ['label' => 'Керування контентом', 'url' => ['/admin/content/index']], ['label' => 'Керування учасниками та компаніями', 'url' => ['/admin/company/index']], ['label' => 'Керування подіями', 'url' => ['/admin/events/index']], ['label' => 'Керування розсилками', 'url' => ['/admin/mail/index']]]]); } NavBar::end(); ?> <div class="container"> <?php echo Breadcrumbs::widget([]); ?> <?php echo $content; ?> </div> </div> <footer class="footer"> <div class="container"> <p class="pull-left">© My Company <?php echo date('Y'); ?> </p> <p class="pull-right"><?php
echo '<div class="box-body"><div class="alert alert-danger alert-dismissable"><i class="icon fa fa-ban"></i>' . Yii::$app->getSession()->getFlash('danger') . 'danger<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button></div></div>'; } elseif (Yii::$app->getSession()->hasFlash('info')) { echo '<div class="box-body"><div class="alert alert-info alert-dismissable"><i class="icon fa fa-info"></i>' . Yii::$app->getSession()->getFlash('info') . 'info<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button></div></div>'; } elseif (Yii::$app->getSession()->hasFlash('warning')) { echo '<div class="box-body"><div class="alert alert-warning alert-dismissable"><i class="icon fa fa-warning"></i>' . Yii::$app->getSession()->getFlash('warning') . 'warning<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button></div></div>'; } elseif (Yii::$app->getSession()->hasFlash('success')) { echo '<div class="box-body"><div class="alert alert-success alert-dismissable"><i class="icon fa fa-check"></i>' . Yii::$app->getSession()->getFlash('success') . 'success<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button></div></div>'; } ?> <!-- Content Header (Page header) --> <section class="content-header"> <?php if (isset($this->params['breadcrumbs'])) { $params = ['tag' => 'ol', 'encodeLabels' => false, 'homeLink' => ['label' => '<i class="fa fa-dashboard"></i>' . Yii::t('common', 'Home'), 'url' => Yii::$app->homeUrl], 'links' => $this->params['breadcrumbs']]; echo Breadcrumbs::widget($params); } ?> </section> <!-- Main content --> <section class="content"> <a name="home" id="mark_home"></a> <?php echo $content; ?> </section> <!-- /.content --> </div> <!-- /.content-wrapper --> <footer class="main-footer">
<?php echo Yii::t('app', 'Help'); ?> </span> <span class="menu-hover"></span> </a> </li> </ul> </div><!-- /main-menu --> </div> <!-- /sidebar-inner --> </aside> <div id="main-container"> <div id="breadcrumb"> <?php echo Breadcrumbs::widget(['homeLink' => ['label' => Yii::t('app', 'Home'), 'url' => ['/user/dashboard']], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]); ?> </div><!-- /breadcrumb--> <div class="padding-md"> <?php echo Alert::widget(); ?> <div class="container-fluid"> <?php echo $content; ?> </div> </div><!-- /.padding-md --> </div> <footer>
<?php echo ThemeParts::renderPart('before-content'); ?> <div class="container"> <div class="row"> <?php if (!empty($leftSidebar)) { echo '<div class="left-sidebar col-md-' . $leftSidebarLength . ' col-xs-12">' . $leftSidebar . '</div>'; } ?> <div class="content-part col-md-<?php echo $contentLength; ?> col-xs-12"> <?php echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], 'options' => ['itemprop' => "breadcrumb", 'class' => 'breadcrumb']]); ?> <?php echo Alert::widget(); ?> <?php echo $content; ?> </div> <!-- content-part end --> <?php if (!empty($rightSidebar)) { echo '<div class="right-sidebar col-md-' . $rightSidebarLength . ' col-xs-12">' . $rightSidebar . '</div>'; } ?> </div> <!-- /row -->
?> <?php NavBar::begin(['brandLabel' => Yii::t('audit', 'Audit'), 'brandUrl' => ['default/index'], 'options' => ['class' => 'navbar-default navbar-fixed-top navbar-fluid'], 'innerContainerOptions' => ['class' => 'container-fluid']]); echo Nav::widget(['items' => [['label' => Yii::t('audit', 'Entries'), 'url' => ['entry/index']], ['label' => Yii::t('audit', 'Trails'), 'url' => ['trail/index']], ['label' => Yii::t('audit', 'Errors'), 'url' => ['error/index']]], 'options' => ['class' => 'navbar-nav']]); echo Nav::widget(['items' => [['label' => Yii::$app->name, 'url' => Yii::$app->getHomeUrl()]], 'options' => ['class' => 'navbar-nav navbar-right']]); NavBar::end(); ?> <div class="container-fluid"> <?php if (isset($this->params['breadcrumbs'])) { ?> <div class="breadcrumbs"> <?php echo Breadcrumbs::widget(['links' => $this->params['breadcrumbs']]); ?> </div> <?php } ?> <?php echo $content; ?> </div> <?php $this->endBody(); ?> </body> </html>
$accLogErr->date_reg = date('Y-m-d 00:00:00'); //$params['AccessLogssSearch']['date_reg'] = '2016-06-06 00:00:00'; //$accLogErr->date_reg = '2016-06-06 00:00:00'; } $thisDayErrorsLists = $accLogErr->search($params); $pager = $thisDayErrorsLists->getPagination(); $datas = $thisDayErrorsLists->getModels(); $begin = $pager->page * $pager->pageSize + 1; $end = $begin + $pager->pageSize - 1; if ($begin > $end) { $begin = $end; } ?> <div class="site-index"> <?php echo Breadcrumbs::widget(['itemTemplate' => "<li><i>{link}</i></li>\n", 'links' => [['label' => '首页']]]); ?> <div class="body-content"> <div class="panel panel-default"> <?php echo $this->render('common_top.php'); ?> <div class="panel-body"> <div class="tab-content"> <div class="tab-pane active"> <div class="row"> <div class="col-lg-12"> <table class="table table-bordered table-striped table-condensed"> <tbody> <tr>
/** * @var View $this * @var SourceMessageSearch $searchModel * @var ActiveDataProvider $dataProvider * @var array $tabContent */ use yii\data\ActiveDataProvider; use kartik\grid\GridView; use yii\helpers\Html; use yii\web\View; use yii\widgets\Breadcrumbs; use yarcode\i18n\models\SourceMessageSearch; use yarcode\i18n\backend\Module; $this->title = Module::t('Translations'); echo Breadcrumbs::widget(['links' => [$this->title]]); ?> <div class="message-index"> <h3><?php echo Html::encode($this->title); ?> </h3> <?php echo yii\bootstrap\Nav::widget(['items' => $menuItems, 'options' => ['class' => 'nav-tabs']]); ?> <?php echo GridView::widget(['filterModel' => $searchModel, 'dataProvider' => $dataProvider, 'columns' => [['attribute' => 'source', 'format' => 'raw', 'value' => function ($model, $index, $widget) { return Html::a($model->sourceMessage->message, ['update', 'id' => $model->sourceMessage->id], ['data' => ['pjax' => 0]]); }], ['class' => kartik\grid\EditableColumn::className(), 'attribute' => 'translation', 'editableOptions' => ['size' => 'md', 'placement' => \kartik\popover\PopoverX::ALIGN_TOP, 'inputType' => \kartik\editable\Editable::INPUT_TEXTAREA, 'formOptions' => ['action' => \yii\helpers\Url::to(['save-translate'])], 'pluginEvents' => ["editableSuccess" => "function(val) {\n var id = val.currentTarget.id;\n var row = \$('#'+id).closest('tr');\n row.next().find('.kv-editable-link').trigger('click').parent().find('.kv-editable-input').focus();\n }"]]], ['attribute' => 'category', 'value' => function ($data) {
use yii\widgets\ActiveForm; use yii\widgets\Breadcrumbs; use yii\helpers\BaseUrl; ?> <aside class="right-side"> <section class="content-header"> <h1> Upload Data </h1> </section> <section class="content"> <div class="col-md-12"> <h5> <?php echo Breadcrumbs::widget(['itemTemplate' => "<li><b>{link}</b></li>\n", 'links' => [['label' => 'Scalling Campaign', 'url' => [''], 'template' => "<li><b>{link}</b></li>\n"], ['label' => 'Customer Data', 'url' => ''], ['label' => 'Upload Data', 'url' => '']]]); ?> </h5> </div> <?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]); ?> <?php echo $form->field($model, 'file')->fileInput(); ?> <button>Submit</button> <?php
</head> <body> <?php $this->beginBody(); ?> <div class="wrap"> <?php NavBar::begin(['brandLabel' => \Yii::$app->name, 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse']]); echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => [['label' => 'События', 'items' => [['label' => 'Категории', 'url' => ['/article/category']], ['label' => 'Список', 'url' => ['/article/events']]]], ['label' => 'Каталог', 'items' => [['url' => ['/catalog/category'], 'label' => 'Категории'], ['url' => ['/catalog/brand'], 'label' => 'Бренды']]], ['label' => 'Настройки', 'url' => ['/settings/settings']], Yii::$app->user->isGuest ? ['label' => 'Login', 'url' => ['/site/login']] : ['label' => 'Logout (' . Yii::$app->user->identity->username . ')', 'url' => ['/site/logout'], 'linkOptions' => ['data-method' => 'post']]]]); NavBar::end(); ?> <div class="container"> <?php echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]); ?> <?php echo $content; ?> </div> </div> <footer class="footer"> <div class="container"> <p class="pull-left">© <?php echo \Yii::$app->name; ?> <?php echo date('Y'); ?>
<?php $main_menu = [['label' => 'Home', 'url' => ['/site/index']], ['label' => 'Contest', 'url' => ['contest/index'], 'active' => Yii::$app->controller instanceof app\controllers\ContestController || Yii::$app->controller instanceof app\controllers\EntryController ? true : false]]; if (!Yii::$app->user->isGuest) { array_push($main_menu, ['label' => 'Validate Tweets', 'url' => ['/tweet/validate']]); } echo Nav::widget(['options' => ['class' => 'nav navbar-nav'], 'activateParents' => true, 'items' => $main_menu]); echo Nav::widget(['options' => ['class' => 'nav navbar-nav navbar-right'], 'items' => [Yii::$app->user->isGuest ? ['label' => 'Login', 'url' => ['/site/login'], 'linkOptions' => ['class' => 'logout']] : ['label' => 'Logout (' . Yii::$app->user->identity->username . ')', 'url' => ['/site/logout'], 'linkOptions' => ['data-method' => 'post', 'class' => 'logout']]]]); ?> </nav> </div> </header> <div class="container"> <div class="row"> <div class="col-lg-12"> <?php echo Breadcrumbs::widget(['homeLink' => ['label' => Yii::t('yii', 'Home'), 'url' => Yii::$app->homeUrl], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]); ?> </div> </div> <div class="row"> <div class="col-lg-12"> <?php echo $content; ?> </div> </div> </div> <footer id="footer"> <div class="text-center">© Twitter Contest Score <?php echo date('Y'); ?>