title = cut_title($model->title); $this->params['breadcrumbs'][] = ['label' => 'Templates', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; YiiAsset::register($this); function cut_title($str) { if(strlen($str) > 35){ return mb_substr($str, 0, 35, 'UTF-8') . '...'; } return $str; } ?>
= Html::a('Список', ['index', 'id' => $model->id], ['class' => 'btn btn-primary']) ?> = Html::a('Изменить', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?> = Html::a('Удалить', ['delete', 'id' => $model->id], [ 'class' => 'btn btn-danger', 'data' => [ 'confirm' => 'Are you sure you want to delete this item?', 'method' => 'post', ], ]) ?>
= DetailView::widget([ 'model' => $model, 'attributes' => [ 'id', 'title', 'created_at', 'updated_at', [ 'label'=>'template_file_name', 'format'=>'raw', 'value' => function($model){ return $model->template_file_name . Html::a(' ', Url::to(['actualizar', 'id' => $model->id]), [ 'title' => 'Actualizar', // 'class' => 'pull-right detail-button', ]); } ] ], ]) ?> ', Url::to(['delete', 'id' => $model->id]), [ 'title' => 'Eliminar', 'class' => 'pull-right detail-button', 'data' => [ 'confirm' => '¿Realmente deseas eliminar este elemento?', 'method' => 'post', ] ]); $button2 = Html::a('', Url::to(['actualizar', 'id' => $model->id]), [ 'title' => 'Actualizar', 'class' => 'pull-right detail-button', ]); ?>= Html::a( 'Добавить поле', ['template-document-field/create', 'template_id' => $model->id], ['class' => 'btn btn-primary'] ) ?>