Ejemplo n.º 1
0
 /**
  * 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);
 }
Ejemplo n.º 2
0
<p>
    <?php 
if (PostComment::getCountComments($model->id) > 0) {
    ?>
        <span class="glyphicon glyphicon-comment"></span>&nbsp; <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>&nbsp; <?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>
Ejemplo n.º 3
0
<?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();
Ejemplo n.º 4
0
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>
Ejemplo n.º 5
0
 public static function getStatusesArray()
 {
     return [self::STATUS_PUBLISH => Module::t('module', 'STATUS_PUBLISH'), self::STATUS_UNPUBLISH => Module::t('module', 'STATUS_UNPUBLISH')];
 }
Ejemplo n.º 6
0
 public function exportMenu()
 {
     return ['admin' => [['label' => Module::t('blog', "Blog"), 'url' => ['/blog/admin']]]];
 }