<h1><?php echo Html::encode($this->title); ?> </h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a('Додати сторінку', ['create'], ['class' => 'btn btn-success']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'name', 'format' => 'raw', 'value' => function ($model) { if ($model->status) { $host = Yii::$app->request->hostInfo; $url = $host . '/' . $model->uri; return Html::a($model->name, Url::to($url), ['target' => '_blank']); } return $model->name; }, 'contentOptions' => ['style' => 'font-weight: bold; width: 250px;']], ['attribute' => 'content', 'value' => function ($model) { return Tool::getContent($model->content); }, 'contentOptions' => ['style' => 'width: 510px']], 'created', 'updated', ['attribute' => 'status', 'value' => function ($model) { return $model->status ? 'Опубліковано' : 'В черзі'; }], ['class' => 'yii\\grid\\ActionColumn', 'headerOptions' => ['width' => '30']]]]); ?> </div>
echo $article->id; ?> " class="post"> <h2 class="post-title"> <?php echo \yii\helpers\Html::a($article->title, $um->createUrl(['blog/single', 'uri' => $article->category->uri, 'id' => $article->id])); ?> </h2> <img src="/<?php echo $article->getImage()->getPath(); ?> " height="280" width="580" alt="no-photo"> <p class="article-description"><?php echo Tool::getContent($article->content); ?> </p> <p> <?php echo \yii\helpers\Html::a('Дізнатися більше', $um->createUrl(['blog/single', 'uri' => $article->category->uri, 'id' => $article->id]), ['class' => 'button']); ?> <p> </article> <?php } ?> <?php
echo Url::toRoute(['/pages']); ?> "> <i class="fa fa-file-text-o"></i> <span>Сторінки</span> </a> </li> <li <?php echo Tool::hasAddressBarIt('comments') ? "class='active'" : ''; ?> > <a href="<?php echo Url::toRoute(['/comments']); ?> "> <i class="fa fa-comments-o"></i> <span>Коментарі</span> </a> </li> <li class="header">Управління сайтом</li> <li <?php echo Tool::hasAddressBarIt('settings') ? "class='active'" : ''; ?> > <a href="<?php echo Url::toRoute(['/settings']); ?> "><i class="fa fa-cogs"></i> <span>Налаштування</span></a> </li> </ul><!-- /.sidebar-menu --> </section> <!-- /.sidebar --> </aside>