DetailView is best used for displaying a model in a regular format (e.g. each model attribute is displayed as a row in a table.) The model can be either an instance of [[Model]] or an associative array. DetailView uses the [[attributes]] property to determines which model attributes should be displayed and how they should be formatted. A typical usage of DetailView is as follows: php echo DetailView::widget([ 'model' => $model, 'attributes' => [ 'title', // title attribute (in plain text) 'description:html', // description attribute in HTML [ // the owner name of the model 'label' => 'Owner', 'value' => $model->owner->name, ], 'created_at:datetime', // creation date formatted as datetime ], ]); For more details and usage information on DetailView, see the guide article on data widgets.
Since: 2.0
Author: Qiang Xue (qiang.xue@gmail.com)
Inheritance: extends yii\base\Widget
Example #1
4
 public function run()
 {
     $ret_val = '';
     if (isset($this->header) && is_string($this->header) && !is_bool($this->header)) {
         $ret_val = Html::tag('h2', $this->header);
     }
     switch ($this->displayAs) {
         case 'grid':
             $this->items = is_array($this->items) ? $this->items : [$this->items];
             $this->widgetOptions = array_merge(['summary' => false, 'layout' => '{items}', 'showHeader' => $this->header, 'dataProvider' => new \yii\data\ArrayDataProvider(['allModels' => $this->items]), 'columns' => $this->attributes], $this->widgetOptions);
             $ret_val .= \kartik\grid\GridView::widget($this->widgetOptions);
             break;
         case 'list':
             $this->widgetOptions = array_merge(['itemOptions' => ['tag' => false], 'summary' => false, 'dataProvider' => new \yii\data\ArrayDataProvider(['allModels' => $this->items]), 'itemView' => function ($model, $key, $index, $widget) {
                 return $this->renderListItem($model, $key, $index, $widget);
             }], $this->widgetOptions);
             $ret_val .= \yii\widgets\ListView::widget($this->widgetOptions);
             break;
         case 'csv':
             $ret_val = [];
             foreach ($this->items as $index => $item) {
                 $ret_val[] = $this->renderCsvItem($item, $index);
             }
             $ret_val = Html::tag('div', implode(', ', $ret_val));
             break;
         case 'tags':
             foreach ($this->items as $index => $item) {
                 $ret_val .= $this->renderTagItem($item, $index);
             }
             $ret_val = Html::tag('div', $ret_val);
             break;
         default:
             $this->widgetOptions['class'] = isset($this->widgetOptions['class']) ? $this->widgetOptions['class'] : 'table';
             $this->widgetOptions = array_merge(['model' => $this->items, 'attributes' => $this->attributes, 'options' => ['class' => 'table']], $this->widgetOptions);
             $ret_val .= \yii\widgets\DetailView::widget($this->widgetOptions);
             break;
     }
     return $ret_val;
 }
 public function actionModelVariables()
 {
     /** @var Config $model */
     $model = $this->findModel();
     $model->load(Yii::$app->request->post());
     echo DetailView::widget(['model' => false, 'attributes' => $model->variables()]);
 }
Example #3
0
 /**
  * @inheritdoc
  */
 protected function renderAttribute($attribute, $index)
 {
     if ($attribute['value'] instanceof Closure) {
         $attribute['value'] = call_user_func($attribute['value'], $this->model, $index);
     }
     return parent::renderAttribute($attribute, $index);
 }
Example #4
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     if (empty($this->attributes)) {
         $this->attributes = $this->attributes();
     }
     parent::init();
 }
Example #5
0
 public function run()
 {
     echo '<div class="panel panel-default panel-view">';
     if ($this->title) {
         echo '<div class="panel-heading">' . $this->title . '</div>';
     }
     echo '<div class="panel-body">';
     parent::run();
     echo '</div>';
     if ($this->footer) {
         echo '<div class="panel-footer">' . $this->footer . '</div>';
     }
     echo '</div>';
 }
Example #6
0
 public function init()
 {
     parent::init();
     if ($this->model instanceof \common\components\model\Translateable) {
         $attributes = [];
         foreach ($this->attributes as $attribute) {
             $attributes[] = $attribute;
             if ($this->model->isTranslateAttribute($attribute['attribute'])) {
                 foreach ($this->model->getTranslationModels() as $model) {
                     $attribute['label'] = $model->getAttributeLabel($attribute['attribute']);
                     $attribute['value'] = $model->{$attribute['attribute']};
                     $attributes[] = $attribute;
                 }
             }
         }
         $this->attributes = $attributes;
     }
 }
Example #7
0
 protected function initDefaultButtons()
 {
     if (!isset($this->buttons['view'])) {
         $this->buttons['view'] = function ($url, $model, $key) {
             Modal::begin(['id' => 'gridview_view_modal_' . $key, 'header' => '<h2>Detail</h2>']);
             echo DetailView::widget(['model' => $model, 'attributes' => $this->getDataCellDetailAttributes($model, $key)]);
             Modal::end();
             $options = array_merge(['class' => 'btn btn-light btn-icon', 'data-toggle' => 'modal', 'data-target' => '#gridview_view_modal_' . $key, 'title' => Yii::t('yii', 'View'), 'aria-label' => Yii::t('yii', 'View'), 'data-pjax' => '0'], $this->buttonOptions);
             return Html::a('<span class="glyphicon">&#xe620;</span>', $url, $options);
         };
     }
     if (!isset($this->buttons['update'])) {
         $this->buttons['update'] = function ($url, $model, $key) {
             $options = array_merge(['class' => 'btn btn-light btn-icon', 'title' => Yii::t('yii', 'Update'), 'aria-label' => Yii::t('yii', 'Update'), 'data-pjax' => '0'], $this->buttonOptions);
             return Html::a('<span class="glyphicon">&#xe61f;</span>', $url, $options);
         };
     }
     if (!isset($this->buttons['delete'])) {
         $this->buttons['delete'] = function ($url, $model, $key) {
             $options = array_merge(['class' => 'btn btn-light btn-icon', 'title' => Yii::t('yii', 'Delete'), 'aria-label' => Yii::t('yii', 'Delete'), 'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'data-method' => 'post', 'data-pjax' => '0'], $this->buttonOptions);
             return Html::a('<span class="glyphicon">&#xe61e;</span>', $url, $options);
         };
     }
 }
Example #8
0
            <div class="box box-primary">
                <div class="box-header">
                    <i class="fa fa-reply"></i>

                    <h3 class="box-title"><?php 
echo Yii::t('writesdown', 'Reply To');
?>
</h3>
                </div>
                <div class="box-body">
                    <?php 
echo $commentParent->comment_content;
?>
                </div>
            </div>

            <?php 
echo $this->render('_form-reply', ['model' => $model, 'form' => $form]);
?>

        </div>
        <div class="col-md-4 post-comment-update">

            <?php 
echo DetailView::widget(['model' => $commentParent, 'attributes' => ['id', ['attribute' => 'comment_post_id', 'value' => Html::a($commentParent->commentPost->post_title, ['/post/update', 'id' => $commentParent->commentPost->id]), 'format' => 'raw'], 'comment_author:ntext', 'comment_author_email:email', 'comment_author_url:url', ['attribute' => 'comment_author_ip', 'value' => Html::a($model->comment_author_ip, 'http://whois.arin.net/rest/ip/' . $model->comment_author_ip, ['target' => '_blank']), 'format' => 'raw'], ['attribute' => 'comment_date', 'value' => Yii::$app->formatter->asDatetime($model->comment_date, 'php:M d, Y H:i:s'), 'format' => 'raw'], 'comment_approved', 'comment_agent', ['attribute' => 'comment_parent', 'value' => $commentParent->comment_parent ? Html::a($commentParent->comment_parent, ['update', 'id' => $commentParent->comment_parent]) : '', 'format' => 'raw'], 'comment_user_id']]);
?>

        </div>
    </div>
<?php 
ActiveForm::end();
Example #9
0
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model common\models\TblClassroomSetup */
$this->title = 'Classroom Setup #' . $model->form_id;
$this->params['breadcrumbs'][] = ['label' => 'Settings'];
$this->params['breadcrumbs'][] = ['label' => 'Configurations', 'url' => ['/site/confg']];
$this->params['breadcrumbs'][] = ['label' => 'Classroom Setups', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="tbl-classroom-setup-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a('Update', ['update', 'id' => $model->form_id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a('Delete', ['delete', 'id' => $model->form_id], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'Are you sure you want to delete this item?', 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['form_id', 'user_id', 'form_type', 'setup_type', 'setup_other', 'closed_by', 'start_date', 'end_date', 'update_date', 'assigned_to', 'inventory', 'comments', 'classroom', 'classroom_other', 'course_code', 'setup_time', 'pickup_time', 'scheduled_start_time', 'scheduled_end_time', 'status']]);
?>

</div>
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model frontend\models\Processo */
$this->title = $model->numeroProcesso;
$this->params['breadcrumbs'][] = ['label' => 'Processos', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="processo-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a('Atualizar', ['update', 'numeroProcesso' => $model->numeroProcesso, 'Usuario_matricula' => $model->Usuario_matricula, 'Audiencia_codigo' => $model->Audiencia_codigo, 'Preatendimento_idPreatendimento' => $model->Preatendimento_idPreatendimento, 'Preatendimento_Usuario_matricula' => $model->Preatendimento_Usuario_matricula, 'Preatendimento_Interessado_cpf' => $model->Preatendimento_Interessado_cpf], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a('Deletar', ['delete', 'numeroProcesso' => $model->numeroProcesso, 'Usuario_matricula' => $model->Usuario_matricula, 'Audiencia_codigo' => $model->Audiencia_codigo, 'Preatendimento_idPreatendimento' => $model->Preatendimento_idPreatendimento, 'Preatendimento_Usuario_matricula' => $model->Preatendimento_Usuario_matricula, 'Preatendimento_Interessado_cpf' => $model->Preatendimento_Interessado_cpf], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'Are you sure you want to delete this item?', 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['numeroProcesso', 'classe', 'situacao', 'dataCriacao', 'Usuario_matricula', 'Audiencia_codigo', 'Preatendimento_idPreatendimento', 'Preatendimento_Usuario_matricula', 'Preatendimento_Interessado_cpf']]);
?>

</div>
Example #11
0
use yii\helpers\Html;
use yii\widgets\DetailView;
/**
 * @var yii\web\View $this
 * @var mdm\admin\models\AuthItem $model
 */
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('rbac-admin', 'Rules'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="auth-item-view">

    <!-- <h1><?php 
echo Html::encode($this->title);
?>
</h1> -->

    <p>
        <?php 
echo Html::a(Yii::t('rbac-admin', 'Update'), ['update', 'id' => $model->name], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a(Yii::t('rbac-admin', 'Delete'), ['delete', 'id' => $model->name], ['class' => 'btn btn-danger', 'data-confirm' => Yii::t('rbac-admin', 'Are you sure to delete this item?'), 'data-method' => 'post']);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['name', 'className']]);
?>
</div>
Example #12
0
use yii\helpers\Html;
use yii\widgets\DetailView;
use frontend\models\Preatendimento;
/* @var $this yii\web\View */
/* @var $model frontend\models\Audiencia */
$this->title = 'Nº do Processo: ' . ' ' . $model->preatendimentoIdpreatendimento->numeroprocesso;
$this->params['breadcrumbs'][] = ['label' => 'Audiencias', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="audiencia-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a('Atualizar', ['update', 'id' => $model->idaudiencia], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a('Remover', ['delete', 'id' => $model->idaudiencia], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'Tem certeza de que deseja excluir este item?', 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['data', 'hora', ['attribute' => 'preatendimento_idpreatendimento', 'value' => $model->preatendimentoIdpreatendimento->numeroprocesso]]]);
?>

</div>
Example #13
0
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model app\models\Book */
$this->title = $model->title;
$this->params['breadcrumbs'][] = ['label' => 'Books', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="book-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo 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>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'title', 'description', 'author_id', 'isbn']]);
?>

</div>
Example #14
0
</h3></div>
  <div class="col-lg-4 col-sm-4 col-xs-12 no-padding" style="padding-top: 20px !important;">
	<div class="col-xs-4 left-padding">
	<?php 
echo Html::a(Yii::t('stu', 'Back'), ['index'], ['class' => 'btn btn-block btn-back']);
?>
	</div>
	<div class="col-xs-4 left-padding">
        <?php 
echo Html::a(Yii::t('stu', 'Update'), ['update', 'id' => $model->stu_status_id], ['class' => 'btn btn-block btn-info']);
?>
	</div>
	<div class="col-xs-4 left-padding">
        <?php 
echo Html::a(Yii::t('stu', 'Delete'), ['delete', 'id' => $model->stu_status_id], ['class' => 'btn btn-block btn-danger', 'data' => ['confirm' => Yii::t('stu', 'Are you sure you want to delete this item?'), 'method' => 'post']]);
?>
 
	</div>
  </div>
</div>

<div class="col-xs-12">
  <div class="box box-primary view-item">
   <div class="stu-status-view">
    <?php 
echo DetailView::widget(['model' => $model, 'options' => ['class' => 'table  detail-view'], 'attributes' => ['stu_status_name', 'stu_status_description', ['attribute' => 'created_at', 'value' => Yii::$app->formatter->asDateTime($model->created_at)], ['attribute' => 'created_by', 'value' => $model->createdBy->user_login_id], ['attribute' => 'updated_at', 'value' => $model->updated_at == null ? " - " : Yii::$app->formatter->asDateTime($model->updated_at)], ['attribute' => 'updated_by', 'value' => $model->updated_by == null ? " - " : $model->updatedBy->user_login_id]]]);
?>
    </div>
  </div>
</div>
Example #15
0
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model app\models\MaprintLayouts */
$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Maprint Layouts', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="maprint-layouts-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo 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>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'maprint_id', 'layout:ntext', 'label:ntext']]);
?>

</div>
Example #16
0
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model app\models\WordsGroup */
$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Words Groups', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="words-group-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo 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>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'projekt_id', 'group_name', 'description']]);
?>

</div>
$this->title = $model->ID_CONTRACT;
$this->params['breadcrumbs'][] = ['label' => 'Contratos', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="contrato-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a('Actualizar', ['update', 'id' => $model->ID_CONTRACT], ['class' => 'btn btn-primary']);
?>

        <?php 
echo Html::a('Eliminar', ['delete', 'id' => $model->ID_CONTRACT], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'Are you sure you want to delete this item?', 'method' => 'post']]);
?>
         <?php 
echo Html::a('<i class="fa glyphicon glyphicon-hand-up"></i> Descargar PDF', ['imprimir', 'id' => $model->ID_CONTRACT], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['ID_CONTRACT', 'iDCOL.NAME_COL', 'ID_ADMIN', 'DETAIL']]);
?>

</div>

Example #18
0
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model frontend\models\Academic */
$this->title = $model->academic_id;
$this->params['breadcrumbs'][] = ['label' => 'Academics', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="academic-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a('Update', ['update', 'id' => $model->academic_id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a('Delete', ['delete', 'id' => $model->academic_id], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'Are you sure you want to delete this item?', 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['Public_high_school_graduating_from', 'complete_school_address', 'principal_fullname', 'section_no', 'organization:ntext', 'position_held:ntext', 'academic_id']]);
?>

</div>
Example #19
0
<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use dosamigos\fileupload\FileUpload;
use dosamigos\fileupload\FileUploadUI;
use common\models\Advert;
use common\models\AdvertFile;
use common\models\City;
$this->title = 'Просмотр';
$this->params['breadcrumbs'][] = ['label' => 'Объявления', 'url' => ['/advert/list']];
$this->params['breadcrumbs'][] = ['label' => '№ ' . $model->id, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = $this->title;
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'type', 'category', 'user_id', 'city_id', 'created_at:datetime', 'updated_at:datetime', 'content', 'price', 'term', 'views']]);
Example #20
0
/* @var $model common\models\Category */
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('backend/category', 'Categories'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="category-view">

    <h1 class="page-header">
        <?php 
echo $this->title;
?>

        <div class="btn-group pull-right">
            <?php 
echo Html::a('<span class="glyphicon glyphicon-eye-open"></span>', Yii::$app->urlManagerFrontEnd->createUrl(['catalog/category', 'category' => $model->slug]), ['class' => 'btn btn-success', 'target' => '_blank', 'data-toggle' => 'tooltip', 'title' => Yii::t('backend/product', 'View on site')]);
?>
            <?php 
echo Html::a('<span class="glyphicon glyphicon-pencil"></span>', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
            <?php 
echo Html::a('<span class="glyphicon glyphicon-trash"></span>', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'method' => 'post']]);
?>
        </div>
    </h1>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', ['attribute' => 'parent_id', 'format' => 'raw', 'value' => $model->parent ? Html::a($model->parent->name, ['category/view', 'id' => $model->parent->id]) : null], 'slug', 'name', 'description:html', 'meta_description', 'meta_keywords']]);
?>

</div>
Example #21
0
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model app\models\Shopping */
$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Shoppings', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="shopping-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo 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>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'material_id', 'value', 'day', 'unity', 'description:ntext']]);
?>

</div>
Example #22
0
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model common\models\ar\Comment */
$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Comments', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="comment-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo 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>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'reply_to', 'post_id', 'user_id', 'date', 'text_raw:ntext', 'text:ntext', 'ip', 'is_register', 'approve']]);
?>

</div>
Example #23
0
            <h3 class="box-title"><i class="fa fa-tachometer"></i> <?php 
echo $this->title;
?>
</h3>
        </div>
        <div class="box-body">
            <div class="user-view">

                <p class="pull-right">
                    <?php 
echo Html::a('<i class="glyphicon glyphicon-pencil"></i> ' . Yii::t('app', 'อัพเดท'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary btn-md']);
?>

                </p>

                <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['username', 'email:email', ['format' => 'html', 'label' => 'สถานะ', 'value' => $model->is_block == 0 ? '<span class="btn btn-success">เปิดใช้งาน</span>' : '<span class="btn btn-danger">ระงับใช้งาน</span>'], ['label' => 'กลุ่มผู้ใช้งาน', 'value' => $model->userGroup->type]]]);
?>

            </div>
            <div class="panel panel-dlt">
                <div class="panel-heading">ข้อมูลผู้ใช้งาน</div>
                <div class="panel-body">
                    <?php 
echo DetailView::widget(['model' => $modelUser, 'attributes' => [['label' => 'ชื่อ - นามสกุล', 'value' => $modelUser->titles->title . ' ' . $modelUser->name . '   ' . $modelUser->lname], ['label' => 'สำนักงานขนส่งจังหวัด', 'attribute' => 'off_code', 'value' => $modelUser->province->PRV_DESC], 'br_code', 'id_no']]);
?>
                </div>
            </div>
        </div><!-- /.box-body -->
    </div>
</div>
Example #24
0
    } else {
        $status = "<i class='fa fa-ban text-red'></i>ไม่ใช้งาน";
    }
    return $status;
}
?>
<div class="panel panel-primary">

    <div class="panel-heading">
        <i class="fa fa-book"></i>
        <?php 
echo Html::encode($this->title);
?>
    </div>


    <div class="panel-body">
        <p class="pull-right">
            <?php 
echo Html::a('แก้ไข', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
            <?php 
echo Html::a('ลบรายการ', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'คุณต้องการลบรายนี้ใช่มั้ย?', 'method' => 'post']]);
?>
        </p>
        <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['account_number', 'account_name', 'saving_type', 'bank_name', 'brance', ['attribute' => 'status', 'format' => 'raw', 'value' => get_status($model->status), 'displayOnly' => true]]]);
?>
    </div>
</div>
Example #25
0
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model app\modules\blog\models\Post */
$this->title = $model->title;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Блог'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="post-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a(Yii::t('app', 'Delete'), ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'title', 'content:ntext', 'category.name', ['attribute' => 'status', 'value' => $model->status == 1 ? 'Опубликован' : 'Черновик'], 'created_at:datetime', 'updated_at:datetime']]);
?>

</div>
Example #26
0
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model app\modules\admin\models\Orders */
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => 'Orders', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="orders-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo 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>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'delivery', 'product_ids', 'price', 'email:email', 'adress', 'notice', 'name', 'phone', 'date_order']]);
?>

</div>
Example #27
0
/* @var $this yii\web\View */
/* @var $model app\modules\kerja\models\DataKerja */
$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Data Kerjas'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="data-kerja-view">
 <?php 
echo $this->render('_menu');
?>
 
    <!--<h1><?php 
echo Html::encode($this->title);
?>
</h1>-->

    <p>
        <?php 
echo Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a(Yii::t('app', 'Delete'), ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['judul', 'tipe', 'klien', 'marketing', 'programmer', 'reminder_email:email', 'status_pekerjaan', ['attribute' => 'informasi', 'format' => 'raw'], ['attribute' => 'status', 'format' => 'raw', 'value' => DataKerja::data_status($model)], 'created_at', 'modified_at']]);
?>

</div>
Example #28
0
</h1>
    </div>

    <?php 
foreach (Yii::$app->getSession()->getAllFlashes() as $key => $message) {
    echo Alert::widget(['options' => ['class' => 'alert-' . $key], 'body' => $message]);
}
?>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['name', 'description:ntext']]);
?>


    <?php 
echo DetailView::widget(['model' => $evidence, 'attributes' => ['description:ntext']]);
?>
    <?php 
echo Html::label('Archivo adjunto: ');
?>


    <?php 
echo Html::a($evidence->attachment_name, ['download', 'evidenceId' => $evidence->id]);
?>
    <br><br>
    <?php 
echo Html::beginForm(['give-feedback', 'id' => $model['id'], 'evidenceId' => $evidence['id']], 'post');
?>
    <?php 
$array = [['value' => 1, 'estado' => 'Aceptado'], ['value' => 2, 'estado' => 'No aceptado']];
Example #29
0
<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model common\models\Feedback */
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => '留言管理', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="feedback-view">

    <p>
        <?php 
echo Html::a('修改', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a('删除', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => '确定要删除吗?', 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'name', 'phone', 'content:ntext', 'created_at:datetime', 'updated_at:datetime']]);
?>

</div>
Example #30
0
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model backend\models\AuthItem */
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => 'Auth Items', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="auth-item-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a('Update', ['update', 'id' => $model->name], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a('Delete', ['delete', 'id' => $model->name], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'Are you sure you want to delete this item?', 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['name', 'type', 'description:ntext', 'rule_name', 'data:ntext', 'created_at', 'updated_at']]);
?>

</div>