add ticket original end and original price
add helper links to related object in admin
This commit is contained in:
@@ -11,7 +11,7 @@ $this->params['breadcrumbs'][] = ['label' => Yii::t('common/ticket', 'Tickets'),
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="ticket-view">
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<h1>Bérlet információ: #<?= Html::encode($this->title) ?></h1>
|
||||
<?= DetailView::widget([
|
||||
'model' => $model,
|
||||
'attributes' => [
|
||||
@@ -23,12 +23,14 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
],
|
||||
[
|
||||
'attribute' => 'id_ticket_type',
|
||||
'value' => $model->ticketTypeName,
|
||||
'format' => 'raw',
|
||||
'value' => Html::a($model->ticketTypeName, ['ticket-type/view', 'id' => $model->id_ticket_type]),
|
||||
|
||||
],
|
||||
[
|
||||
'attribute' => 'id_account',
|
||||
'value' => $model->accountName,
|
||||
'format' => 'raw',
|
||||
'value' => Html::a($model->accountName, ['account/view', 'id' => $model->id_account]),
|
||||
|
||||
],
|
||||
[
|
||||
@@ -45,9 +47,75 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'value' => $model->statusName
|
||||
],
|
||||
'price_brutto',
|
||||
[
|
||||
'attribute' => 'price_brutto',
|
||||
'format' => 'raw',
|
||||
'value' => Html::a($model->price_brutto, ['transfer/view', 'id' => $model->transfer->id_transfer]),
|
||||
|
||||
],
|
||||
'comment:raw',
|
||||
'created_at:datetime',
|
||||
'updated_at:datetime',
|
||||
'original_end:date',
|
||||
'original_price',
|
||||
],
|
||||
]) ?>
|
||||
|
||||
|
||||
<h3>Bérletkártya</h3>
|
||||
<?php
|
||||
|
||||
echo DetailView::widget([
|
||||
'model' => $model->card,
|
||||
'attributes' => [
|
||||
[
|
||||
'attribute' => 'number',
|
||||
'format' => 'raw',
|
||||
'value' => Html::a($model->card->number, ['card/view', 'id' => $model->card->id_card]),
|
||||
]
|
||||
]]);
|
||||
|
||||
?>
|
||||
|
||||
<h3>Vendég</h3>
|
||||
<?php
|
||||
|
||||
echo DetailView::widget([
|
||||
'model' => $model->customer,
|
||||
'attributes' => [
|
||||
[
|
||||
'attribute' => 'name',
|
||||
'format' => 'raw',
|
||||
'value' => Html::a($model->customer->name, ['customer/view', 'id' => $model->customer->id_customer]),
|
||||
]
|
||||
|
||||
]]);
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
$contract = $model->contract;
|
||||
if (isset($contract)) {
|
||||
?>
|
||||
<h3>Szerződés</h3>
|
||||
<?php
|
||||
|
||||
echo DetailView::widget([
|
||||
'model' => $contract,
|
||||
'attributes' => [
|
||||
[
|
||||
'attribute' => 'id_contract',
|
||||
'format' => 'raw',
|
||||
'value' => Html::a($contract->id_contract, ['contract/details', 'id' => $contract->id_contract]),
|
||||
]
|
||||
|
||||
]]);
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user