<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model backend\models\Quote */

$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Pages', 'url' => ['index?QuoteSearch%5BchapterId%5D='.$_REQUEST['chapid'].'&bookid='.$_GET["bookid"].'&chapid='.$_GET['chapid']]];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="quote-view">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>

        <?= Html::a('Update Pages', Yii::$app->urlManager->createUrl(array("quote/update","id"=>$_GET["id"], "bookid"=>$_GET["bookid"],"chapid"=>$_GET["chapid"])), ['class' => 'btn btn-primary']) ?>

        <?= Html::a('Delete', ['delete', 'id' => $model->id,'QuoteSearch[chapterId]'=>$_REQUEST['chapid'],'bookid'=>$_GET["bookid"],'chapid'=>$_GET['chapid']], [
            'class' => 'btn btn-danger',
            'data' => [
                'confirm' => 'Are you sure you want to delete this item?',
                'method' => 'post',
            ],
        ]) ?>

        <a onclick="js:history.go(-1);returnFalse;" class="btn btn-danger">Back</a>

    </p>

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            'id',
            'quoteIndex',
            'content:ntext',
           // 'chapterId',
            [
                'attribute' => 'chapterId',
                'format' => 'html',
                'value' => $chapter->title
            ],
//            'image',
            /*[
                'attribute'=>'image',
                //'value'=>Yii::$app->urlManager->setBaseUrl(true) . '/ebook/backend/images/quote/'.$model->image,
                'value'=>Yii::$app->urlManager->baseUrl . '/images/quote/'.$model->image,
                'format' => ['image',['width'=>'200']],
            ],*/
        ],
    ]) ?>

</div>
