diff --git a/backend/modules/reports/views/reports/index.php b/backend/modules/reports/views/reports/index.php index 01575b1..d954271 100644 --- a/backend/modules/reports/views/reports/index.php +++ b/backend/modules/reports/views/reports/index.php @@ -19,6 +19,7 @@ function next_day($date, $number) { return date('Y-m-d', strtotime($date) + 3600 * 24 * $number); } + ?>
request->url .'?ReportsSearch[created_at]='; - } else{ - $url = '../..'.Yii::$app->request->url .'&ReportsSearch[created_at]='; + if (!$_GET) { + $url = '../..' . Yii::$app->request->url . '?ReportsSearch[created_at]='; + } else { + $url = '../..' . Yii::$app->request->url . '&ReportsSearch[created_at]='; } for ($date = TODAY; $date != WEEK_AGO; $date = next_day($date, -1)): ?> - = Html::a($date, [$url. $date], ['class' => 'btn btn-primary']) ?> + = Html::a($date, ['index', 'ReportsSearch[created_at]' => $date], ['class' => 'btn btn-primary']) ?>
$i. ($task->hours_spent ч.) $task->task
"; - $i++; - } - } - return $text; - } - ], - 'difficulties', - 'tomorrow', +// [ +// 'attribute' => 'today', +// 'format' => 'raw', +// 'value' => function ($model) { +// +// $text = ''; +// if ($model->task) { +// $i = 1; +// foreach ($model->task as $task) { +// $text .= "$i. ($task->hours_spent ч.) $task->task
"; +// $i++; +// } +// } +// return $text; +// } +// ], + //'difficulties', + //'tomorrow', [ 'format' => 'raw', 'attribute' => 'user_card_id', @@ -130,7 +133,7 @@ function next_day($date, $number) ], ]), 'value' => function ($data) { - return '' . \common\models\Reports::getFio($data) . ''; + return '' . \common\models\Reports::getFio($data) . ''; }, ], diff --git a/backend/views/layouts/main.php b/backend/views/layouts/main.php index 4887ecb..34f6b6c 100755 --- a/backend/views/layouts/main.php +++ b/backend/views/layouts/main.php @@ -35,8 +35,8 @@ if (Yii::$app->controller->action->id === 'login') { = Html::csrfMetaTags() ?>