Skip to content

Instantly share code, notes, and snippets.

@nsanden
Created May 29, 2014 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nsanden/b09504c3f521f4bd3926 to your computer and use it in GitHub Desktop.
Save nsanden/b09504c3f521f4bd3926 to your computer and use it in GitHub Desktop.
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/**
* @var yii\web\View $this
* @var common\models\cList $model
*/
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => 'Lists', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="panel">
<div class="panel-heading">
<span class="panel-title"><?= Html::encode($this->title) ?></span>
</div>
<div class="panel-body">
<div class="c-list-view">
<p>
<?= Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Delete', ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'id',
'name',
'deleted',
'updated_at',
'created_at',
],
]) ?>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment