示例#1
0
<?php

/**
 * @var yii\web\View $this
 * @var app\models\Tag $modelTag
 */
$this->title = 'CRUD Tags';
?>

<h1>Просмотр информации по книге</h1>

<p>
    <a class="btn btn-primary" href="<?php 
echo yii\helpers\Url::to(['back-tag/index']);
?>
">Управление</a>
    <a class="btn btn-primary" href="<?php 
echo yii\helpers\Url::to(['back-tag/create']);
?>
">Добавить</a>
    <a class="btn btn-primary" href="<?php 
echo yii\helpers\Url::to(['back-tag/update', 'id' => $modelTag->id]);
?>
">Изменить</a>
</p>

<?php 
echo yii\widgets\DetailView::widget(['model' => $modelTag, 'attributes' => ['id', 'title', 'alias']]);
?>

示例#2
0
echo yii\helpers\Url::to(['back-book/index']);
?>
">Управление</a>
    <a class="btn btn-primary" href="<?php 
echo yii\helpers\Url::to(['back-book/create']);
?>
">Добавить</a>
    <a class="btn btn-primary"
       href="<?php 
echo yii\helpers\Url::to(['back-book/update', 'id' => $modelBook->id]);
?>
">Изменить</a>
</p>

<?php 
echo yii\widgets\DetailView::widget(['model' => $modelBook, 'attributes' => ['id', 'title', 'alias', 'description', 'photo']]);
?>

<div class="row">
    <div class="col-md-6">
        <h4>Авторы книги</h4>
        <?
        $dataProvider = new yii\data\ActiveDataProvider([
            'query' => $modelBook->getAuthors(),
        ]);

        echo yii\grid\GridView::widget([
            'dataProvider' => $dataProvider,
            'columns' => [
                'id',
                'name',
示例#3
0
<?php

/**
 * @var yii\web\View $this
 * @var app\models\Author $modelAuthor
 */
$this->title = 'CRUD Authors';
?>

<h1>Просмотр информации по автору</h1>

<p>
    <a class="btn btn-primary" href="<?php 
echo yii\helpers\Url::to(['back-author/index']);
?>
">Управление</a>
    <a class="btn btn-primary" href="<?php 
echo yii\helpers\Url::to(['back-author/create']);
?>
">Добавить</a>
    <a class="btn btn-primary" href="<?php 
echo yii\helpers\Url::to(['back-author/update', 'id' => $modelAuthor->id]);
?>
">Изменить</a>
</p>

<?php 
echo yii\widgets\DetailView::widget(['model' => $modelAuthor, 'attributes' => ['id', 'name', 'description', 'photo']]);
?>