echo Html::a(Html::tag('i', '', ['class' => 'fa fa-pencil']) . ' 修改', ['/topic/default/update', 'id' => $model->id]); ?> <?php if ($model->comment_count == 0) { ?> <?php echo Html::a(Html::tag('i', '', ['class' => 'fa fa-trash']) . ' 删除', ['/topic/default/delete', 'id' => $model->id], ['data' => ['confirm' => "您确认要删除文章「{$model->title}」吗?", 'method' => 'post']]); ?> <?php } ?> </span> <?php } ?> </div> </div> <?php echo $this->render('@frontend/modules/topic/views/comment/index', ['model' => $model, 'dataProvider' => $dataProvider]); ?> <?php echo $this->render('@frontend/modules/topic/views/comment/create', ['model' => $comment, 'post' => $model]); ?> </div> <?php echo \frontend\widgets\TopicSidebar::widget(['type' => 'view', 'node' => $model->category, 'tags' => $model->tags]);
<?php use yii\helpers\Html; use yii\bootstrap\Nav; /* @var $this yii\web\View */ /* @var $model common\Models\Post */ $this->title = '发布新话题'; // $this->params['breadcrumbs'][] = ['label' => 'Posts', 'url' => ['index']]; // $this->params['breadcrumbs'][] = $this->title; ?> <div class="col-md-10 topic-create" contenteditable="false" style=""> <div class="panel panel-default"> <div class="panel-heading clearfix"> <?php echo $this->title; ?> </div> <?php echo $this->render('_form', ['model' => $model]); ?> </div> </div> <?php echo \frontend\widgets\TopicSidebar::widget(['type' => 'create']);
<?php /** * author : forecho <*****@*****.**> * createTime : 15/4/20 下午9:15 * description: */ use yii\helpers\Html; $this->title = Yii::t('app', 'Update {modelClass}: ', ['modelClass' => 'Post Comment']) . ' ' . $model->post->title; ?> <div class="col-md-9 topic-create" contenteditable="false" style=""> <div class="panel panel-default"> <div class="panel-heading clearfix"> <?php echo Html::encode($this->title); ?> </div> <?php echo $this->render('_form', ['model' => $model]); ?> </div> </div> <?php echo \frontend\widgets\TopicSidebar::widget([]);
<?php } ?> <div class="panel-heading clearfix"> <div class="pull-left">搜索:<?php echo $keyword; ?> </div> </div> <?php Pjax::begin(['scrollTo' => 0]); ?> <?php echo ListView::widget(['dataProvider' => $dataProvider, 'itemOptions' => ['class' => 'list-group-item'], 'summary' => false, 'itemView' => '_search', 'options' => ['class' => 'list-group']]); ?> <?php Pjax::end(); ?> </div> <?php echo \frontend\widgets\Node::widget(); ?> </div> <?php echo TopicSidebar::widget(['node' => $node]); ?>
?> <?php if ($model->comment_count == 0) { ?> <?php echo Html::a(Html::tag('i', '', ['class' => 'fa fa-trash']) . ' 删除', ['/topic/default/delete', 'id' => $model->id], ['data' => ['confirm' => "您确认要删除文章「{Html::encode({$model->title})}」吗?", 'method' => 'post']]); ?> <?php } ?> </span> <?php } ?> </div> </div> <?php echo $this->render('@frontend/modules/topic/views/comment/index', ['model' => $model, 'dataProvider' => $dataProvider]); ?> <?php echo $this->render('@frontend/modules/topic/views/comment/create', ['model' => $comment, 'post' => $model]); ?> </div> <?php echo \frontend\widgets\TopicSidebar::widget(['node' => $model->category]); ?> </div>