add changes to backend transfers2

This commit is contained in:
2015-10-20 09:02:57 +02:00
parent 71384b6453
commit 1a1477b26b
14 changed files with 174 additions and 61 deletions

View File

@@ -22,27 +22,18 @@ use kartik\widgets\DatePicker;
]); ?>
<div class='row'>
<div class='col-md-4'>
<?= $form->field($model, 'id_account')->dropDownList( ['' => Yii::t('common/transfer', 'All')] +HtmlHelper::mkAccountOptions($accounts) ) ?>
<div class='col-md-4'>
<?= $form->field($model, 'id_account')->dropDownList( ['' => Yii::t('common/transfer', 'All')] +HtmlHelper::mkAccountOptions($accounts) ) ?>
</div>
<div class='col-md-4'>
<?= $form->field($model, 'type')->dropDownList( ['' => Yii::t('common/transfer', 'All')] + Transfer::types() ) ?>
</div>
<div class='col-md-4'>
<?= $form->field($model, 'id_user')->dropDownList( ['' => Yii::t('common/transfer', 'All')] +ArrayHelper::map($users,'id' , 'username') ) ?>
</div>
</div>
<div class='col-md-4'>
<?= $form->field($model, 'type')->dropDownList( ['' => Yii::t('common/transfer', 'All')] + Transfer::types() ) ?>
</div>
<div class='col-md-4'>
<?= $form->field($model, 'id_user')->dropDownList( ['' => Yii::t('common/transfer', 'All')] +ArrayHelper::map($users,'id' , 'username') ) ?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo $form->field($model, 'searchObjectName') ?>
</div>
<div class="col-md-4">
<?= $form->field($model, 'start')->widget(DatePicker::classname(), [
'pluginOptions' => [
@@ -61,7 +52,6 @@ use kartik\widgets\DatePicker;
</div>
</div>
<div class="form-group">
<?= Html::submitButton(Yii::t('frontend/transfer', 'Search'), ['class' => 'btn btn-primary']) ?>
</div>

View File

@@ -14,6 +14,15 @@ use yii\data\ArrayDataProvider;
$this->title = Yii::t('frontend/transfer', 'Transfers');
$this->params['breadcrumbs'][] = $this->title;
?>
<style>
.table-transfer .money,
.table-transfer .count,
.table-transfer .item-price
{
text-align: right;
}
</style>
<div class="transfer-index">
<h1><?= Html::encode($this->title) ?></h1>
@@ -56,6 +65,7 @@ $this->params['breadcrumbs'][] = $this->title;
?>
<h2>Pénzmozgások</h2>
<?= GridView::widget([
'tableOptions' => ['class' => 'table table-striped table-bordered table-transfer'],
'dataProvider' => $dataProvider,
'columns' => [
@@ -64,8 +74,7 @@ $this->params['breadcrumbs'][] = $this->title;
'value' => 'transferTypeName'
],
[
'attribute' => 'id_object',
'value' => 'objectName'
'attribute' => 'objectName',
],
[
'attribute' => 'id_user',
@@ -75,9 +84,19 @@ $this->params['breadcrumbs'][] = $this->title;
'attribute' => 'id_account',
'value' => 'accountName'
],
'item_price',
'count',
'money',
[
'contentOptions' =>[ 'class' => 'item-price' ],
'attribute' => 'item_price',
],
[
'contentOptions' =>[ 'class' => 'count' ],
'attribute' => 'count',
],
[
'contentOptions' =>[ 'class' => 'money' ],
'attribute' => 'money',
'value' => 'signedMoney'
],
'created_at:datetime',
['class' => 'yii\grid\ActionColumn',