add collection changes

This commit is contained in:
2015-11-04 08:59:20 +01:00
parent 931b83040b
commit ed9c1e77cd
12 changed files with 210 additions and 326 deletions

View File

@@ -19,6 +19,8 @@ use frontend\components\HtmlHelper;
<?php $form = ActiveForm::begin(); ?>
<?php echo $form->field($model, 'end')->hiddenInput()->label(false) ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? Yii::t('frontend/collection', 'Create') : Yii::t('frontend/collection', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>

View File

@@ -20,37 +20,88 @@ $this->params['breadcrumbs'][] = $this->title;
<dd><?php echo isset($model->lastCollection) ? Yii::$app->formatter->asDatetime($model->lastCollection->end) : Yii::t('frontend/collection', "No collection found") ?></dd>
<dt><?= Yii::t('frontend/collection', "Start of interval")?></dt>
<dd><?php echo Yii::$app->formatter->asDatetime($model->start) ?></dd>
<dd><?php echo Yii::$app->formatter->asDatetime($model->timestampStart) ?></dd>
<dt><?= Yii::t('frontend/collection', "End of interval")?></dt>
<dd><?php echo Yii::$app->formatter->asDatetime($model->end) ?></dd>
<dd><?php echo Yii::$app->formatter->asDatetime($model->timestampEnd) ?></dd>
</dl>
<p>
<?= Html::a(Yii::t('frontend/collection', 'Refresh'), ['create', 'id_account' => $model->id_account], ['class' => 'btn btn-primary']) ?>
<?= Html::a(Yii::t('frontend/collection', 'Select another account'), ['select-account' ], ['class' => 'btn btn-primary']) ?>
</p>
<?php
echo TransferTotalWidget::widget([
'options' => [
'statistic' => $model->totals['paid_at'],
'panelHeading' => 'Fizetve' ,
]
]);
<div class='row'>
<div class='col-md-4'>
<?php
echo TransferTotalWidget::widget([
'options' => [
'statistic' => $model->totals['created_at'],
'panelHeading' => 'Kiadva',
]
]);
?>
</div>
<div class='col-md-4'>
<?php
echo TransferTotalWidget::widget([
'options' => [
'statistic' => $model->totals['created_at_paid'],
'panelHeading' => 'Kiadva és fizetve',
'panelHeading' => 'Kiadva/fizetve',
]
]);
?>
</div>
<div class='col-md-4'>
<?php
echo TransferTotalWidget::widget([
'options' => [
'statistic' => $model->totals['created_at_not_paid'],
'panelHeading' => 'Kiadva/nem fizetve (Hitel)',
'panel-type' => 'panel-danger'
]
]);
?>
</div>
</div>
<div class='row'>
<div class='col-md-4'>
</div>
<div class='col-md-4'>
<?php
echo TransferTotalWidget::widget([
'options' => [
'statistic' => $model->totals['paid_at_not_created_at'],
'panelHeading' => 'Adósság (Hitel)/Fizetve' ,
]
]);
?>
</div>
<div class='col-md-4'>
?>
</div>
</div>
<div class='row'>
<div class='col-md-4'>
</div>
<div class='col-md-4'>
<?php
echo TransferTotalWidget::widget([
'options' => [
'statistic' => $model->totals['paid_at'],
'panelHeading' => 'Fizetve' ,
'panel-type' => 'panel-success'
]
]);
?>
</div>
<div class='col-md-4'>
</div>
</div>
<?= $this->render('_form', [
'model' => $model,

View File

@@ -14,30 +14,23 @@ $this->params['breadcrumbs'][] = $this->title;
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a(Yii::t('frontend/collection', 'Update'), ['update', 'id' => $model->id_collection], ['class' => 'btn btn-primary']) ?>
<?= Html::a(Yii::t('frontend/collection', 'Delete'), ['delete', 'id' => $model->id_collection], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => Yii::t('frontend/collection', 'Are you sure you want to delete this item?'),
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'id_collection',
'id_user',
'created_by',
'id_account',
'money',
'start',
'end',
'type',
'created_at',
'updated_at',
[
'attribute' =>'id_user',
'value' => $model->userName
],
[
'attribute' =>'id_account',
'value' => $model->accountName
],
'money:integer',
'start:datetime',
'end:datetime',
'created_at:datetime',
],
]) ?>