Ejemplo n.º 1
0
        <?php 
if (count($emptyBaseNews)) {
    ?>
            <ul class="list-group">
                <?php 
    echo GridListHeader::widget(['columns' => [["width" => 1, "label" => HLib::t('labels', 'Enabled')], ["width" => 4, "label" => HCms::t('labels', 'Base news without related news')], ["width" => 5, "label" => HCms::t('labels', 'Tags')], ["width" => 2, "label" => HLib::t('labels', 'Actions'), "cssClass" => "object-actions text-right"]]]);
    ?>

                <?php 
    foreach ($emptyBaseNews as $baseModel) {
        ?>
                    <li class="list-group-item">
                        <div class="row">
                            <div class="col-sm-1">
                                <?php 
        echo hAssets::getImageTagForBoolean($baseModel['enabled']);
        ?>
                            </div>

                            <div class="col-sm-4">
                                <?php 
        echo Html::a($baseModel['event_date'], Url::to(['/cms/base-news/update', 'id' => $baseModel['id']]));
        ?>
                            </div>

                            <div class="col-sm-5">
                                <?php 
        echo implode(',', $baseModel->baseTagsCodes());
        ?>
                            </div>
Ejemplo n.º 2
0
 /**
  * @param array $column
  * @return string
  * @throws InvalidConfigException
  */
 public function renderColumnContent(array $column)
 {
     switch ($column['columnType']) {
         case 'simple':
             $out = $column['label'];
             break;
         case 'sort':
             $sortClauses = Yii::$app->session->get($this->sortClausesSessionKey);
             $out = Html::a($column['label'], Url::to([$this->sortAction, 'orderBy' => $column['orderBy']])) . '&nbsp;&nbsp;' . hAssets::bootstrapSortGraphicTag(ArrayHelper::getValue($sortClauses, $column['orderBy']), $column['iconType']);
             break;
         default:
             throw new InvalidConfigException('Type de colonne inconnu : ' . $column['columnType']);
     }
     return $out;
 }
Ejemplo n.º 3
0
    echo LinkPager::widget(['pagination' => $dataProvider->getPagination()]);
    ?>

            <ul class="list-group">
                <?php 
    echo GridListHeader::widget(['columns' => [["width" => 1, "label" => HLib::t('labels', 'Enabled')], ["width" => 1, "label" => HCms::t('labels', 'Base')], ["width" => 1, "label" => HCms::t('labels', 'Language')], ["width" => 4, "label" => HLib::t('labels', 'Title')], ["width" => 3, "label" => HCms::t('labels', 'Menu')], ["width" => 2, "label" => HLib::t('labels', 'Actions'), "cssClass" => "object-actions text-right"]]]);
    ?>

                <?php 
    foreach ($models as $model) {
        ?>
                    <li class="list-group-item">
                        <div class="row">
                            <div class="col-sm-1">
                                <?php 
        echo hAssets::getImageTagForBoolean($model->base->enabled);
        ?>
                            </div>

                            <div class="col-sm-1">
                                <?php 
        echo $model->base->code;
        ?>
                            </div>

                            <div class="col-sm-1">
                                <?php 
        echo $model->language->iso_639_code;
        ?>
                            </div>
Ejemplo n.º 4
0
$this->title = HCms::t('labels', 'View news');
?>
<div class="row panel panel-default">
    <div class="panel-heading">
        <h1><?php 
echo Html::encode($model->title);
?>
</h1>
    </div>

    <div class="panel-body">

        <?php 
echo ViewButtons::widget(['modelId' => $model->id, 'controllerPath' => '/cms/web-news']);
?>

        <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['title', 'description', ['label' => HCms::t('label', 'Body'), 'value' => $model->body, 'format' => 'html']]]);
?>

        <?php 
echo DetailView::widget(['model' => $model, 'attributes' => [['label' => HLib::t('labels', 'Enabled'), 'value' => \app\modules\hlib\helpers\hAssets::getImageTagForBoolean($model->isEnabled()), 'format' => 'html'], ['label' => HCms::t('labels', 'Base news'), 'value' => ViewModelsList::widget(['models' => $model->base, 'labelField' => 'event_date', 'controllerRoute' => '/cms/base-news', 'listType' => 'div']), 'format' => 'html'], ['label' => HCms::t('labels', 'Language'), 'value' => $model->language->iso_639_code]]]);
?>

        <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['created_at', 'updated_at']]);
?>

    </div>
</div>
Ejemplo n.º 5
0
            <?php 
echo Html::a(HLib::t('labels', 'Back to List'), Url::to(['/cms/web-pages/index']), ['class' => 'btn btn-primary']);
?>

            <?php 
echo Html::a(HLib::t('labels', 'Update'), Url::to(['/cms/base-pages/update', 'id' => $model->id]), ['class' => 'btn btn-success']);
?>

            <?php 
echo Html::a(HLib::t('labels', 'Delete'), Url::to(['/cms/base-pages/delete', 'id' => $model->id]), ['class' => 'btn btn-danger', 'data' => ['confirm' => HLib::t('messages', 'Are you sure you want to delete this item?'), 'method' => 'delete']]);
?>
        </div>

        <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['code', 'route', 'redirect_to', 'menu_index']]);
?>

        <?php 
echo DetailView::widget(['model' => $model, 'attributes' => [['label' => HCms::t('labels', 'Page parent'), 'value' => ViewModelsList::widget(['models' => $model->getParent()->one(), 'controllerRoute' => '/cms/base-pages', 'labelField' => 'code', 'listType' => 'div']), 'format' => 'html'], ['label' => HCms::t('labels', 'Pages'), 'value' => ViewModelsList::widget(['models' => $model->webPages, 'controllerRoute' => '/cms/web-pages', 'labelCallback' => function (WebPage $page) {
    $lang = $page->language->iso_639_code;
    return "[{$lang}]&nbsp;&nbsp;" . $page->title;
}]), 'format' => 'html']]]);
?>

        <?php 
echo DetailView::widget(['model' => $model, 'attributes' => [['label' => HLib::t('labels', 'Enabled'), 'value' => hAssets::getImageTagForBoolean($model->enabled), 'format' => 'html'], 'created_at', 'updated_at']]);
?>

    </div>
</div>