Пример #1
0
use app\models\City;
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model app\models\Transport */
$this->title = $model->transport_id;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Transports'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="transport-view">

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

    <p>
        <?php 
echo Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->transport_id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a(Yii::t('app', 'Delete'), ['delete', 'id' => $model->transport_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' => ['transport_id', ['label' => 'Charge city', 'value' => City::findById($model->charge_city_id)], ['label' => 'Discharge city', 'value' => City::findById($model->discharge_city_id)], 'carcase', 'carcase_charge', 'capacity', 'size', 'status_charge', 'charge_start', 'charge_end', 'work_preferences', 'city_rate', 'intercity_rate', 'passage_rate', 'info:text', 'term', 'created_at', 'updated_at']]);
?>

</div>
Пример #2
0
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model app\models\User */
/* @var $form ActiveForm */
$this->title = Yii::t('app', 'Profile');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-profile">

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

    <p>
        <?php 
echo Html::a(Yii::t('app', 'Update'), ['user/update'], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a(Yii::t('app', 'Change Password'), ['password-change'], ['class' => 'btn btn-primary']);
?>
    </p>


    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['status', 'email', 'type_ownership', 'company', 'INN', 'activity', ['label' => 'City', 'value' => City::findById($model->city_id)], 'address', 'surName', 'firstName', 'lastName', 'number', 'skype', 'site', 'created_at']]);
?>

</div>