This commit is contained in:
akosse
2020-02-05 12:08:01 +03:00
parent dbaeeb3c5a
commit 3da2dd1543
34 changed files with 1173 additions and 3 deletions

View File

@ -0,0 +1,12 @@
<div class="reports-default-index">
<h1><?= $this->context->action->uniqueId ?></h1>
<p>
This is the view content for action "<?= $this->context->action->id ?>".
The action belongs to the controller "<?= get_class($this->context) ?>"
in the "<?= $this->context->module->id ?>" module.
</p>
<p>
You may customize this page by editing the following file:<br>
<code><?= __FILE__ ?></code>
</p>
</div>

View File

@ -0,0 +1,38 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\models\Reports */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="reports-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'created_at')->input(
'date',
[
'placeholder' => 'Zadejte svůj Datum narození',
'language' => 'en',
"data-format" => "DD MMMM YYYY",
'class' => 'form-control report-date'
]
) ?>
<?= $form->field($model, 'today')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'difficulties')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'tomorrow')->textInput(['maxlength' => true]) ?>
<div class="form-group">
<?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@ -0,0 +1,39 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model frontend\modules\reports\models\ReportsSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="reports-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'id') ?>
<?= $form->field($model, 'created_at') ?>
<?= $form->field($model, 'today') ?>
<?= $form->field($model, 'difficulties') ?>
<?= $form->field($model, 'tomorrow') ?>
<?php // echo $form->field($model, 'user_card_id') ?>
<?php // echo $form->field($model, 'status') ?>
<div class="form-group">
<?= Html::submitButton('Поиск', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Сброс', ['class' => 'btn btn-default']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@ -0,0 +1,18 @@
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\Reports */
$this->title = 'Добавить отчет';
$this->params['breadcrumbs'][] = ['label' => 'Reports', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="reports-create">
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>

View File

@ -0,0 +1,38 @@
<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel frontend\modules\reports\models\ReportsSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Отчеты';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="reports-index">
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Добавить', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
// 'id',
'created_at',
'today',
'difficulties',
'tomorrow',
// 'user_card_id',
//'status',
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
</div>

View File

@ -0,0 +1,19 @@
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\Reports */
$this->title = 'Редактировать отчет';
$this->params['breadcrumbs'][] = ['label' => 'Отчеты', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = 'Редактировать';
?>
<div class="reports-update">
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>

View File

@ -0,0 +1,41 @@
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model common\models\Reports */
$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Отчеты', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
\yii\web\YiiAsset::register($this);
?>
<div class="reports-view">
<p>
<?= Html::a('Редактировать', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Удалить', ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Вы уверенны, что хотите удалить этот отчет?',
'method' => 'post',
],
]) ?>
<?= Html::a('Список', ['index', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
// 'id',
'created_at',
'today',
'difficulties',
'tomorrow',
// 'user_card_id',
// 'status',
],
]) ?>
</div>