fix clear and copy week
This commit is contained in:
@@ -11,64 +11,67 @@ use common\modules\event\widgets\timetable\TimeTableMonthView;
|
||||
use yii\grid\ActionColumn;
|
||||
use yii\grid\GridView;
|
||||
|
||||
|
||||
$columns = [
|
||||
[
|
||||
'attribute' => 'weekNumber',
|
||||
'label' => '',
|
||||
'value' => static function ($model,$key){
|
||||
return $model->weekNumber;
|
||||
}
|
||||
],
|
||||
[
|
||||
'attribute' => 'monday',
|
||||
'label' => 'Hétfő',
|
||||
'format' => 'raw',
|
||||
'value' => TimeTableMonthView::renderDay('monday')
|
||||
],
|
||||
[
|
||||
'attribute' => 'tuesday',
|
||||
'label' => 'Kedd',
|
||||
'format' => 'raw',
|
||||
'value' => TimeTableMonthView::renderDay('tuesday')
|
||||
],
|
||||
|
||||
[
|
||||
'attribute' => 'wednesday',
|
||||
'label' => 'Szerda',
|
||||
'format' => 'raw',
|
||||
'value' => TimeTableMonthView::renderDay('wednesday')
|
||||
],
|
||||
[
|
||||
'attribute' => 'thursday',
|
||||
'label' => 'Csütörtök',
|
||||
'format' => 'raw',
|
||||
'value' => TimeTableMonthView::renderDay('thursday')
|
||||
],
|
||||
[
|
||||
'attribute' => 'friday',
|
||||
'label' => 'Péntek',
|
||||
'format' => 'raw',
|
||||
'value' => TimeTableMonthView::renderDay('friday')
|
||||
],
|
||||
[
|
||||
'attribute' => 'saturday',
|
||||
'format' => 'raw',
|
||||
'label' => 'Szombat',
|
||||
'value' => TimeTableMonthView::renderDay('saturday')
|
||||
],
|
||||
[
|
||||
'attribute' => 'Sunday',
|
||||
'label' => 'Vasárnap',
|
||||
'format' => 'raw',
|
||||
'value' => TimeTableMonthView::renderDay('sunday')
|
||||
],
|
||||
];
|
||||
|
||||
if ( isset($actionsColumn)){
|
||||
$columns[] = $actionsColumn;
|
||||
}
|
||||
|
||||
?>
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $timeTable->getWeeksArrayDataProvider(),
|
||||
'layout' => '{items}',
|
||||
'columns' => [
|
||||
[
|
||||
'attribute' => 'weekNumber',
|
||||
'label' => '',
|
||||
'value' => static function ($model,$key){
|
||||
return $model->weekNumber;
|
||||
}
|
||||
],
|
||||
[
|
||||
'attribute' => 'monday',
|
||||
'label' => 'Hétfő',
|
||||
'format' => 'raw',
|
||||
'value' => TimeTableMonthView::renderDay('monday')
|
||||
],
|
||||
[
|
||||
'attribute' => 'tuesday',
|
||||
'label' => 'Kedd',
|
||||
'format' => 'raw',
|
||||
'value' => TimeTableMonthView::renderDay('tuesday')
|
||||
],
|
||||
|
||||
[
|
||||
'attribute' => 'wednesday',
|
||||
'label' => 'Szerda',
|
||||
'format' => 'raw',
|
||||
'value' => TimeTableMonthView::renderDay('wednesday')
|
||||
],
|
||||
[
|
||||
'attribute' => 'thursday',
|
||||
'label' => 'Csütörtök',
|
||||
'format' => 'raw',
|
||||
'value' => TimeTableMonthView::renderDay('thursday')
|
||||
],
|
||||
[
|
||||
'attribute' => 'friday',
|
||||
'label' => 'Péntek',
|
||||
'format' => 'raw',
|
||||
'value' => TimeTableMonthView::renderDay('friday')
|
||||
],
|
||||
[
|
||||
'attribute' => 'saturday',
|
||||
'format' => 'raw',
|
||||
'label' => 'Szombat',
|
||||
'value' => TimeTableMonthView::renderDay('saturday')
|
||||
],
|
||||
[
|
||||
'attribute' => 'Sunday',
|
||||
'label' => 'Vasárnap',
|
||||
'format' => 'raw',
|
||||
'value' => TimeTableMonthView::renderDay('sunday')
|
||||
],
|
||||
[
|
||||
'class' => ActionColumn::class,
|
||||
'template' => '{view} {update}',
|
||||
],
|
||||
],
|
||||
'columns' => $columns,
|
||||
]) ?>
|
||||
|
||||
Reference in New Issue
Block a user