Esempio n. 1
0
use backend\models\User;
use common\models\Menu;
use common\models\Sucursal;
/* @var $this yii\web\View */
/* @var $model common\models\Promocion */
$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Promociones', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="promocion-view">

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

    <p>
        <?php 
echo Html::a('Actualizar', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a('Eliminar', ['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', ['attribute' => 'id_menu', 'value' => Menu::getMenuById($model->id_menu)], ['attribute' => 'id_sucursal', 'value' => Sucursal::getSucById($model->id_sucursal)], 'precio', 'descripcion', 'dia', ['attribute' => 'fecha_ini', 'format' => ['date', 'php:l, d \\d\\e F \\d\\e\\l Y']], ['attribute' => 'fecha_fin', 'format' => ['date', 'php:l, d \\d\\e F \\d\\e\\l Y']], ['attribute' => 'create_user', 'value' => User::getUserById($model->create_user)], ['attribute' => 'create_time', 'format' => ['date', 'php:l, d \\d\\e F \\d\\e\\l Y']], ['attribute' => 'update_user', 'value' => User::getUserById($model->update_user)], ['attribute' => 'update_time', 'format' => ['date', 'php:l, d \\d\\e F \\d\\e\\l Y']]]]);
?>

</div>