|
7 | 7 | /* @var $model common\models\Post */ |
8 | 8 |
|
9 | 9 | $this->title = $model->title; |
10 | | -$this->params['breadcrumbs'][] = ['label' => 'Posts', 'url' => ['index']]; |
| 10 | +$this->params['breadcrumbs'][] = ['label' => '文章管理', 'url' => ['index']]; |
11 | 11 | $this->params['breadcrumbs'][] = $this->title; |
12 | 12 | ?> |
13 | 13 | <div class="post-view"> |
14 | 14 |
|
15 | 15 | <h1><?= Html::encode($this->title) ?></h1> |
16 | 16 |
|
17 | 17 | <p> |
18 | | - <?= Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?> |
19 | | - <?= Html::a('Delete', ['delete', 'id' => $model->id], [ |
| 18 | + <?= Html::a('修改', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?> |
| 19 | + <?= Html::a('删除', ['delete', 'id' => $model->id], [ |
20 | 20 | 'class' => 'btn btn-danger', |
21 | 21 | 'data' => [ |
22 | | - 'confirm' => 'Are you sure you want to delete this item?', |
| 22 | + 'confirm' => '您确定删除这篇文章吗?', |
23 | 23 | 'method' => 'post', |
24 | 24 | ], |
25 | 25 | ]) ?> |
|
32 | 32 | 'title', |
33 | 33 | 'content:ntext', |
34 | 34 | 'tags:ntext', |
35 | | - 'status', |
36 | | - 'create_time:datetime', |
37 | | - 'update_time:datetime', |
38 | | - 'author_id', |
| 35 | + [ |
| 36 | + 'label'=>'状态', |
| 37 | + 'value'=>$model->status0->name, |
| 38 | + ], |
| 39 | + //'create_time:datetime', |
| 40 | + [ |
| 41 | + 'attribute'=>'create_time', |
| 42 | + 'value'=>date("Y-m-d H:i:s",$model->create_time), |
| 43 | + ], |
| 44 | + [ |
| 45 | + 'attribute'=>'update_time', |
| 46 | + 'value'=>date("Y-m-d H:i:s",$model->update_time), |
| 47 | + ], |
| 48 | + [ |
| 49 | + 'attribute'=>'author_id', |
| 50 | + 'value'=>$model->author->nickname, |
| 51 | + ], |
39 | 52 | ], |
| 53 | + 'template'=>'<tr><th style="width:120px;">{label}</th><td>{value}</td></tr>', |
| 54 | + 'options'=>['class'=>'table table-striped table-bordered detail-view'], |
40 | 55 | ]) ?> |
41 | | - |
42 | 56 | </div> |
0 commit comments