add backend transfer list changes

This commit is contained in:
2015-10-13 09:27:56 +02:00
parent fda450b801
commit b04cbda645
20 changed files with 677 additions and 222 deletions

View File

@@ -0,0 +1,41 @@
<?php
use yii\base\Object;
use common\models\Ticket;
?>
<style>
.reception-tickets-container{
max-height: 300px;
overflow-y: auto;
}
</style>
<div class="reception-tickets-container">
<table class="table table-bordered table-striped">
<?php $model = new Ticket() ;?>
<thead>
<tr>
<th><?php echo $model->getAttributeLabel('id_ticket_type') ?></th>
<th><?php echo $model->getAttributeLabel('start') ?></th>
<th><?php echo $model->getAttributeLabel('end') ?></th>
</tr>
</thead>
<?php if (isset($tickets) && count($tickets) ) {?>
<tbody>
<?php foreach ($tickets as $ticket){ ?>
<tr>
<td>
<?php echo $ticket->ticketTypeName ?>
</td>
<td>
<?php echo Yii::$app->formatter->asDate( $ticket->start ) ?>
</td>
<td>
<?php echo Yii::$app->formatter->asDate( $ticket->end ) ?>
</td>
</tr>
<?php }?>
</tbody>
<?php }?>
</table>
</div>

View File

@@ -3,6 +3,7 @@
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 */
@@ -25,7 +26,7 @@ if ( isset($customer ) ){
$customername = $customer->name;
}
/*
function mkCustomerBtn($card, $label,$route = null ){
$url = null;
@@ -38,7 +39,6 @@ function mkCustomerBtn($card, $label,$route = null ){
}
return Html::a( $label , $url, ['class' => $classes ] );
}
function mkBtn($card, $label,$route = null ){
$url = null;
@@ -50,12 +50,13 @@ function mkBtn($card, $label,$route = null ){
return Html::a( $label , $url, ['class' => $classes ] );
}
*/
?>
<div class='row'>
<div class='col-md-8'>
<?php echo mkCustomerBtn( $card, Yii::t( 'frontend/customer' , 'Adatlap') , 'customer/update' ); ?>
<?php echo HtmlHelper::mkReceptionCardBtn( $card, 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'] )?>
@@ -63,15 +64,15 @@ function mkBtn($card, $label,$route = null ){
</div>
<div class='row'>
<div class='col-md-8'>
<?php echo mkCustomerBtn( $card, Yii::t( 'frontend/customer' , 'Befizetések') , 'ticket/index'); ?>
<?php echo HtmlHelper::mkReceptionCardBtn( $card, Yii::t( 'frontend/customer' , 'Befizetések') , 'ticket/index'); ?>
</div>
<div class='col-md-4'>
<?php echo mkCustomerBtn( $card, Html::tag("i","", [ 'class' => 'glyphicon glyphicon-plus' ] ) , 'ticket/create' ); ?>
<?php echo HtmlHelper::mkReceptionCardBtn( $card, Html::tag("i","", [ 'class' => 'glyphicon glyphicon-plus' ] ) , 'ticket/create' ); ?>
</div>
</div>
<div class='row'>
<div class='col-md-12'>
<?php echo mkBtn($card, Yii::t( 'frontend/transfer', 'Termékeladás'), 'product/sale')?>
<?php echo HtmlHelper::mkReceptionBtn($card, Yii::t( 'frontend/transfer', 'Termékeladás'), 'product/sale')?>
</div>
</div>

View File

@@ -0,0 +1,18 @@
<?php
use frontend\components\ReceptionCardNumberWidget;
use frontend\components\ReceptionMenuWidget;
use frontend\models\ReceptionForm;
use frontend\components\ReceptionCardNumberTicketsWidget;
use yii\base\Widget;
?>
<div class='row'>
<div class='col-md-3'>
<?php echo ReceptionMenuWidget::widget( [ 'customer' => $customer, 'card' => $card] ) ?>
</div>
<div class='col-md-4'>
<?php echo ReceptionCardNumberWidget::widget( [ 'customer' => $customer, 'card' =>$card, 'route' => ['customer/reception'] ] )?>
</div>
<div class='col-md-4'>
<?php echo ReceptionCardNumberTicketsWidget::widget([ 'tickets' => $tickets, 'customer' => $customer, 'card' =>$card, 'route' => ['customer/reception'] ] ) ?>
</div>
</div>

View File

@@ -78,7 +78,7 @@ $discountOptions = mkOptions( ArrayHelper::map($discounts, 'id_discount', 'name'
</div>
<div class="row">
<div class='col-md-12'>
<?php echo $form->field($model,'id_currency')->dropDownList($currencyOptions) ?>
<?php //echo $form->field($model,'id_currency')->dropDownList($currencyOptions) ?>
</div>
</div>
<div class="row">

View File

@@ -4,6 +4,8 @@ use yii\helpers\Html;
use yii\grid\GridView;
use frontend\components\ReceptionMenuWidget;
use frontend\components\ReceptionCardNumberWidget;
use frontend\components\ReceptionWidget;
use yii\base\Widget;
/* @var $this yii\web\View */
/* @var $searchModel frontend\models\TicketSearch */
@@ -18,16 +20,8 @@ $this->params['breadcrumbs'][] = $this->title;
?>
<div class="ticket-index">
<div class='row'>
<div class='col-md-3'>
<?php echo ReceptionMenuWidget::widget( [ 'customer' => $customer, 'card' => $card] ) ?>
</div>
<div class='col-md-4'>
<?php echo ReceptionCardNumberWidget::widget( [ 'customer' => $customer, 'card' =>$card, 'route' => ['customer/reception'] ] )?>
</div>
<div class='col-md-4'>
</div>
</div>
<?php echo ReceptionWidget::widget( ['form' => $receptionForm, 'route' => ['customer/reception'] ] )?>
<h1><?= Html::encode($this->title) ?></h1>
@@ -57,16 +51,19 @@ $this->params['breadcrumbs'][] = $this->title;
'attribute' => 'id_user',
'value' => 'userName'
],
/*
[
'attribute' => 'id_discount',
'value' => 'discountName'
],
*/
'price_brutto',
'created_at:datetime',
/*
['class' => 'yii\grid\ActionColumn',
'template' =>'{view} {update}',
],
*/
],
]); ?>