예제 #1
0
 * @var Role         $model
 */
$this->title = HUsers::t('titles', 'View role') . ' : ' . $model->name;
?>
<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']]);
?>
예제 #2
0
<div class="row panel panel-default">
    <div class="panel-heading">
        <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>
예제 #3
0
<div class="row panel panel-default">
    <div class="panel-heading">
        <h1><?php 
echo $this->title;
?>
</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']]);