65 lines
1.6 KiB
PHP
65 lines
1.6 KiB
PHP
<?php
|
|
use common\models\Ticket;
|
|
use frontend\model\ReceptionForm;
|
|
use yii\helpers\Html;
|
|
use yii\widgets\DetailView;
|
|
use yii\base\Widget;
|
|
use common\components\Image;
|
|
use yii\helpers\Url;
|
|
/* @var $this yii\web\View */
|
|
/* @var $model frontend\model\ReceptionForm */
|
|
|
|
?>
|
|
|
|
<?php
|
|
if ( $model->isCardWithCustomer() ){
|
|
?>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<?php
|
|
echo DetailView::widget([
|
|
'model' => $model,
|
|
'attributes' =>[
|
|
[
|
|
'label' => 'Kártyaszám',
|
|
'value' => $model->card->number
|
|
],
|
|
[
|
|
'label' => 'Vendég',
|
|
'value' => $model->customer->name
|
|
],
|
|
[
|
|
'label' => 'E-Mail',
|
|
'value' => $model->customer->email
|
|
],
|
|
[
|
|
'label' => 'Telefon',
|
|
'value' => $model->customer->phone
|
|
],
|
|
[
|
|
'label' => 'Kulcsok',
|
|
'value' =>
|
|
empty($model->keysText) ? '' : (
|
|
"<form method='POST' action='". Url::toRoute(['key/toggle', "number" => $model->card->number])."'>"
|
|
.$model->keysText
|
|
.Html::hiddenInput("KeyToggleForm[key]", $model->keysText)
|
|
.Html::submitButton("Visszaad", [ 'style' => 'float: right;', 'class' => 'btn btn-primary btn-xs'])
|
|
."</form>")
|
|
,
|
|
'format' => 'raw'
|
|
],
|
|
[
|
|
'label' => 'Fénykép',
|
|
'value' => $model->customer->image1 ? Html::img( Url::base( ) . Image::thumb( $model->customer->image1->path,160,120 )) : 'Nincs kép',
|
|
'format' => 'raw'
|
|
|
|
],
|
|
]
|
|
|
|
])
|
|
?>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
}
|
|
?>
|