fitness-web/frontend/views/account-state/mixed.php

61 lines
1.2 KiB
PHP

<?php
use common\components\accountstate\AccountStateWidget;
use yii\helpers\Html;
use yii\helpers\Url;
use common\components\total\TotalDifferenceWidget;
?>
<style>
.btn-pdf{
margin-bottom: 6px;
}
td.money{
text-align: right;
}
p{
font-weight: bold;
font-size: 16px;
}
</style>
<div class="account-state-view">
<h1>Napi összefoglaló</h1>
<?php
if ( $model->hasDifferenceToPrevState() ){
if ( $model->hasMinus()){
?>
<div class="alert alert-danger" role="alert">Negatív különbözet</div>
<?php
}else{
?>
<div class="alert alert-success" role="alert">Pozitív különbözet</div>
<?php
}
}
?>
<?php echo AccountStateWidget::widget(['model' =>$model]) ?>
<?php
echo Html::a( Html::tag("span","",['class' =>'glyphicon glyphicon-download-alt'])."&nbsp;Pdf", Url::current(['output' =>'pdf']) ,['class' => 'btn btn-primary btn-pdf']);
?>
<?php if ( $model->hasDifferenceToPrevState() ){
?>
<h2>Különbözet</h2>
<?php
echo TotalDifferenceWidget::widget(['model' => $model] );
}
?>
</div>
<?php echo $this->render('_mixed', [
'model' => $model,
'details' => $details
] ); ?>