/** * Indexing Zend Lucene Search * @throws \yii\base\InvalidConfigException */ public function actionSearchIndexing() { /** @var \himiklab\yii2\search\Search $search */ if (Post::zendLuceneIndexing()) { Yii::$app->session->setFlash('success', Module::t('module', 'FLASH_INDEXING_SEARCH_SUCCESS')); } else { Yii::$app->session->setFlash('error', Module::t('module', 'FLASH_INDEXING_SEARCH_ERROR')); } return $this->redirect(['default/index'], 301); }
<p> <?php if (PostComment::getCountComments($model->id) > 0) { ?> <span class="glyphicon glyphicon-comment"></span> <a href="<?php echo Url::to(['default/view', 'id' => $model->id, '#' => 'comments']); ?> "><?php echo Module::t('module', 'COMMENTS:{count}', ['count' => PostComment::getCountComments($model->id)]); ?> </a> | <?php } ?> <?php if ($model->tagLinks) { ?> <span class="glyphicon glyphicon-tags"></span> <?php echo Tags::array2string($model->tagLinks); ?> <?php } ?> </p> <?php echo Html::a(Module::t('module', 'READ_MORE') . ' <span class="glyphicon glyphicon-chevron-right"></span>', ['default/view', 'id' => $model->id], ['class' => 'btn btn-primary']); ?> <hr>
<?php use yii\helpers\Html; use yii\helpers\Url; use app\modules\blog\Module; ?> <?php echo Html::beginForm(Url::to(['search']), 'get', ['class' => 'form-inlin']); ?> <div class="input-group"> <?php echo Html::textInput('q', $text, ['class' => 'form-control', 'placeholder' => Module::t('module', 'BUTTON_SEARCH'), 'require' => 'require']); ?> <span class="input-group-btn"> <?php echo Html::submitButton('<span class="glyphicon glyphicon-search"></span>', ['class' => 'btn btn-default']); ?> </span> </div><!-- /input-group --> <?php echo Html::endForm();
Portlet::begin(['title' => '<span class="glyphicon glyphicon-calendar"></span> ' . Module::t('module', 'TITLE_ARCHIVE'), 'htmlOptions' => ['class' => 'well']]); ?> <?php echo BlogArchive::widget(); ?> <?php Portlet::end(); ?> <?php Portlet::begin(['title' => '<span class="glyphicon glyphicon-list"></span> ' . Module::t('module', 'TITLE_RECENT_POSTS'), 'htmlOptions' => ['class' => 'well']]); ?> <?php echo RecentPostsWidget::widget(); ?> <?php Portlet::end(); ?> <?php Portlet::begin(['title' => '<span class="glyphicon glyphicon-comment"></span> ' . Module::t('module', 'TITLE_RECENT_COMMENTS'), 'htmlOptions' => ['class' => 'well']]); ?> <?php echo RecentCommentsWidget::widget(); ?> <?php Portlet::end(); ?> </div> </div>
public static function getStatusesArray() { return [self::STATUS_PUBLISH => Module::t('module', 'STATUS_PUBLISH'), self::STATUS_UNPUBLISH => Module::t('module', 'STATUS_UNPUBLISH')]; }
public function exportMenu() { return ['admin' => [['label' => Module::t('blog', "Blog"), 'url' => ['/blog/admin']]]]; }