fitness-web/frontend/views/common/_reception_menu.php

109 lines
3.1 KiB
PHP

<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\Url;
use frontend\components\HtmlHelper;
/* @var $this yii\web\View */
/* @var $card common\models\Card */
/* @var $customer common\models\Customer */
/* @var $model frontend\models\ReceptionForm */
/* @var $form yii\widgets\ActiveForm */
?>
<style >
.btn.btn-reception{
width:100%;
margin-top: 6px;
margin-bottom: 6px;
}
</style>
<?php
$customername = "";
if ( isset($model->customer ) ){
$customername = $model->customer->name;
}
$card = $model->card;
?>
<div class='row'>
<div class='col-md-8'>
<?php echo HtmlHelper::mkReceptionCustomerBtn( $model, Yii::t( 'frontend/customer' , 'Adatlap') , 'customer/update' ); ?>
</div>
<div class='col-md-4'>
<?php echo Html::a(Html::tag("i","", [ 'class' => 'glyphicon glyphicon-plus' ] ) , Url::toRoute('customer/create') , ['class' => 'btn btn-primary btn-reception'] )?>
</div>
</div>
<div class='row'>
<div class='col-md-8'>
<?php echo HtmlHelper::mkReceptionCustomerBtn( $model, Yii::t( 'frontend/customer' , 'Befizetések') , 'ticket/index'); ?>
</div>
<div class='col-md-4'>
<?php echo HtmlHelper::mkReceptionCustomerBtn( $model, Html::tag("i","", [ 'class' => 'glyphicon glyphicon-plus' ] ) , 'ticket/create' ); ?>
</div>
</div>
<div class='row'>
<div class='col-md-12'>
<?php echo HtmlHelper::mkReceptionBtn($model, Yii::t( 'frontend/transfer', 'Termékeladás'), 'product/sale')?>
</div>
</div>
<div class='row'>
<div class='col-md-12'>
&nbsp;
</div>
</div>
<?php
$doorEntryStrategy = \common\components\Helper::getDoorEntryStrategy();
if ( $doorEntryStrategy === 'door_pass'){
echo $this->render(
'//common/door_entry_strategy/_strategy_door_pass',
[
'model' => $model
]);
}else {
echo $this->render(
'//common/door_entry_strategy/_strategy_key',
[
'model' => $model
]);
}
?>
<?php if ( isset($model->customer) ) { ?>
<?php $form = ActiveForm::begin([
'action' => ['customer/towel', 'number' => $model->getCardNumber()],
'method' => 'post',
]); ?>
<div class="row" style="margin-top: 6px; margin-bottom: 6px;">
<div class='col-md-12'>
<?php echo Html::hiddenInput('TowelForm[number]', $model->getCardNumber())?>
<?php echo Html::textInput('TowelForm[count]','',['class'=>"form-control", 'placeholder' =>'Törölköző darab' ,'type' => 'number']) ?>
</div>
</div>
<div class="row">
<div class='col-md-6'>
<?= Html::submitButton(Yii::t('frontend/collection', 'Bérel'), [ 'name' => 'TowelForm[direction]', 'value' => 'out', 'class' => 'btn btn-primary btn-block']) ?>
</div>
<div class='col-md-6'>
<?= Html::submitButton(Yii::t('frontend/collection', 'Vissza ad'), ['name' => 'TowelForm[direction]', 'value' => 'in', 'class' => 'btn btn-primary btn-block']) ?>
</div>
</div>
<?php ActiveForm::end(); ?>
<?php }?>