fitness-web/backend/views/card/view.php
Roland Schneider 90d19d17b6 add ticket original end and original price
add helper links to related object in admin
2017-09-06 12:14:12 +02:00

53 lines
1.4 KiB
PHP

<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model common\models\Card */
$this->title = Yii::t('common/card','Card: ').$model->number;
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/card', 'Cards'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="card-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a(Yii::t('common/card', 'Update'), ['update', 'id' => $model->id_card], ['class' => 'btn btn-primary']) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'number',
'rfid_key',
['attribute' => 'status', 'value' => $model->statusHuman],
['attribute' => 'type', 'value' => $model->typeHuman],
'created_at:datetime',
'updated_at:datetime',
],
]) ?>
<?php
$customer = $model->customer;
if (isset($customer)) {
?>
<?= DetailView::widget(
['model' => $customer,
'attributes' => [
[
'attribute' => 'id_customer',
'format' => 'raw',
'value' => Html::a($customer->name, ['customer/view', 'id' => $customer->id_customer]),
'label' => 'Vendég'
]
]]) ?>
<?php
}
?>
</div>