mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 10:22:18 +00:00
defined new CI routes to differentiate between 5 cases CI doesnt handle anymore but vue router does; define Stundenplan/:lv_id? route for old links to redirect to new route Stundenplan/:mode/:focus_date/lv_id; new route with props route param handling to put them into viewData to always check for the same object; define day as allowed init mode; WIP same thing for raum calendar page;
This commit is contained in:
@@ -23,9 +23,18 @@ class Stundenplan extends Auth_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function index($lv_id = null)
|
||||
public function index($mode = 'Week', $focus_date = null, $lv_id = null)
|
||||
{
|
||||
// Convert string "null" to actual null values -> ci3 reroute fix
|
||||
$mode = ($mode === 'null') ? 'Week' : ucfirst(strtolower($mode));
|
||||
$focus_date = ($focus_date === 'null') ? date('Y-m-d') : $focus_date;
|
||||
$lv_id = ($lv_id === 'null') ? null : $lv_id;
|
||||
|
||||
if($mode) $mode = ucfirst(strtolower($mode));
|
||||
|
||||
$viewData = array(
|
||||
'mode' => $mode,
|
||||
'focus_date' => $focus_date,
|
||||
'lv_id' => $lv_id,
|
||||
'uid'=>getAuthUID(),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user