-
Notifications
You must be signed in to change notification settings - Fork 0
/
chapter.php
27 lines (25 loc) · 885 Bytes
/
chapter.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/**
* Created by PhpStorm.
* User: yidashi
* Date: 2016/12/15
* Time: 下午2:20
*/
/**
* @var \yii\web\View $this
* @var \common\modules\book\models\BookChapter $model
*/
use yii\helpers\Html;
use yii\helpers\HtmlPurifier;
use yii\helpers\Markdown;
$this->title = $model->chapter_name;
$this->params['breadcrumbs'][] = ['label' => '书', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->book->book_name, 'url' => ['view', 'id' => $model->book->id]];
$this->params['breadcrumbs'][] = Html::encode($model->chapter_name);
?>
<?php $this->beginContent('@common/modules/book/views/admin/_layout.php', ['book' => $model->book]) ?>
<div class="view-title">
<h1><?= Html::encode($model->chapter_name) ?></h1>
</div>
<div class="view-content"><?= HtmlPurifier::process(Markdown::process($model->chapter_body)) ?></div>
<?php $this->endContent() ?>