backend/group-training : improve delete&copy week

This commit is contained in:
Roland Schneider
2021-10-10 23:01:18 +02:00
parent 5fe59ff1d3
commit 50011a4e4f
14 changed files with 226 additions and 131 deletions

View File

@@ -15,25 +15,27 @@ class TimeTableMonthView extends Widget
{
public $timeTable;
public $actionsColumn;
public $copyWeekContext;
public function run() {
return $this->render('_timetable', [
'timeTable' => $this->timeTable,
'actionsColumn' => ( isset($this->actionsColumn) ? $this->actionsColumn : null)
'actionsColumn' => ( isset($this->actionsColumn) ? $this->actionsColumn : null),
'copyWeekContext' => $this->copyWeekContext
]);
}
public static function renderDay($weekDay ){
public static function renderDay($weekDay , $copyWeekContext = null){
/**
* @param TimeTableMonthWeek $week
* @return string
*/
return static function ($week) use ($weekDay) {
return static function ($week) use ($weekDay, $copyWeekContext) {
return TimeTableMonthDayView::widget([
'day' => $week->getWeekDay($weekDay),
'copyWeekContext' => $copyWeekContext
]);
};