Ejemplo n.º 1
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.º 2
0
        <h1><?php 
echo $this->title;
?>
</h1>
        <h2><?php 
echo Html::encode($model->title);
?>
</h2>
    </div>

    <div class="panel-body">

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

        <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['title', 'meta_description', 'meta_keywords']]);
?>

        <?php 
echo DetailView::widget(['model' => $model, 'attributes' => [['label' => HCms::t('labels', 'Language'), 'value' => $model->language->iso_639_code], ['label' => HCms::t('labels', 'Base page'), 'value' => ViewModelsList::widget(['models' => $model->base, 'labelField' => 'code', 'controllerRoute' => '/cms/base-pages', 'listType' => 'div']), 'format' => 'html'], ['label' => HCms::t('labels', 'Texts'), 'value' => ViewModelsList::widget(['models' => $relatedTexts, 'labelField' => 'title', 'controllerRoute' => '/cms/web-texts', 'listType' => 'div']), 'format' => 'html']]]);
?>

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

    </div>
</div>
Ejemplo n.º 3
0
<div class="row panel panel-default">
    <div class="panel-heading">
        <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    </div>

    <div class="panel-body">

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

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

        <?php 
echo DetailView::widget(['model' => $model, 'attributes' => [['label' => HUsers::t('labels', 'Users'), 'value' => ViewModelsList::widget(['models' => $model->users, 'labelMethod' => function (User $user) {
    return $user->name . ' (' . $user->email . ')';
}, 'controllerRoute' => '/users/users']), 'format' => 'html']]]);
?>

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

    </div>
</div>
Ejemplo n.º 4
0
</h1>
        <h2><?php 
echo Html::encode($model->code);
?>
</h2>
    </div>

    <div class="panel-body">

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

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

        <?php 
echo DetailView::widget(['model' => $model, 'attributes' => [['label' => HCms::t('labels', 'Web tags'), 'value' => ViewModelsList::widget(['models' => $model->webTags, 'controllerRoute' => '/cms/web-tags', 'labelCallback' => function (WebTag $tag) {
    $lang = $tag->language->iso_639_code;
    return "[{$lang}]&nbsp;&nbsp;" . $tag->label;
}]), 'format' => 'html']]]);
?>

        <?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>
Ejemplo n.º 6
0
?>
</h1>
        <h2><?php 
echo Html::encode($model->title);
?>
</h2>
    </div>

    <div class="panel-body">

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

        <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['title', 'subtitle', 'description', 'body:html']]);
?>

        <?php 
echo DetailView::widget(['model' => $model, 'attributes' => [['label' => HCms::t('labels', 'Language'), 'value' => $model->language->iso_639_code], ['label' => HCms::t('labels', 'Base text'), 'value' => ViewModelsList::widget(['models' => $model->base, 'labelField' => 'code', 'controllerRoute' => '/cms/base-texts', 'listType' => 'div']), 'format' => 'html'], ['label' => HCms::t('labels', 'Pages'), 'value' => ViewModelsList::widget(['models' => $relatedPages, 'labelMethod' => function (WebPage $page) {
    return '(' . $page->base->code . ') ' . $page->title;
}, 'controllerRoute' => '/cms/web-pages', 'listType' => 'div']), 'format' => 'html']]]);
?>

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

    </div>
</div>
Ejemplo n.º 7
0
</h1>
        <h2><?php 
echo Html::encode($model->event_date);
?>
</h2>
    </div>

    <div class="panel-body">

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

        <?php 
echo DetailView::widget(['model' => $model, 'attributes' => [['label' => HCms::t('labels', 'Event date'), 'value' => utf8_encode(Carbon::createFromFormat('Y-m-d', $model->event_date)->formatLocalized('%A %d %B %Y'))]]]);
?>

        <?php 
echo DetailView::widget(['model' => $model, 'attributes' => [['label' => HCms::t('labels', 'Web news'), 'value' => ViewModelsList::widget(['models' => $model->webNews, 'controllerRoute' => '/cms/web-news', 'labelCallback' => function (WebNews $news) {
    $lang = $news->language->iso_639_code;
    return "[{$lang}]&nbsp;&nbsp;" . $news->title;
}, 'listType' => 'div']), '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>