diff --git a/app/controllers/admin/overlapping.php b/app/controllers/admin/overlapping.php index 7ece62752638cea60dedfce964c90e88d2d9782f..97efe4e434d8855eddaf062249395510c5479a7c 100644 --- a/app/controllers/admin/overlapping.php +++ b/app/controllers/admin/overlapping.php @@ -162,7 +162,7 @@ class Admin_OverlappingController extends AuthenticatedController PageLayout::postError('Die Basis-Version muss angegeben werden!'); } $_SESSION['MVV_OVL_HIDDEN'] = Request::int('show_hidden'); - $this->redirect($this->url_for('/index', ['selection' => $selection_id])); + $this->redirect($this->indexURL(['selection' => $selection_id])); } /** diff --git a/app/controllers/course/admission.php b/app/controllers/course/admission.php index 8738e60e6b3261d79bb5a860a70d921d68d84ed7..80e084acd88cfbb9d9a9696919e674d0305d8e20 100644 --- a/app/controllers/course/admission.php +++ b/app/controllers/course/admission.php @@ -193,7 +193,7 @@ class Course_AdmissionController extends AuthenticatedController } } if (!$question) { - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } else { $this->button_yes = 'change_admission_prelim_yes'; $this->button_no = 'change_admission_prelim_no'; @@ -234,7 +234,7 @@ class Course_AdmissionController extends AuthenticatedController PageLayout::postSuccess(_("Zugriff für externe Nutzer wurde geändert.")); } } - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } function change_admission_turnout_action() @@ -295,7 +295,7 @@ class Course_AdmissionController extends AuthenticatedController } } if (!$question) { - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } else { $this->request = $request; $this->button_yes = 'change_admission_turnout_yes'; @@ -319,7 +319,7 @@ class Course_AdmissionController extends AuthenticatedController PageLayout::postSuccess(_('Die zugelassenen Nutzerdomänen wurden geändert.')); } } - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } function change_course_set_action() @@ -377,7 +377,7 @@ class Course_AdmissionController extends AuthenticatedController } } if (!$question) { - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } else { $this->request = ['change_course_set_unassign' => 1]; $this->button_yes = 'change_course_set_unassign_yes'; @@ -415,7 +415,7 @@ class Course_AdmissionController extends AuthenticatedController $course_set_id = CourseSet::getGlobalLockedAdmissionSetId(); CourseSet::addCourseToSet($course_set_id, $this->course_id); PageLayout::postMessage(MessageBox::success(_("Die Veranstaltung wurde gesperrt."))); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); return; } else { CSRFProtection::verifyUnsafeRequest(); @@ -448,7 +448,7 @@ class Course_AdmissionController extends AuthenticatedController } $course_set->store(); PageLayout::postMessage(MessageBox::success(_("Die Anmelderegel wurde erzeugt und der Veranstaltung zugewiesen."))); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); return; } } diff --git a/app/controllers/course/dates.php b/app/controllers/course/dates.php index be7b387998647844de29822c15ea700c0e054afb..9c803b7e53e1958f2730951991ee63bb1ce099a5 100644 --- a/app/controllers/course/dates.php +++ b/app/controllers/course/dates.php @@ -624,7 +624,7 @@ class Course_DatesController extends AuthenticatedController } PageLayout::postSuccess(sprintf(_('Es wurden %u Ordner erstellt.'), $count)); $this->response->add_header('X-Dialog-Close', '1'); - $this->relocate($this->url_for('/index')); + $this->relocate($this->action_url('index')); } } } diff --git a/app/controllers/course/enrolment.php b/app/controllers/course/enrolment.php index 16038ff6acb95287f20e1f8e6430f4cca2ae57d3..a1e502372667a1df564e3e176fbfca9badb38dc6 100644 --- a/app/controllers/course/enrolment.php +++ b/app/controllers/course/enrolment.php @@ -243,8 +243,8 @@ class Course_EnrolmentController extends AuthenticatedController _('Wollen Sie sich zu der Veranstaltung "%s" wirklich anmelden?'), htmlReady(Course::find($this->course_id)->name) ), - $this->url_for("/apply/{$this->course_id}", ['apply' => 1]), - $this->url_for("/apply/{$this->course_id}", ['decline' => 1]) + $this->action_url("apply/{$this->course_id}", ['apply' => 1]), + $this->action_url("apply/{$this->course_id}", ['decline' => 1]) ); $this->relocate(URLHelper::getLink('dispatch.php/course/details', ['sem_id' => $this->course_id])); @@ -323,6 +323,6 @@ class Course_EnrolmentController extends AuthenticatedController } } } - $this->redirect($this->url_for("/apply/{$this->course_id}{$anchor}")); + $this->redirect($this->action_url("apply/{$this->course_id}{$anchor}")); } } diff --git a/app/controllers/course/lvgselector.php b/app/controllers/course/lvgselector.php index a84d55642ffb386b1a3fbbcce7384c8677f1890c..541ff27521bd00f0977375b9fd4c3b6a382c5377 100644 --- a/app/controllers/course/lvgselector.php +++ b/app/controllers/course/lvgselector.php @@ -117,7 +117,7 @@ class Course_LvgselectorController extends AuthenticatedController } $this->ajax_url = $this->url_for('course/lvgselector/ajax'); - $this->url = $this->url_for('/index'); + $this->url = $this->action_url('index'); } /** @@ -190,7 +190,7 @@ class Course_LvgselectorController extends AuthenticatedController if (Request::get('from')) { $url = URLHelper::getURL('dispatch.php/'.Request::get('from')); } else { - $url = $this->url_for('/index'); + $url = $this->action_url('index'); } diff --git a/app/controllers/course/management.php b/app/controllers/course/management.php index b3b92681ce41fcaee47da0c128f37aa7f4be32a9..1753919c213ee266238dc9475b2d55b491f5ced6 100644 --- a/app/controllers/course/management.php +++ b/app/controllers/course/management.php @@ -151,7 +151,7 @@ class Course_ManagementController extends AuthenticatedController } } } - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } /** @@ -166,7 +166,7 @@ class Course_ManagementController extends AuthenticatedController $course = Course::findCurrent(); if (!$course) { - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); return; } @@ -201,6 +201,6 @@ class Course_ManagementController extends AuthenticatedController PageLayout::postMessage(MessageBox::success($msg)); } } - $this->relocate($this->url_for('/index')); + $this->relocate($this->action_url('index')); } } diff --git a/app/controllers/course/plus.php b/app/controllers/course/plus.php index 79e94cffe8fd7d83148865ea07aa622a8c8bc64a..1a5ac26b1b876ad857c8066e2fa81abc305b4d67 100644 --- a/app/controllers/course/plus.php +++ b/app/controllers/course/plus.php @@ -153,7 +153,7 @@ class Course_PlusController extends AuthenticatedController if ($this->tool->store()) { PageLayout::postSuccess(_('Die Einstellungen wurden gespeichert.')); } - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } } @@ -304,7 +304,7 @@ class Course_PlusController extends AuthenticatedController $actions = new ActionsWidget(); $actions->addLink( _('Werkzeugreihenfolge ändern'), - $this->url_for('/sorttools'), + $this->action_url('sorttools'), Icon::create('arr_2down') )->asDialog('size=500;reload-on-close'); diff --git a/app/controllers/fachabschluss/abschluesse.php b/app/controllers/fachabschluss/abschluesse.php index e7d350dca9f64ee86eaefef35cb4db09c6412a0f..0ef58f2210e485fc6b3e9c3a43292d4feb60364e 100644 --- a/app/controllers/fachabschluss/abschluesse.php +++ b/app/controllers/fachabschluss/abschluesse.php @@ -106,7 +106,7 @@ class Fachabschluss_AbschluesseController extends MVVController } else { PageLayout::postInfo(_('Es wurden keine Änderungen vorgenommen.')); } - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); return; } } @@ -151,7 +151,7 @@ class Fachabschluss_AbschluesseController extends MVVController } } - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } public function fach_action($fach_id = null) @@ -179,7 +179,7 @@ class Fachabschluss_AbschluesseController extends MVVController $widget = new ActionsWidget(); $widget->addLink( _('Neuen Abschluss anlegen'), - $this->url_for('/abschluss'), + $this->action_url('abschluss'), Icon::create('add') ); $sidebar->addWidget($widget); diff --git a/app/controllers/fachabschluss/faecher.php b/app/controllers/fachabschluss/faecher.php index b767005af7e62fb4776883b963073919a98172bc..e5c11848fbb2491ca938d1e565f5970fd45cbc0d 100644 --- a/app/controllers/fachabschluss/faecher.php +++ b/app/controllers/fachabschluss/faecher.php @@ -104,7 +104,7 @@ class Fachabschluss_FaecherController extends MVVController $success_message, htmlReady($this->fach->name) )); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); return; } } @@ -149,7 +149,7 @@ class Fachabschluss_FaecherController extends MVVController )); } } - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } /** @@ -214,11 +214,11 @@ class Fachabschluss_FaecherController extends MVVController $widget = new ViewsWidget(); $widget->addLink( _('Fächer mit zugeordneten Abschlüssen'), - $this->url_for('/index') + $this->action_url('index') )->setActive(in_array($this->action, ['index', 'details'])); $widget->addLink( _('Gruppierung nach Fachbereichen'), - $this->url_for('/fachbereiche') + $this->action_url('fachbereiche') )->setActive(in_array($this->action, ['fachbereiche', 'details_fachbereich'])); $sidebar->addWidget($widget); @@ -227,7 +227,7 @@ class Fachabschluss_FaecherController extends MVVController $widget = new ActionsWidget(); $widget->addLink( _('Neues Fach anlegen'), - $this->url_for('/fach'), + $this->action_url('fach'), Icon::create('add') ); $sidebar->addWidget($widget); diff --git a/app/controllers/fachabschluss/kategorien.php b/app/controllers/fachabschluss/kategorien.php index 8c005879d5ab210c6c57cb7f68553683f5459a9d..205f1f1d95ddd9a7bf02ec769d3b71ae9c9b1578 100644 --- a/app/controllers/fachabschluss/kategorien.php +++ b/app/controllers/fachabschluss/kategorien.php @@ -83,12 +83,12 @@ class Fachabschluss_KategorienController extends MVVController PageLayout::postSuccess(sprintf( $success_message, htmlReady($this->abschluss_kategorie->name) )); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); return; } } - $this->cancel_url = $this->url_for('/index'); + $this->cancel_url = $this->action_url('index'); $this->setSidebar(); if (!$this->abschluss_kategorie->isNew()) { @@ -130,7 +130,7 @@ class Fachabschluss_KategorienController extends MVVController } } } - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } /** @@ -224,7 +224,7 @@ class Fachabschluss_KategorienController extends MVVController $widget = new ActionsWidget(); $widget->addLink( _('Neue Abschluss-Kategorie anlegen'), - $this->url_for('/kategorie'), + $this->action_url('kategorie'), Icon::create('add') ); $sidebar->addWidget($widget); diff --git a/app/controllers/lvgruppen/lvgruppen.php b/app/controllers/lvgruppen/lvgruppen.php index e9050de1c5b2e076d8edfce2af641d44b3ae8c42..9e3e7a4902d2ce8ff46d6aa9d2d79e3abf976f79 100644 --- a/app/controllers/lvgruppen/lvgruppen.php +++ b/app/controllers/lvgruppen/lvgruppen.php @@ -97,13 +97,13 @@ class Lvgruppen_LvgruppenController extends MVVController $widget = new ExportWidget(); $widget->addLink(_('Lehrveranstaltungsgruppen mit Zuordnungen exportieren'), - $this->url_for('/export_xls'), + $this->action_url('export_xls'), Icon::create('export')); if (Config::get()->MVV_ALLOW_CREATE_LVGRUPPEN_INDEPENDENTLY && MvvPerm::havePermCREATE('Lvgruppe')) { $widget->addLink(_('Neue LV-Gruppe anlegen'), - $this->url_for('/lvgruppe'), + $this->action_url('lvgruppe'), Icon::create('add'), ['data-dialog' => 'size=auto']); } @@ -184,8 +184,8 @@ class Lvgruppen_LvgruppenController extends MVVController $this->lvgruppe->getDisplayName() ); } - $this->cancel_url = $this->url_for('/index'); - $this->submit_url = $this->url_for('/lvgruppe/' . $this->lvgruppe->getId()); + $this->cancel_url = $this->action_url('index'); + $this->submit_url = $this->action_url('lvgruppe/' . $this->lvgruppe->getId()); if (Request::submitted('store')) { CSRFProtection::verifyUnsafeRequest(); $stored = false; @@ -204,7 +204,7 @@ class Lvgruppen_LvgruppenController extends MVVController $success_message, htmlReady($this->lvgruppe->getDisplayName()) )); - $this->relocate($this->url_for('/index')); + $this->relocate($this->action_url('index')); return; } } @@ -300,7 +300,7 @@ class Lvgruppen_LvgruppenController extends MVVController trim(Request::get('lvgruppe_suche_parameter')), Request::option('lvgruppe_suche') ); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } /** @@ -310,7 +310,7 @@ class Lvgruppen_LvgruppenController extends MVVController { $this->reset_search('Lvgruppe'); $this->reset_page(); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } /** @@ -340,7 +340,7 @@ class Lvgruppen_LvgruppenController extends MVVController $widget = new SelectWidget( _('Verwendung in Semester:'), - $this->url_for('/set_filter', ['fachbereich_filter' => $selected_fachbereich]), + $this->action_url('set_filter', ['fachbereich_filter' => $selected_fachbereich]), 'semester_filter' ); @@ -366,7 +366,7 @@ class Lvgruppen_LvgruppenController extends MVVController if ($perm_institutes !== false) { $widget = new SelectWidget( _('Verwendet von Fachbereich:'), - $this->url_for('/set_filter', ['semester_filter' => $this->semester_filter]), + $this->action_url('set_filter', ['semester_filter' => $this->semester_filter]), 'fachbereich_filter' ); @@ -416,7 +416,7 @@ class Lvgruppen_LvgruppenController extends MVVController $this->reset_page(); $this->sessSet('filter', $this->filter); $this->sessSet('semester_filter', $this->semester_filter); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } public function reset_filter_action() @@ -426,7 +426,7 @@ class Lvgruppen_LvgruppenController extends MVVController $this->semester_filter = null; $this->sessRemove('semester_filter'); $this->reset_page(); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } /** diff --git a/app/controllers/materialien/files.php b/app/controllers/materialien/files.php index ba5f2c8ba1efd9119f2280b59f2c0f80331ff059..5b35a618711c7cce670f5ba75271adf9c5059ed3 100644 --- a/app/controllers/materialien/files.php +++ b/app/controllers/materialien/files.php @@ -83,7 +83,7 @@ class Materialien_FilesController extends MVVController if (MvvFile::countBySql() === 0) { PageLayout::postInfo(sprintf( _('Es wurden noch keine Dokumente angelegt. Klicken Sie %shier%s, um ein neues Dokument anzulegen.'), - '<a data-dialog="size=auto" href="' . $this->link_for('/new_dokument') . '">', + '<a data-dialog="size=auto" href="' . $this->action_link('new_dokument') . '">', '</a>') ); } @@ -175,7 +175,7 @@ class Materialien_FilesController extends MVVController $this->render_nothing(); } else { $this->response->add_header('X-Dialog-Close', 1); - $this->response->add_header('X-Location', $this->url_for('/index')); + $this->response->add_header('X-Location', $this->action_url('index')); } return; } @@ -253,7 +253,7 @@ class Materialien_FilesController extends MVVController $this->range_type = $range_type?:$mvv_file->getRangeType(); if (!$this->range_type) { - $this->redirect($this->url_for('/select_range_type',$mvvfile_id)); + $this->redirect($this->action_url('select_range_type',$mvvfile_id)); return; } $this->pre_selected = $mvv_file->ranges->pluck('range_id'); @@ -530,7 +530,7 @@ class Materialien_FilesController extends MVVController ); } - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } /** @@ -591,7 +591,7 @@ class Materialien_FilesController extends MVVController // store filter $this->reset_page(); $this->sessSet('filter', $this->filter); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } public function reset_filter_action() @@ -613,7 +613,7 @@ class Materialien_FilesController extends MVVController if (MvvPerm::get('MvvFile')->havePermCreate()) { $widget->addLink( _('Neues Dokument anlegen'), - $this->url_for('/new_dokument'), + $this->action_url('new_dokument'), Icon::create('add') )->asDialog('size=auto'); } @@ -665,8 +665,8 @@ class Materialien_FilesController extends MVVController 'selected_institut' => $this->filter['mvv_studiengang.institut_id'], 'zuordnungen' => MvvFile::getAllRelations($this->search_result['MvvFile']), 'selected_zuordnung' => $this->filter['mvv_files_ranges.range_type'], - 'action' => $this->url_for('/set_filter'), - 'action_reset' => $this->url_for('/reset_filter')] + 'action' => $this->action_url('set_filter'), + 'action_reset' => $this->action_url('reset_filter')] ); $sidebar = Sidebar::get(); diff --git a/app/controllers/module/institute.php b/app/controllers/module/institute.php index 66f28de6c3c781f13466f4ba0aae784fc6961622..0572640a11c597accbeab7d4b6ea0632e55e70ef 100644 --- a/app/controllers/module/institute.php +++ b/app/controllers/module/institute.php @@ -108,7 +108,7 @@ class Module_InstituteController extends Module_ModuleController $this->render_template('module/institute/details'); } } else { - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } } } diff --git a/app/controllers/module/module.php b/app/controllers/module/module.php index cb685826e0b801f8fa1b280ec43a55d417053f2c..c936feec0764aeeca3ac424f7e29f8d5306a8ce9 100644 --- a/app/controllers/module/module.php +++ b/app/controllers/module/module.php @@ -154,7 +154,7 @@ class Module_ModuleController extends MVVController $sidebar_template = $template_factory->render('shared/deskriptor_language', [ 'modul' => $this->modul, 'sprache' => $this->display_language, - 'link' => $this->url_for('/modul', $this->modul->id, $this->institut_id), + 'link' => $this->modulURL($this->modul->id, $this->institut_id), 'url' => $this->url] ); @@ -176,7 +176,7 @@ class Module_ModuleController extends MVVController ); $action_widget->addLink( _('Vergleich mit anderem Modul'), - $this->url_for('/diff_select', $this->modul->id), + $this->diff_selectURL($this->modul->id), Icon::create('learnmodule'), ['data-dialog' => 'size=auto'] ); @@ -184,7 +184,7 @@ class Module_ModuleController extends MVVController if ($this->modul->stat === 'planung' && MvvPerm::haveFieldPermStat($this->modul)) { $action_widget->addLink( _('Modul genehmigen'), - $this->url_for('/approve', $this->modul->id), + $this->approveURL($this->modul->id), Icon::create('accept'), ['data-dialog' => 'size=auto;buttons=false'] ); @@ -207,7 +207,7 @@ class Module_ModuleController extends MVVController $template_factory->render('shared/modul_variants', [ 'variants' => $variants, - 'link' => $this->url_for('/modul') + 'link' => $this->modulURL() ]) )); $sidebar->addWidget($widget, 'variants'); @@ -302,7 +302,7 @@ class Module_ModuleController extends MVVController $success_message, htmlReady($this->modul->getDisplayName()) )); - $this->redirect($this->url_for('/index')); + $this->redirect($this->indexURL()); return; } } @@ -365,7 +365,7 @@ class Module_ModuleController extends MVVController ->fireJSFunctionOnSelect('STUDIP.MVV.Search.addSelected') ->noSelectbox(); - $this->cancel_url = $this->url_for('/index'); + $this->cancel_url = $this->indexURL(); $this->render_template('module/module/modul', $this->layout); } @@ -396,7 +396,7 @@ class Module_ModuleController extends MVVController )); } } - $this->redirect($this->url_for('/index')); + $this->redirect($this->indexURL()); } public function assignments_action($modul_id) @@ -429,7 +429,7 @@ class Module_ModuleController extends MVVController _('Modul "%s" genehmigt!'), htmlReady($this->modul->getDisplayName()) )); - $this->redirect($this->url_for('/details/' . $modul_id)); + $this->redirect($this->detailsURL($modul_id)); return; } } @@ -451,8 +451,8 @@ class Module_ModuleController extends MVVController PageLayout::postError(_('Unbekanntes Modul')); } else { $this->perm = MvvPerm::get($this->modul); - $this->submit_url = $this->url_for('/copy/' . $this->modul->id); - $this->cancel_url = $this->url_for('/index'); + $this->submit_url = $this->copyURL($this->modul->id); + $this->cancel_url = $this->indexURL(); } PageLayout::setTitle(_('Modul kopieren')); } @@ -511,7 +511,7 @@ class Module_ModuleController extends MVVController } } } - $this->redirect($this->url_for('/index')); + $this->redirect($this->indexURL()); } /** @@ -586,7 +586,7 @@ class Module_ModuleController extends MVVController $this->render_nothing(); } } else { - $this->redirect($this->url_for('/index')); + $this->redirect($this->indexURL()); } } @@ -597,7 +597,7 @@ class Module_ModuleController extends MVVController $this->modul = Modul::find(Request::option('modul_id')); if (!$this->modul) { PageLayout::postError(_('Unbekanntes Modul')); - $this->redirect($this->url_for('/index')); + $this->redirect($this->indexURL()); return; } $this->modulteil = new Modulteil(); @@ -668,7 +668,7 @@ class Module_ModuleController extends MVVController [ 'modul' => $this->modulteil, 'sprache' => $this->display_language, - 'link' => $this->url_for('/modulteil', $this->modulteil->id), + 'link' => $this->modulteilURL($this->modulteil->id), 'url' => $this->url ] ) @@ -769,7 +769,7 @@ class Module_ModuleController extends MVVController } else { PageLayout::postInfo(_('Es wurden keine Änderungen vorgenommen.')); } - $this->redirect($this->url_for('/details/' . $this->modulteil->modul_id)); + $this->redirect($this->detailsURL($this->modulteil->modul_id)); return; } } @@ -780,7 +780,7 @@ class Module_ModuleController extends MVVController htmlReady($GLOBALS['MVV_MODUL_DESKRIPTOR']['SPRACHE']['values'][$this->display_language]['name']) )); } - $this->cancel_url = $this->url_for('/details/' . $this->modulteil->modul_id); + $this->cancel_url = $this->detailsURL($this->modulteil->modul_id); $action_widget = Sidebar::get()->getWidget('actions'); $action_widget->addLink( @@ -820,7 +820,7 @@ class Module_ModuleController extends MVVController )); } } - $this->redirect($this->url_for('/details/' . Request::option('modul_id'))); + $this->redirect($this->detailsURL(Request::option('modul_id'))); } public function copy_modulteil_action($modulteil_id) @@ -828,7 +828,7 @@ class Module_ModuleController extends MVVController $modulteil = Modulteil::find($modulteil_id); if (!$modulteil) { PageLayout::postError(_('Unbekannter Modulteil')); - $this->redirect($this->url_for('/index')); + $this->redirect($this->indexURL()); return; } $copy_modulteil = $modulteil->copy(); @@ -837,7 +837,7 @@ class Module_ModuleController extends MVVController _('Der Modulteil "%s" wurde kopiert. Klicken Sie auf "übernehmen", um Änderungen an der Kopie zu speichern.'), htmlReady($copy_modulteil->getDisplayName()) )); - $this->redirect($this->url_for('/modulteil/' . $copy_modulteil->id)); + $this->redirect($this->modulteilURL($copy_modulteil->id)); } public function modulteil_lvg_action($modulteil_id) @@ -845,7 +845,7 @@ class Module_ModuleController extends MVVController $this->modulteil = Modulteil::find($modulteil_id); if (is_null($this->modulteil)) { PageLayout::postError(_('Unbekannter Modulteil')); - $this->redirect($this->url_for('/index')); + $this->redirect($this->indexURL()); return; } else { $this->modulteil_id = $this->modulteil->getId(); @@ -881,7 +881,7 @@ class Module_ModuleController extends MVVController $this->modulteil = Modulteil::find($modulteil_id); if (is_null($this->modulteil)) { PageLayout::postError(_('Unbekannter Modulteil')); - $this->redirect($this->url_for('/index')); + $this->redirect($this->indexURL()); return; } else { $this->lvgruppe = Lvgruppe::find( @@ -911,7 +911,7 @@ class Module_ModuleController extends MVVController )); } } - $this->redirect($this->url_for('/details/' . $this->modulteil->modul_id . '/' . $this->modulteil->id)); + $this->redirect($this->detailsURL($this->modulteil->modul_id . '/' . $this->modulteil->id)); } } @@ -933,7 +933,7 @@ class Module_ModuleController extends MVVController $lvg_modulteil->delete(); } } - $this->redirect($this->url_for('/details/' . $modulteil->modul_id . '/' . $modulteil->id)); + $this->redirect($this->detailsURL($modulteil->modul_id . '/' . $modulteil->id)); } public function lvgruppe_action($modulteil_id, $lvgruppe_id = null) @@ -941,7 +941,7 @@ class Module_ModuleController extends MVVController $this->modulteil = Modulteil::find($modulteil_id); if (is_null($this->modulteil)) { PageLayout::postError(_('Unbekannter Modulteil')); - $this->redirect($this->url_for('/index')); + $this->redirect($this->indexURL()); return; } else { $this->lvgruppe = Lvgruppe::get($lvgruppe_id); @@ -956,8 +956,8 @@ class Module_ModuleController extends MVVController $this->headline = sprintf(_('Lehrveranstaltungsgruppe "%s" bearbeiten.'), $this->lvgruppe->getDisplayName()); } - $this->cancel_url = $this->url_for('/index'); - $this->submit_url = $this->url_for('/lvgruppe' . '/' . $this->modulteil->id . '/' . $this->lvgruppe->id); + $this->cancel_url = $this->indexURL(); + $this->submit_url = $this->lvgruppeURL($this->modulteil->id . '/' . $this->lvgruppe->id); if (Request::submitted('store')) { CSRFProtection::verifyUnsafeRequest(); $stored = false; @@ -987,7 +987,7 @@ class Module_ModuleController extends MVVController } else { PageLayout::postInfo(_('Es wurden keine Änderungen vorgenommen.')); } - $this->relocate($this->url_for('/details/' . $this->modulteil->modul_id . '/' . $this->modulteil->id)); + $this->relocate($this->detailsURL($this->modulteil->modul_id . '/' . $this->modulteil->id)); return; } } @@ -1010,7 +1010,7 @@ class Module_ModuleController extends MVVController $modul->delete(); } } - $this->redirect($this->url_for('/details/' . $modul->id)); + $this->redirect($this->detailsURL($modul->id)); } public function delete_modulteil_action($modulteil_id) @@ -1029,7 +1029,7 @@ class Module_ModuleController extends MVVController $modulteil->delete(); } } - $this->redirect($this->url_for('/details/' . $modul_id)); + $this->redirect($this->detailsURL($modul_id)); } public function details_action($modul_id, $modulteil_id = null) @@ -1042,7 +1042,7 @@ class Module_ModuleController extends MVVController $this->search_lvgruppe($this->modulteil_id); } if (Request::isXhr()) { - $this->details_url = '/modulteil_lvg/'; + $this->details_action = 'modulteil_lvg'; } else { $this->perform_relayed('index'); } @@ -1076,7 +1076,7 @@ class Module_ModuleController extends MVVController $this->variante = $this->modul->modul_variante; } else { PageLayout::postError(_('Unbekanntes Modul')); - $this->relocate($this->url_for('/index')); + $this->relocate($this->indexURL()); } } @@ -1088,15 +1088,15 @@ class Module_ModuleController extends MVVController if (!$new_module || !$old_module) { PageLayout::postError(_('Unbekanntes Modul')); if ($new_module) { - $this->redirect($this->url_for('/diff_select/' . $new_module->id)); + $this->redirect($this->diff_selectURL($new_module->id)); } else { - $this->redirect($this->url_for('/index')); + $this->redirect($this->indexURL()); } } else { if (Request::isXhr()) { $this->response->add_header( 'X-Location', - $this->url_for('/diff/' . $new_module->id . '/' . $old_module->id) + $this->diffURL($new_module->id . '/' . $old_module->id) ); } $type_new = 1; @@ -1171,7 +1171,7 @@ class Module_ModuleController extends MVVController Request::get('modul_suche'), $this->filter ); } - $this->redirect($this->url_for('/index')); + $this->redirect($this->indexURL()); } /** @@ -1285,7 +1285,7 @@ class Module_ModuleController extends MVVController // store filter $this->reset_page(); $this->sessSet('filter', $this->filter); - $this->redirect($this->url_for('/index')); + $this->redirect($this->indexURL()); } public function reset_filter_action() @@ -1293,7 +1293,7 @@ class Module_ModuleController extends MVVController $this->reset_page(); $this->sessSet('filter', []); - $this->redirect($this->url_for('/index')); + $this->redirect($this->indexURL()); } protected function setSidebar() @@ -1316,7 +1316,7 @@ class Module_ModuleController extends MVVController if (MvvPerm::havePermCreate('Modul')) { $widget->addLink( _('Neues Modul anlegen'), - $this->url_for('/modul'), + $this->modulURL(), Icon::create('add') ); } @@ -1378,8 +1378,8 @@ class Module_ModuleController extends MVVController $template->set_attribute('selected_semester', $selected_semester->id); $template->set_attribute('default_semester', Semester::findCurrent()->id); - $template->set_attribute('action', $this->url_for('/set_filter')); - $template->set_attribute('action_reset', $this->url_for('/reset_filter')); + $template->set_attribute('action', $this->set_filterURL()); + $template->set_attribute('action_reset', $this->reset_filterURL()); $filter_template = $template->render(); @@ -1414,7 +1414,7 @@ class Module_ModuleController extends MVVController $this->search_term ? $this->search_term : _('Modul suchen'); $sidebar = Sidebar::get(); - $widget = new SearchWidget($this->url_for('/search')); + $widget = new SearchWidget($this->searchURL()); $widget->addNeedle( _('Modul suchen'), 'modul_suche', diff --git a/app/controllers/room_management/overview.php b/app/controllers/room_management/overview.php index 5b712f1330cdcf8b3ba85df1e10b7600c169c73c..aecf600664f31bddbe5c1850a7860a5edad9ca35 100644 --- a/app/controllers/room_management/overview.php +++ b/app/controllers/room_management/overview.php @@ -81,7 +81,7 @@ class RoomManagement_OverviewController extends AuthenticatedController } if (!$this->show_admin_actions) { - $this->redirect($this->url_for('/rooms')); + $this->redirect($this->action_url('rooms')); return; } diff --git a/app/controllers/search/angebot.php b/app/controllers/search/angebot.php index a80504f47a74bbfbeefe89a35e92e6334b682e38..f2b532197257fab72278b00072b78f80a44c2032 100644 --- a/app/controllers/search/angebot.php +++ b/app/controllers/search/angebot.php @@ -118,7 +118,7 @@ class Search_AngebotController extends MVVController $this->abschluesse = $abschluss_kategorie; $this->faecher = $result; $this->name = $name; - $this->url = $this->url_for('fach/detail/'); + $this->url = 'fach/detail'; } public function detail_action($fach_id, $abschluss_id, $studiengang_id = null) diff --git a/app/controllers/search/module.php b/app/controllers/search/module.php index 9fbd66fd7115171fa5eb44397129008904e78b9d..082ad2164f71a6e2259a813bee3c9c48ed971583 100644 --- a/app/controllers/search/module.php +++ b/app/controllers/search/module.php @@ -311,7 +311,7 @@ class Search_ModuleController extends MVVController $this->initPageParams(); $this->drilldown(); $this->page = 1; - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } private function drilldown() @@ -331,7 +331,7 @@ class Search_ModuleController extends MVVController $this->initPageParams(); $this->page = 1; $this->reset_drilldown(); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } private function reset_drilldown() diff --git a/app/controllers/search/studiengaenge.php b/app/controllers/search/studiengaenge.php index aae40691e33c76282c3075291fd37c3c4f9b0514..1bd94a47db225ffeeb832e0005ca1d3680dc6aa1 100644 --- a/app/controllers/search/studiengaenge.php +++ b/app/controllers/search/studiengaenge.php @@ -106,7 +106,7 @@ class Search_StudiengaengeController extends MVVController if (!$this->studiengang || !in_array($this->studiengang->stat, $status_filter)) { PageLayout::postError( _('Unbekannter Studiengang')); - $this->relocate($this->url_for('/index')); + $this->relocate($this->action_url('index')); return null; } @@ -183,7 +183,7 @@ class Search_StudiengaengeController extends MVVController } } if (!$this->verlauf_url) { - $this->verlauf_url = '/verlauf'; + $this->verlauf_url = 'search/studiengang/verlauf'; } $this->breadcrumb->append(Studiengang::find($studiengang_id), 'einfach'); $this->render_template('search/studiengaenge/einfach', $this->layout); @@ -316,7 +316,7 @@ class Search_StudiengaengeController extends MVVController $this->setVersionSelectWidget( $versionen, - $this->url_for('/verlauf', $studiengangTeil->id, $stgteil_bez_id, $studiengang_id) + $this->action_url('verlauf', $studiengangTeil->id, $stgteil_bez_id, $studiengang_id) ); ksort($fachsemesterData); @@ -334,7 +334,7 @@ class Search_StudiengaengeController extends MVVController $widget->addCheckbox( _('Nur Module mit Veranstaltungen anzeigen'), $this->with_courses, - $this->url_for('/verlauf/' . $stgteil_id, ['with_courses' => intval(!$this->with_courses)]) + $this->action_url('verlauf/' . $stgteil_id, ['with_courses' => intval(!$this->with_courses)]) ); Sidebar::get()->addWidget($widget, 'with_courses'); diff --git a/app/controllers/shared/contacts.php b/app/controllers/shared/contacts.php index 5ab74ebf8706c9d43ade406b7a95e96de9465c52..188ade4dc5c29d3f8f44ba7ba6cf7c58180b5d16 100644 --- a/app/controllers/shared/contacts.php +++ b/app/controllers/shared/contacts.php @@ -184,7 +184,7 @@ class Shared_ContactsController extends MVVController trim(Request::get('ansprechpartner_suche_parameter')), Request::get('ansprechpartner_suche'), $this->filter); } - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } /** @@ -244,7 +244,7 @@ class Shared_ContactsController extends MVVController // store filter $this->reset_page(); $this->sessSet('filter', $this->filter); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } public function reset_filter_action() @@ -266,13 +266,13 @@ class Shared_ContactsController extends MVVController if (MvvPerm::get('MvvContactRange')->havePermCreate()) { $widget->addLink( _('Neuen Ansprechpartner anlegen'), - $this->url_for('/new_ansprechpartner'), + $this->action_url('new_ansprechpartner'), Icon::create('add') )->asDialog('size=auto'); } $widget->addLink( _('Liste exportieren (CSV)'), - $this->url_for('/export_csv'), + $this->action_url('export_csv'), Icon::create('export') ); $sidebar->addWidget($widget); @@ -311,7 +311,7 @@ class Shared_ContactsController extends MVVController $search_term = $this->search_term ? $this->search_term : _('Ansprechpartner suchen'); $sidebar = Sidebar::get(); - $widget = new SearchWidget($this->url_for('/search')); + $widget = new SearchWidget($this->action_url('search')); $widget->addNeedle( _('Ansprechpartner suchen'), 'ansprechpartner_suche', @@ -361,8 +361,8 @@ class Shared_ContactsController extends MVVController 'status' => $this->findStatusByIds(), 'selected_status' => $this->filter['mvv_contacts.contact_status'], 'status_array' => ['intern' => ['name' => _('Intern')], 'extern' => ['name' =>_('Extern')]], - 'action' => $this->url_for('/set_filter'), - 'action_reset' => $this->url_for('/reset_filter') + 'action' => $this->action_url('set_filter'), + 'action_reset' => $this->action_url('reset_filter') ]); $sidebar = Sidebar::get(); @@ -510,7 +510,7 @@ class Shared_ContactsController extends MVVController $this->render_nothing(); } else { $this->response->add_header('X-Dialog-Close', 1); - $this->response->add_header('X-Location', $this->url_for('/index', ['contact_id' => $mvv_contact->id])); + $this->response->add_header('X-Location', $this->action_url('index', ['contact_id' => $mvv_contact->id])); } return; } @@ -564,7 +564,7 @@ class Shared_ContactsController extends MVVController $this->response->add_header('X-Dialog-Close', 1); } else { $this->response->add_header('X-Dialog-Close', 1); - $this->response->add_header('X-Location', $this->url_for('/index', ['contact_id' => $contact_range->contact_id])); + $this->response->add_header('X-Location', $this->indexURL(['contact_id' => $contact_range->contact_id])); } $this->render_nothing(); } @@ -666,7 +666,7 @@ class Shared_ContactsController extends MVVController $this->range_type = $range_type; if (!$this->range_type) { - $this->redirect($this->url_for('/select_range_type',$user_id)); + $this->redirect($this->action_url('select_range_type',$user_id)); return; } diff --git a/app/controllers/studiengaenge/informationen.php b/app/controllers/studiengaenge/informationen.php index 29b223aa80b97454af0b082b22e949ea12045db5..9889ab437520f903acaa5e81ad7ebbea77bf9760 100644 --- a/app/controllers/studiengaenge/informationen.php +++ b/app/controllers/studiengaenge/informationen.php @@ -105,13 +105,17 @@ class Studiengaenge_InformationenController extends MVVController )); } - private function createSidebar($view = 'subject' ) + private function createSidebar($view = 'subject') { $widget = new ViewsWidget(); - $widget->addLink(_('Gruppieren nach Fächern'), $this->indexURL()) - ->setActive($view === 'subject'); - $widget->addLink(_('Gruppieren nach Abschlüssen'), $this->degreeURL()) - ->setActive($view === 'degrees'); + $widget->addLink( + _('Gruppieren nach Fächern'), + $this->indexURL() + )->setActive($view === 'subject'); + $widget->addLink( + _('Gruppieren nach Abschlüssen'), + $this->degreeURL() + )->setActive($view === 'degrees'); Sidebar::Get()->addWidget($widget); } -} \ No newline at end of file +} diff --git a/app/controllers/studiengaenge/shared_version.php b/app/controllers/studiengaenge/shared_version.php index 53243284601ac2c8bb2114426d9cdf5e9b4873d8..8179027523621c211406f5a4323b657dcfad4729 100644 --- a/app/controllers/studiengaenge/shared_version.php +++ b/app/controllers/studiengaenge/shared_version.php @@ -82,11 +82,11 @@ abstract class SharedVersionController extends MVVController } else { PageLayout::postInfo(_('Es wurden keine Änderungen vorgenommen.')); } - $this->redirect($this->url_for('/abschnitte/' . $this->version->id)); + $this->redirect($this->action_url('abschnitte/' . $this->version->id)); return; } } - $this->cancel_url = $this->url_for('/index'); + $this->cancel_url = $this->action_url('index'); $this->setSidebar(); if (!$this->version->isNew()) { @@ -94,12 +94,12 @@ abstract class SharedVersionController extends MVVController $action_widget = $sidebar->getWidget('actions'); $action_widget->addLink( _('Download der Version'), - $this->url_for('/export/' . $this->version->getId()), + $this->action_url('export/' . $this->version->getId()), Icon::create('file-word') ); $action_widget->addLink( _('Version als PDF'), - $this->url_for('/export/' . $this->version->getId() . '/pdf'), + $this->action_url('export/' . $this->version->getId() . '/pdf'), Icon::create('file-pdf') ); $action_widget->addLink( @@ -110,7 +110,7 @@ abstract class SharedVersionController extends MVVController ); if ($this->version->stat === 'planung' && MvvPerm::haveFieldPermStat($this->version)) { $action_widget->addLink(_('Version genehmigen'), - $this->url_for('/approve/' . $this->version->getId()), + $this->action_url('approve/' . $this->version->getId()), Icon::create('accept'), ['data-dialog' => 'size=auto;buttons=false'] ); @@ -147,7 +147,7 @@ abstract class SharedVersionController extends MVVController ->setInputStyle('width: 240px'); } else { PageLayout::postError(_('Unbekannte Version')); - $this->relocate($this->url_for('/versionen')); + $this->relocate($this->action_url('versionen')); } PageLayout::setTitle(_('Versionenvergleich')); } @@ -159,12 +159,12 @@ abstract class SharedVersionController extends MVVController if (!$new_version || !$old_version) { PageLayout::postError(_('Unbekannte Version')); - $this->redirect($this->url_for('/diff_select/' . $new_version->id)); + $this->redirect($this->action_url('diff_select/' . $new_version->id)); } else { if (Request::isXhr()) { $this->response->add_header( 'X-Location', - $this->url_for('/diff/' . $new_version->id . '/' . $old_version->id)); + $this->action_url('diff/' . $new_version->id . '/' . $old_version->id)); } PageLayout::setTitle(_('Vergleichsansicht')); PageLayout::addStylesheet('print.css'); @@ -187,10 +187,10 @@ abstract class SharedVersionController extends MVVController if (!$version) { PageLayout::postError(_('Unbekannte Version')); - $this->response->add_header('X-Location', $this->url_for('/')); + $this->response->add_header('X-Location', $this->action_url('')); } else { if (Request::isXhr()) { - $this->response->add_header('X-Location', $this->url_for('/export/' . $version->id)); + $this->response->add_header('X-Location', $this->action_url('export/' . $version->id)); } PageLayout::addStylesheet('print.css'); @@ -230,7 +230,7 @@ abstract class SharedVersionController extends MVVController )); $version->delete(); } - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } public function abschnitt_action($abschnitt_id = null) @@ -261,7 +261,7 @@ abstract class SharedVersionController extends MVVController if (!$this->version) { PageLayout::postError(_('Unbekannte Version')); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } $perm = MvvPerm::get($this->version); @@ -295,11 +295,11 @@ abstract class SharedVersionController extends MVVController } else { PageLayout::postInfo(_('Es wurden keine Änderungen vorgenommen.')); } - $this->redirect($this->url_for('/details/' . $this->abschnitt->id)); + $this->redirect($this->action_url('details/' . $this->abschnitt->id)); return; } } - $this->cancel_url = $this->url_for('/details/' . $this->version->id); + $this->cancel_url = $this->action_url('details/' . $this->version->id); $this->render_template('studiengaenge/versionen/abschnitt'); } @@ -346,7 +346,7 @@ abstract class SharedVersionController extends MVVController if (!$this->version) { PageLayout::postError(_('Unbekannte Version')); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); return; } else { $this->version_id = $this->version->id; @@ -371,7 +371,7 @@ abstract class SharedVersionController extends MVVController $abschnitt = StgteilAbschnitt::find($abschnitt_id); if (!$abschnitt && is_null($version_id)) { PageLayout::postError(_('Unbekannter Studiengangteil-Abschnitt')); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); return; } else { $version_id = $abschnitt->version_id; @@ -392,9 +392,9 @@ abstract class SharedVersionController extends MVVController } } if ($abschnitt && !Request::submitted('delete')) { - $this->redirect($this->url_for('/details_abschnitt/' . $abschnitt->getId())); + $this->redirect($this->action_url('details_abschnitt/' . $abschnitt->getId())); } else { - $this->redirect($this->url_for('/abschnitte/' . $version_id)); + $this->redirect($this->action_url('abschnitte/' . $version_id)); } } @@ -413,7 +413,7 @@ abstract class SharedVersionController extends MVVController CSRFProtection::verifyUnsafeRequest(); if (!$modul) { PageLayout::postError(_('Unbekanntes Modul')); - $this->redirect($this->url_for('/details_abschnitt/' . $abschnitt->id)); + $this->redirect($this->action_url('details_abschnitt/' . $abschnitt->id)); return; } else if ($abschnitt) { if ($abschnitt->addModul($modul)) { @@ -429,21 +429,21 @@ abstract class SharedVersionController extends MVVController htmlReady($modul->getDisplayName()) )); } - $this->redirect($this->url_for('/details_abschnitt/' . $abschnitt->id)); + $this->redirect($this->action_url('details_abschnitt/' . $abschnitt->id)); } else { PageLayout::postError(_('Unbekannter Abschnitt')); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } } else { if ($abschnitt) { - $this->redirect($this->url_for('/details_abschnitt/' . $abschnitt->id)); + $this->redirect($this->action_url('details_abschnitt/' . $abschnitt->id)); } else { - $this->redirect($this->url_for('/abschnitte/' . $version->id)); + $this->redirect($this->action_url('abschnitte/' . $version->id)); } } } else { PageLayout::postError(_('Unbekannte Version')); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } } @@ -452,7 +452,7 @@ abstract class SharedVersionController extends MVVController $this->zuordnung = StgteilabschnittModul::find($abschnitt_modul_id); if ($this->zuordnung->isNew()) { PageLayout::postError(_('Unbekannte Zuordnung')); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); return; } else { PageLayout::setTitle(_('Modulzuordnung bearbeiten')); @@ -476,7 +476,7 @@ abstract class SharedVersionController extends MVVController } else { PageLayout::postInfo(_('Es wurden keine Änderungen vorgenommen.')); } - $this->redirect($this->url_for('/details_abschnitt/' . $this->zuordnung->abschnitt_id)); + $this->redirect($this->action_url('details_abschnitt/' . $this->zuordnung->abschnitt_id)); } } } @@ -519,10 +519,10 @@ abstract class SharedVersionController extends MVVController } } } - $this->redirect($this->url_for('/details_abschnitt/' . $abschnitt->id)); + $this->redirect($this->action_url('details_abschnitt/' . $abschnitt->id)); } else { PageLayout::postError(_('Unbekannter Studiengangteilabschnitt')); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } } @@ -587,7 +587,7 @@ abstract class SharedVersionController extends MVVController _('Es wurden keine Änderungen an der Zuordnung der Fachsemester vorgenommen.') ); } - $this->relocate($this->url_for('/details_abschnitt/' . $this->abschnitt_modul->abschnitt_id . '/' . $this->abschnitt_modul->modul_id)); + $this->relocate($this->action_url('details_abschnitt/' . $this->abschnitt_modul->abschnitt_id . '/' . $this->abschnitt_modul->modul_id)); return; } $this->render_template('studiengaenge/versionen/modulteil_semester', $this->layout); @@ -625,7 +625,7 @@ abstract class SharedVersionController extends MVVController )); } } - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } /** @@ -677,7 +677,7 @@ abstract class SharedVersionController extends MVVController $this->abschnitt = StgteilAbschnitt::find($abschnitt_id); if (!$this->abschnitt) { PageLayout::postError(_('Unbekannter Abschnitt')); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); return; } $this->abschnitt_id = $this->abschnitt->id; @@ -751,7 +751,7 @@ abstract class SharedVersionController extends MVVController _('Version "%s" genehmigt!'), htmlReady($this->version->getDisplayName()) )); - $this->redirect($this->url_for('/abschnitte/' . $version_id)); + $this->redirect($this->action_url('abschnitte/' . $version_id)); } } else { throw new Trails_Exception(403); diff --git a/app/controllers/studiengaenge/stgteilbezeichnungen.php b/app/controllers/studiengaenge/stgteilbezeichnungen.php index 1f7806ce6646173dafff66dc1c405edfe5af7f7b..3f738760f2a9dac9b5ce79476b58c77f6367c52a 100644 --- a/app/controllers/studiengaenge/stgteilbezeichnungen.php +++ b/app/controllers/studiengaenge/stgteilbezeichnungen.php @@ -161,7 +161,7 @@ class Studiengaenge_StgteilbezeichnungenController extends MVVController $widget = new ActionsWidget(); $widget->addLink( _('Neue Studiengangteil-Bezeichnung'), - $this->url_for('/stgteilbezeichnung'), + $this->action_url('stgteilbezeichnung'), Icon::create('add') )->asDialog(); $sidebar->addWidget($widget); diff --git a/app/controllers/studiengaenge/studiengaenge.php b/app/controllers/studiengaenge/studiengaenge.php index f04a62a77feaf6e93e6e4eb65108d1126aab66ee..717904472079b17f3fb7e46a5878db98a35e046f 100644 --- a/app/controllers/studiengaenge/studiengaenge.php +++ b/app/controllers/studiengaenge/studiengaenge.php @@ -203,9 +203,9 @@ class Studiengaenge_StudiengaengeController extends MVVController PageLayout::postInfo(_('Es wurden keine Änderungen vorgenommen.')); } if (Request::submitted('store_cancel')) { - $this->redirect($this->url_for('/index', $this->studiengang->id)); + $this->redirect($this->action_url('index', $this->studiengang->id)); } else { - $this->redirect($this->url_for('/studiengang', $this->studiengang->id)); + $this->redirect($this->action_url('studiengang', $this->studiengang->id)); } return; } @@ -231,9 +231,9 @@ class Studiengaenge_StudiengaengeController extends MVVController ->noSelectbox(); if ($this->parent_id) { - $this->cancel_url = $this->url_for('/index/' . $this->parent_id . '/' . $studiengang_id); + $this->cancel_url = $this->action_url('index/' . $this->parent_id . '/' . $studiengang_id); } else { - $this->cancel_url = $this->url_for('/index/' . $studiengang_id); + $this->cancel_url = $this->action_url('index/' . $studiengang_id); } $helpbar = Helpbar::get(); @@ -247,17 +247,17 @@ class Studiengaenge_StudiengaengeController extends MVVController $action_widget = $sidebar->getWidget('actions'); $action_widget->addLink( _('Download des Studienganges'), - $this->url_for('/export/' . $this->studiengang->getId()), + $this->action_url('export/' . $this->studiengang->getId()), Icon::create('file-word') ); $action_widget->addLink( _('Studiengang als PDF'), - $this->url_for('/export/' . $this->studiengang->getId(), ['pdf' => '1']), + $this->action_url('export/' . $this->studiengang->getId(), ['pdf' => '1']), Icon::create('file-pdf') ); if ($this->studiengang->stat === 'planung' && MvvPerm::haveFieldPermStat($this->studiengang)) { $action_widget->addLink(_('Studiengang genehmigen'), - $this->url_for('/approve/' . $this->studiengang->getId()), + $this->action_url('approve/' . $this->studiengang->getId()), Icon::create('accept'), ['data-dialog' => 'buttons=false'] ); @@ -300,7 +300,7 @@ class Studiengaenge_StudiengaengeController extends MVVController } } } - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } /** @@ -471,7 +471,7 @@ class Studiengaenge_StudiengaengeController extends MVVController } if (!$stgteil_bez) { PageLayout::postError(_('Bitte Studiengangteil-Bezeichnung auswählen!')); - $this->redirect($this->url_for('/details_studiengang/' . $studiengang->id . '/' . $stgteil->id)); + $this->redirect($this->action_url('details_studiengang/' . $studiengang->id . '/' . $stgteil->id)); return; } } else { @@ -510,17 +510,17 @@ class Studiengaenge_StudiengaengeController extends MVVController } } else { PageLayout::postError(_('Unbekannter Studiengangteil')); - $this->redirect($this->url_for('/details_studiengang/' . $studiengang->id)); + $this->redirect($this->action_url('details_studiengang/' . $studiengang->id)); return; } } $this->redirect( - $this->url_for('/details_studiengang/' . $studiengang->id . '/' . $stgteil_bez->id) + $this->action_url('details_studiengang/' . $studiengang->id . '/' . $stgteil_bez->id) ); return; } else { PageLayout::postError(_('Unbekannter Studiengang')); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } } @@ -557,11 +557,11 @@ class Studiengaenge_StudiengaengeController extends MVVController } } $this->redirect( - $this->url_for('/details_studiengang/' . $studiengang->id . '/' . $stgbez_id) + $this->action_url('details_studiengang/' . $studiengang->id . '/' . $stgbez_id) ); } else { PageLayout::postError(_('Unbekannter Studiengang')); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } } @@ -573,7 +573,7 @@ class Studiengaenge_StudiengaengeController extends MVVController ); $this->delete_stgteil($studiengang, $stg_stgteil); $this->redirect( - $this->url_for('/details_studiengang/' . $studiengang_id . '/' . $stg_stgteil->stgbez_id) + $this->action_url('details_studiengang/' . $studiengang_id . '/' . $stg_stgteil->stgbez_id) ); } @@ -613,7 +613,7 @@ class Studiengaenge_StudiengaengeController extends MVVController } } else { PageLayout::postError(_('Unbekannter Studiengang')); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } } @@ -635,7 +635,7 @@ class Studiengaenge_StudiengaengeController extends MVVController $this->filter ); } - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } /** @@ -989,7 +989,7 @@ class Studiengaenge_StudiengaengeController extends MVVController // store filter $this->sessSet('filter', $this->filter); $this->reset_page(); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } public function reset_filter_action() @@ -997,7 +997,7 @@ class Studiengaenge_StudiengaengeController extends MVVController $this->reset_page(); $this->sessSet('filter', []); - $this->redirect($this->url_for('/index')); + $this->redirect($this->indexURL()); } protected function setSidebar() @@ -1026,7 +1026,7 @@ class Studiengaenge_StudiengaengeController extends MVVController if (MvvPerm::havePermCreate('Studiengang')) { $widget->addLink( _('Neuen Studiengang anlegen'), - $this->url_for('/studiengang'), + $this->action_url('studiengang'), Icon::create('add') ); } @@ -1072,8 +1072,8 @@ class Studiengaenge_StudiengaengeController extends MVVController 'selected_institut' => $this->filter['mvv_studiengang.institut_id'], 'fachbereiche' => Fach::getAllAssignedInstitutes($studiengang_ids), 'selected_fachbereich' => $this->filter['mvv_fach_inst.institut_id'], - 'action' => $this->url_for('/set_filter'), - 'action_reset' => $this->url_for('/reset_filter') + 'action' => $this->action_url('set_filter'), + 'action_reset' => $this->action_url('reset_filter') ]); $sidebar = Sidebar::get(); $widget = new SidebarWidget(); @@ -1115,7 +1115,7 @@ class Studiengaenge_StudiengaengeController extends MVVController $this->search_term ? $this->search_term : _('Studiengang suchen'); $sidebar = Sidebar::get(); - $widget = new SearchWidget($this->url_for('/search')); + $widget = new SearchWidget($this->action_url('search')); $widget->addNeedle( _('Studiengang suchen'), 'studiengang_suche', @@ -1135,7 +1135,7 @@ class Studiengaenge_StudiengaengeController extends MVVController if (!$this->studiengang) { PageLayout::postError(_('Unbekannter Studiengang')); - $this->relocate($this->url_for('/index')); + $this->relocate($this->action_url('index')); return; } @@ -1152,7 +1152,7 @@ class Studiengaenge_StudiengaengeController extends MVVController _('Studiengang "%s" genehmigt!'), htmlReady($studiengang->getDisplayName()) )); - $this->relocate($this->url_for('/index')); + $this->relocate($this->action_url('index')); return; } } @@ -1166,10 +1166,10 @@ class Studiengaenge_StudiengaengeController extends MVVController if (!$studiengang) { PageLayout::postError(_('Unbekannter Studiengang')); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } else { if (Request::isXhr()) { - $this->relocate($this->url_for('/export/' . $studiengang->id)); + $this->relocate($this->action_url('export/' . $studiengang->id)); } $all_contacts = $studiengang->contact_assignments->orderBy('position') diff --git a/app/controllers/studiengaenge/studiengangteile.php b/app/controllers/studiengaenge/studiengangteile.php index f5d7b2de1fa554c24037044ab73c4a6cb7a39dc1..18d122ed09d1de9055191b813dbffe6b04fe5168 100644 --- a/app/controllers/studiengaenge/studiengangteile.php +++ b/app/controllers/studiengaenge/studiengangteile.php @@ -105,7 +105,7 @@ class Studiengaenge_StudiengangteileController extends SharedVersionController } else { PageLayout::postInfo(_('Es wurden keine Änderungen vorgenommen.')); } - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); return; } } @@ -118,7 +118,7 @@ class Studiengaenge_StudiengangteileController extends SharedVersionController ->fireJSFunctionOnSelect('STUDIP.MVV.Search.addSelected') ->noSelectbox(); - $this->cancel_url = $this->url_for('/index'); + $this->cancel_url = $this->action_url('index'); $this->setSidebar(); if (!$this->stgteil->isNew()) { @@ -169,7 +169,7 @@ class Studiengaenge_StudiengangteileController extends SharedVersionController $this->sessDelete(); } - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } public function details_action($stgteil_id) @@ -187,7 +187,7 @@ class Studiengaenge_StudiengangteileController extends SharedVersionController $this->set_status(404, 'Not Found'); $this->render_nothing(); } else { - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } } } @@ -214,7 +214,7 @@ class Studiengaenge_StudiengangteileController extends SharedVersionController trim(Request::get('stgteil_suche_parameter')), Request::option('stgteil_suche'), $filter); } - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } /** @@ -224,7 +224,7 @@ class Studiengaenge_StudiengangteileController extends SharedVersionController { $this->reset_search('StudiengangTeil'); $this->reset_page(); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } protected function setSidebar() @@ -250,7 +250,7 @@ class Studiengaenge_StudiengangteileController extends SharedVersionController if (MvvPerm::havePermCreate('StudiengangTeil')) { $widget->addLink( _('Neuen Studiengangteil anlegen'), - $this->url_for('/stgteil'), + $this->action_url('stgteil'), Icon::create('add') ); } @@ -285,7 +285,7 @@ class Studiengaenge_StudiengangteileController extends SharedVersionController $search_term = $this->search_term ? $this->search_term : _('Studiengangteil suchen'); $sidebar = Sidebar::get(); - $widget = new SearchWidget($this->url_for('/search')); + $widget = new SearchWidget($this->action_url('search')); $widget->addNeedle( _('Studiengangteil suchen'), 'stgteil_suche', diff --git a/app/controllers/studiengaenge/versionen.php b/app/controllers/studiengaenge/versionen.php index d7fcd705d06b51d12ab57308b0dc7954c794d9a0..6868ee5cfc59c4d8eed8da771be23df3b43627ea 100644 --- a/app/controllers/studiengaenge/versionen.php +++ b/app/controllers/studiengaenge/versionen.php @@ -47,7 +47,7 @@ class Studiengaenge_VersionenController extends SharedVersionController case 'stgteile_fach' : $this->chooser_filter['stgteile'] = Request::option('id', $this->chooser_filter['stgteile']); - $this->redirect($this->url_for('/index/' . $this->chooser_filter['stgteile'])); + $this->redirect($this->action_url('index/' . $this->chooser_filter['stgteile'])); return; default : throw new Trails_Exception(400); @@ -260,7 +260,7 @@ class Studiengaenge_VersionenController extends SharedVersionController $this->set_status(404, 'Not Found'); $this->render_nothing(); } else { - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } } } @@ -272,7 +272,7 @@ class Studiengaenge_VersionenController extends SharedVersionController $widget = new ActionsWidget(); $widget->addLink( _('Auswahl zurücksetzen'), - $this->url_for('/reset'), + $this->action_url('reset'), Icon::create('refresh') ); if ($this->chooser_filter['stgteil']) { @@ -280,7 +280,7 @@ class Studiengaenge_VersionenController extends SharedVersionController if ($stgteil && MvvPerm::haveFieldPermVersionen($stgteil, MvvPerm::PERM_CREATE)) { $widget->addLink( _('Neue Version anlegen'), - $this->url_for('/version', $this->chooser_filter['stgteil']), + $this->action_url('version', $this->chooser_filter['stgteil']), Icon::create('add') ); } @@ -334,8 +334,8 @@ class Studiengaenge_VersionenController extends SharedVersionController 'status' => $status_results, 'selected_status' => $this->filter['mvv_stgteilversion.stat'], 'status_array' => $GLOBALS['MVV_STGTEILVERSION']['STATUS']['values'], - 'action' => $this->url_for('/set_filter'), - 'action_reset' => $this->url_for('/reset_filter') + 'action' => $this->action_url('set_filter'), + 'action_reset' => $this->action_url('reset_filter') ] ); @@ -371,7 +371,7 @@ class Studiengaenge_VersionenController extends SharedVersionController // store filter $this->sessSet('filter', $this->filter); $this->reset_page(); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } public function reset_filter_action() @@ -382,7 +382,7 @@ class Studiengaenge_VersionenController extends SharedVersionController $this->filter['start_sem.beginn'] = 2147483647; $this->filter['end_sem.ende'] = 1; $this->sessSet('filter', $this->filter); - $this->redirect($this->url_for('/index')); + $this->redirect($this->action_url('index')); } } diff --git a/app/views/admin/overlapping/selection.php b/app/views/admin/overlapping/selection.php index 2fbdce187e8060f32180961d3b28072f4b78b58b..e9707327f02a60b9ea2f0d54555d998c6585b10c 100644 --- a/app/views/admin/overlapping/selection.php +++ b/app/views/admin/overlapping/selection.php @@ -64,6 +64,6 @@ </fieldset> <footer> <?= \Studip\Button::createAccept(_('Vergleichen'), 'compare') ?> - <?= \Studip\Button::createCancel(_('Zurücksetzen'), 'index', ['formaction' => $controller->url_for('/reset')]) ?> + <?= \Studip\Button::createCancel(_('Zurücksetzen'), 'index', ['formaction' => $controller->action_url('reset')]) ?> </footer> </form> diff --git a/app/views/admin/role/assign_role.php b/app/views/admin/role/assign_role.php index cf4b05d99267aba03ba29d96adf29e61b0617c32..031e95acda84a6029eeeda6c73fa2e6bb08aa92d 100644 --- a/app/views/admin/role/assign_role.php +++ b/app/views/admin/role/assign_role.php @@ -112,7 +112,7 @@ use Studip\Button, Studip\LinkButton; <?= htmlReady(implode(",\n", $assignedroles_institutes[$assignedrole->getRoleid()]))?> </td> <td class="actions"> - <a href="<?= $controller->link_for('/assign_role_institutes/' . $assignedrole->getRoleid() . '/' . $currentuser->id) ?>" data-dialog="size=auto;reload-on-close"> + <a href="<?= $controller->action_link('assign_role_institutes/' . $assignedrole->getRoleid() . '/' . $currentuser->id) ?>" data-dialog="size=auto;reload-on-close"> <?= Icon::create('edit', 'clickable')->asImg(['title' => _('Einrichtungszuordnung bearbeiten')]) ?> </a> </td> diff --git a/app/views/admin/role/assign_role_institutes.php b/app/views/admin/role/assign_role_institutes.php index b3be22df74d65b85977d5ce717c2d4bd92f4782d..997a3b8e1b66f0acb397ffc9ed36b5414d1949a0 100644 --- a/app/views/admin/role/assign_role_institutes.php +++ b/app/views/admin/role/assign_role_institutes.php @@ -2,7 +2,7 @@ <?= $pm ?> <? endforeach; ?> -<form action="<?= $controller->link_for('/assign_role_institutes/' . $role->getRoleid() . '/' . $user->id) ?>" method="post" class="default" data-dialog="size=auto;reload-on-close"> +<form action="<?= $controller->action_link('assign_role_institutes/' . $role->getRoleid() . '/' . $user->id) ?>" method="post" class="default" data-dialog="size=auto;reload-on-close"> <fieldset> <legend> <?= _('Einrichtungszuordnung anpassen') ?> @@ -21,7 +21,7 @@ <? foreach ($institutes as $institute): ?> <li> <?= htmlReady($institute->name) ?> - <a href="<?= $controller->link_for("/assign_role_institutes/{$role->getRoleid()}/{$user->id}", ['remove_institute' => $institute->id]) ?>" data-dialog="size=auto;reload-on-close"> + <a href="<?= $controller->action_link("assign_role_institutes/{$role->getRoleid()}/{$user->id}", ['remove_institute' => $institute->id]) ?>" data-dialog="size=auto;reload-on-close"> <?= Icon::create('trash') ?> </a> </li> @@ -31,7 +31,7 @@ <footer data-dialog-button> <?= Studip\Button::create(_('Einrichtung hinzufügen'), "add_institute", ["rel" => "lightbox"]) ?> - <?= Studip\LinkButton::createCancel(_('Schließen'), $controller->url_for('/assign_role/' . $user->id), [ + <?= Studip\LinkButton::createCancel(_('Schließen'), $controller->action_url('assign_role/' . $user->id), [ 'data-dialog-button' => '', 'data-dialog' => 'size=auto;reload-on-close' ]) ?> diff --git a/app/views/admin/smileys/index.php b/app/views/admin/smileys/index.php index e5e3012ad323400240aa7eff93523d2d085ca7e1..2391ddda6115af07e6ee2c06cdbd7c4d3d3c60ed 100644 --- a/app/views/admin/smileys/index.php +++ b/app/views/admin/smileys/index.php @@ -1,6 +1,6 @@ <? use Studip\Button; ?> -<form action="<?= $controller->url_for('/admin/smileys/delete/bulk', $view) ?>" method="post"> +<form action="<?= $controller->action_link('admin/smileys/delete/bulk', $view) ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <table class="default"> diff --git a/app/views/course/admission/index.php b/app/views/course/admission/index.php index 9a91037433ba26291736a4a47825dd8b90c41454..3584c6dcb38f69d736f5bb277f10bc92802a70c3 100644 --- a/app/views/course/admission/index.php +++ b/app/views/course/admission/index.php @@ -1,4 +1,4 @@ -<form class="default" action="<?= $controller->link_for('/change_course_set') ?>" method="post"> +<form class="default" action="<?= $controller->action_link('change_course_set') ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <fieldset> <legend><?= _('Anmelderegeln') ?></legend> @@ -17,7 +17,7 @@ <?= Studip\Button::create(_("Zuordnung aufheben"), 'change_course_set_unassign', ['data-dialog' => '']) ?> <? endif ?> <? if ($current_courseset->isUserAllowedToEdit($user_id)) : ?> - <?= Studip\LinkButton::create(_("Anmeldeset bearbeiten"), $controller->url_for('/edit_courseset/' . $current_courseset->getId()), ['data-dialog' => '']); ?> + <?= Studip\LinkButton::create(_("Anmeldeset bearbeiten"), $controller->action_url('edit_courseset/' . $current_courseset->getId()), ['data-dialog' => '']); ?> <? endif ?> <? endif ?> </div> @@ -25,20 +25,20 @@ <? else : ?> <div> <? if (!$is_locked['passwort'] && isset($activated_admission_rules['PasswordAdmission'])) : ?> - <?= Studip\LinkButton::create(_("Anmeldung mit Passwort"), $controller->url_for('/instant_course_set', ['type' => 'PasswordAdmission']), ['data-dialog' => '']) ?> + <?= Studip\LinkButton::create(_("Anmeldung mit Passwort"), $controller->action_url('instant_course_set', ['type' => 'PasswordAdmission']), ['data-dialog' => '']) ?> <? endif ?> <? if (!$is_locked['admission_type']) : ?> <? if (isset($activated_admission_rules['LockedAdmission'])) : ?> - <?= Studip\LinkButton::create(_("Anmeldung gesperrt"), $controller->url_for('/instant_course_set', ['type' => 'LockedAdmission']), ['data-dialog' => '']) ?> + <?= Studip\LinkButton::create(_("Anmeldung gesperrt"), $controller->action_url('instant_course_set', ['type' => 'LockedAdmission']), ['data-dialog' => '']) ?> <? endif ?> <? if (isset($activated_admission_rules['TimedAdmission'])) : ?> - <?= Studip\LinkButton::create(_("Zeitgesteuerte Anmeldung"), $controller->url_for('/instant_course_set', ['type' => 'TimedAdmission']), ['data-dialog' => '']) ?> + <?= Studip\LinkButton::create(_("Zeitgesteuerte Anmeldung"), $controller->action_url('instant_course_set', ['type' => 'TimedAdmission']), ['data-dialog' => '']) ?> <? endif ?> <br> <? if (isset($activated_admission_rules['ParticipantRestrictedAdmission'])) : ?> - <?= Studip\LinkButton::create(_("Teilnahmebeschränkte Anmeldung"), $controller->url_for('/instant_course_set', ['type' => 'ParticipantRestrictedAdmission']), ['data-dialog' => '']) ?> + <?= Studip\LinkButton::create(_("Teilnahmebeschränkte Anmeldung"), $controller->action_url('instant_course_set', ['type' => 'ParticipantRestrictedAdmission']), ['data-dialog' => '']) ?> <? if (isset($activated_admission_rules['TimedAdmission'])) : ?> - <?= Studip\LinkButton::create(_("Zeitgesteuerte und Teilnahmebeschränkte Anmeldung"), $controller->url_for('/instant_course_set', ['type' => 'ParticipantRestrictedAdmission_TimedAdmission']), ['data-dialog' => '']) ?> + <?= Studip\LinkButton::create(_("Zeitgesteuerte und Teilnahmebeschränkte Anmeldung"), $controller->action_url('instant_course_set', ['type' => 'ParticipantRestrictedAdmission_TimedAdmission']), ['data-dialog' => '']) ?> <? endif ?> <? endif ?> <? endif ?> @@ -51,7 +51,7 @@ </summary> <select name="course_set_assign" style="display: inline-block;" - onChange="$('#course_set_assign_explain').load('<?= $controller->link_for('/explain_course_set') ?>&set_id=' + $(this).val(), function () { $(this).show(); });"> + onChange="$('#course_set_assign_explain').load('<?= $controller->action_link('explain_course_set') ?>&set_id=' + $(this).val(), function () { $(this).show(); });"> <option></option> <? $my_own_sets = $available_coursesets->findBy('my_own', true); ?> <? $other_sets = $available_coursesets->findBy('my_own', false); ?> @@ -85,7 +85,7 @@ <br> <? if ($current_courseset && $current_courseset->isSeatDistributionEnabled()) : ?> - <form class="default" action="<?= $controller->link_for('/change_admission_turnout') ?>" method="post"> + <form class="default" action="<?= $controller->action_link('change_admission_turnout') ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <fieldset> <legend><?= _('Beschränkte Teilnehmendenanzahl') ?></legend> @@ -135,7 +135,7 @@ <br> <? endif ?> -<form class="default" action="<?= $controller->link_for('/change_admission_prelim') ?>" method="post"> +<form class="default" action="<?= $controller->action_link('change_admission_prelim') ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <fieldset> <legend><?= _('Anmeldemodus') ?></legend> @@ -175,7 +175,7 @@ <br> <? if (Config::get()->ENABLE_FREE_ACCESS && !$current_courseset) : ?> - <form class="default" action="<?= $controller->link_for('/change_free_access') ?>" method="post"> + <form class="default" action="<?= $controller->action_link('change_free_access') ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <fieldset> <legend><?= _('Zugriff für externe Nutzer') ?></legend> @@ -209,7 +209,7 @@ <? endif ?> <? if (count($all_domains)) : ?> - <form class="default" action="<?= $controller->link_for('/change_domains') ?>" method="post"> + <form class="default" action="<?= $controller->action_link('change_domains') ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <fieldset> <legend><?= _('Zugelassenene Nutzerdomänen') ?></legend> diff --git a/app/views/course/enrolment/apply.php b/app/views/course/enrolment/apply.php index 9951808486f8ca27dff9059b6daff42c6fd06cc2..54a1ff35f7b6d93a7db8df1c7cbe4106bcbc7fa5 100644 --- a/app/views/course/enrolment/apply.php +++ b/app/views/course/enrolment/apply.php @@ -9,7 +9,7 @@ <? endforeach; ?> <? if ($admission_form): ?> - <form name="apply_admission" action="<?= $controller->link_for("/apply/{$course_id}") ?>" method="post"> + <form name="apply_admission" action="<?= $controller->action_link("apply/{$course_id}") ?>" method="post"> <?= $admission_form ?> <div data-dialog-button> <?= Studip\Button::createAccept(_('OK'), 'apply', ['data-dialog' => 'size=big']) ?> @@ -18,7 +18,7 @@ <?= CSRFProtection::tokenTag() ?> </form> <? elseif ($priocourses): ?> - <form name="claim_admission" action="<?= $controller->link_for("/claim/{$course_id}") ?>" method="post" class="default"> + <form name="claim_admission" action="<?= $controller->action_link("claim/{$course_id}") ?>" method="post" class="default"> <? if (is_array($priocourses)): ?> <?= $this->render_partial('course/enrolment/_priocourses.php') ?> diff --git a/app/views/course/plus/edittool.php b/app/views/course/plus/edittool.php index 15635d3d1d19dfa895acfd90cb46291399ba8d7c..124d2b45e12a1026ae5ce4b170ddaca4df51e841 100644 --- a/app/views/course/plus/edittool.php +++ b/app/views/course/plus/edittool.php @@ -1,4 +1,4 @@ -<form class="default" action="<?=$controller->link_for('/edittool/plugin_' . $tool->plugin_id)?>" method="post"> +<form class="default" action="<?=$controller->action_link('edittool/plugin_' . $tool->plugin_id)?>" method="post"> <?= CSRFProtection::tokenTag() ?> <fieldset> <label for="displayname"> diff --git a/app/views/course/plus/index.php b/app/views/course/plus/index.php index b50bd535522cdd6153b3ad617008d61b6bbeb855..f3a348fcc5aba476768fe25e7637120390f0ce42 100644 --- a/app/views/course/plus/index.php +++ b/app/views/course/plus/index.php @@ -113,14 +113,14 @@ use Studip\Button; <? $actionMenu = ActionMenu::get()->setContext($pluginname); $actionMenu->addLink( - $controller->url_for('/edittool/' . $key), + $controller->action_url('edittool/' . $key), _('Optionen bearbeiten'), Icon::create('edit'), ['data-dialog' => 'size=auto'] ); if (method_exists($plugin, 'deleteContent')) { $actionMenu->addLink( - $controller->url_for('/index', ['deleteContent' => 1, 'name' => $key]), + $controller->action_url('index', ['deleteContent' => 1, 'name' => $key]), _('Inhalte löschen'), Icon::create('trash') ); diff --git a/app/views/course/plus/sorttools.php b/app/views/course/plus/sorttools.php index 8a20aea1c9e2fa43f5b184337fdeb8c6f7594ac6..9d2044b2210b222432c5e2bcfc98db65907b1d6c 100644 --- a/app/views/course/plus/sorttools.php +++ b/app/views/course/plus/sorttools.php @@ -1,4 +1,4 @@ -<section class="contentbox course-statusgroups" data-sortable="<?=$controller->url_for('/sorttools', ['order' => 1]) ?>"> +<section class="contentbox course-statusgroups" data-sortable="<?=$controller->action_link('sorttools', ['order' => 1]) ?>"> <? if ($sem->tools): ?> <? foreach ($sem->tools as $tool): ?> <?php if (!$tool->getStudipModule()) continue; ?> diff --git a/app/views/fachabschluss/abschluesse/abschluss.php b/app/views/fachabschluss/abschluesse/abschluss.php index c0efb7ddecac382173271c1598950c0108569f86..df1a90a9241e6fe20d8dbbc9d63d17b97775b868 100644 --- a/app/views/fachabschluss/abschluesse/abschluss.php +++ b/app/views/fachabschluss/abschluesse/abschluss.php @@ -1,6 +1,6 @@ <? use Studip\Button, Studip\LinkButton; ?> <? $perm = MvvPerm::get($abschluss) ?> -<form class="default" action="<?= $controller->url_for('/abschluss/' . $abschluss->getId()) ?>" method="post"> +<form class="default" action="<?= $controller->action_link('abschluss/' . $abschluss->getId()) ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <fieldset> <legend><?= _('Grunddaten') ?></legend> @@ -42,6 +42,6 @@ <?= Button::createAccept(_('Übernehmen'), 'store', ['title' => _('Änderungen übernehmen')]) ?> <? endif; ?> <? endif; ?> - <?= LinkButton::createCancel(_('Abbrechen'), $controller->url_for('/index'), ['title' => _('zurück zur Übersicht')]) ?> + <?= LinkButton::createCancel(_('Abbrechen'), $controller->action_url('index'), ['title' => _('zurück zur Übersicht')]) ?> </footer> </form> diff --git a/app/views/fachabschluss/abschluesse/details.php b/app/views/fachabschluss/abschluesse/details.php index 0628d1b3e038af9dfeb148df1b3856d3581de474..f9be5fa7c5f6d1db062a4ce08f693c353a772864 100644 --- a/app/views/fachabschluss/abschluesse/details.php +++ b/app/views/fachabschluss/abschluesse/details.php @@ -13,7 +13,7 @@ </td> <td class="actions"> <? if (MvvPerm::havePermWrite($fach)) : ?> - <a data-dialog href="<?= $controller->url_for('/fach/' . $fach->id) ?>"> + <a data-dialog href="<?= $controller->action_link('fach/' . $fach->id) ?>"> <?= Icon::create('edit', 'clickable', ['title' => _('Fach bearbeiten')])->asImg(); ?> </a> <? endif; ?> diff --git a/app/views/fachabschluss/abschluesse/index.php b/app/views/fachabschluss/abschluesse/index.php index e541257f7d4598748b331dcd2b5b89de42aea48b..60fac2a59132d09feabd4763f4756d9c9a093b9c 100644 --- a/app/views/fachabschluss/abschluesse/index.php +++ b/app/views/fachabschluss/abschluesse/index.php @@ -18,7 +18,7 @@ <tr class="header-row"> <td class="toggle-indicator"> <? if ($abschluss->count_faecher) : ?> - <a class="mvv-load-in-new-row" href="<?= $controller->url_for('/details/' . $abschluss->id) ?>"><?= htmlReady($abschluss->name) ?> </a> + <a class="mvv-load-in-new-row" href="<?= $controller->action_link('details/' . $abschluss->id) ?>"><?= htmlReady($abschluss->name) ?> </a> <? else: ?> <?= htmlReady($abschluss->name) ?> <? endif; ?> @@ -27,7 +27,7 @@ <td style="text-align: center;" class="dont-hide"><?= $abschluss->count_faecher ?></td> <td class="dont-hide actions" style="white-space: nowrap;"> <? if (MvvPerm::havePermWrite($abschluss)) : ?> - <a href="<?=$controller->url_for('/abschluss/' . $abschluss->id)?>"> + <a href="<?=$controller->action_link('abschluss/' . $abschluss->id)?>"> <?= Icon::create('edit', Icon::ROLE_CLICKABLE, tooltip2(_('Abschluss bearbeiten')))->asImg(); ?> </a> <? endif; ?> @@ -35,7 +35,7 @@ <? if (!$abschluss->count_faecher) : ?> <?= Icon::create('trash', Icon::ROLE_CLICKABLE, tooltip2(_('Abschluss löschen')))->asInput( [ - 'formaction' => $controller->url_for('/delete/' . $abschluss->id), + 'formaction' => $controller->action_url('delete/' . $abschluss->id), 'data-confirm' => sprintf( _('Wollen Sie wirklich den Abschluss "%s" löschen?'), htmlReady($abschluss->name) @@ -63,7 +63,7 @@ $pagination->set_attribute('perPage', MVVController::$items_per_page); $pagination->set_attribute('num_postings', $count); $pagination->set_attribute('page', $page); - $page_link = reset(explode('?', $controller->url_for('/index'))) . '?page_abschluesse=%s'; + $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_abschluesse=%s'; $pagination->set_attribute('pagelink', $page_link); echo $pagination->render('shared/pagechooser'); ?> diff --git a/app/views/fachabschluss/faecher/details.php b/app/views/fachabschluss/faecher/details.php index c9201a5f8f8035acd9177b9575b949ce7ac6fdd4..ad773cdd538b3f90b920f837c0e7c948dc3f296c 100644 --- a/app/views/fachabschluss/faecher/details.php +++ b/app/views/fachabschluss/faecher/details.php @@ -12,7 +12,7 @@ <td><?= htmlReady($abschluss->category->getDisplayName()) ?></td> <td class="actions"> <? if (MvvPerm::havePermWrite($abschluss)) : ?> - <a data-dialog href="<?= $controller->url_for('/abschluss/' . $abschluss->id) ?>"> + <a data-dialog href="<?= $controller->action_link('abschluss/' . $abschluss->id) ?>"> <?= Icon::create('edit', Icon::ROLE_CLICKABLE, ['title' => _('Abschluss bearbeiten')])->asImg(); ?> </a> <? endif; ?> diff --git a/app/views/fachabschluss/faecher/details_fachbereich.php b/app/views/fachabschluss/faecher/details_fachbereich.php index a13def0ca651a5fc2508d852912bdb3c6c826cc4..6ca7dc27e922355087f67929deedda520e435b71 100644 --- a/app/views/fachabschluss/faecher/details_fachbereich.php +++ b/app/views/fachabschluss/faecher/details_fachbereich.php @@ -11,7 +11,7 @@ </td> <td class="actions"> <? if (MvvPerm::havePermWrite($fach)) : ?> - <a href="<?= $controller->url_for('/fach/' . $fach->id) ?>"> + <a href="<?= $controller->action_link('fach/' . $fach->id) ?>"> <?= Icon::create('edit', Icon::ROLE_CLICKABLE, ['title' => _('Fach bearbeiten')])->asImg(); ?> </a> <? endif; ?> diff --git a/app/views/fachabschluss/faecher/fach.php b/app/views/fachabschluss/faecher/fach.php index f05b9d5e93800d8505b9d666491fd75db51ae784..99e744674418902fd2a9241c0ed76aa72b7e3937 100644 --- a/app/views/fachabschluss/faecher/fach.php +++ b/app/views/fachabschluss/faecher/fach.php @@ -2,7 +2,7 @@ <?= $controller->jsUrl() ?> <? $perm = MvvPerm::get($fach) ?> -<form class="default" action="<?= $controller->url_for('/fach/', $fach->id) ?>" method="post"> +<form class="default" action="<?= $controller->action_link('fach/', $fach->id) ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <fieldset class="collapsable"> <legend> @@ -105,6 +105,6 @@ <?= Button::createAccept(_('Übernehmen'), 'store', ['title' => _('Änderungen übernehmen')]) ?> <? endif; ?> <? endif; ?> - <?= LinkButton::createCancel(_('Abbrechen'), $controller->url_for('/index'), ['title' => _('zurück zur Übersicht')]) ?> + <?= LinkButton::createCancel(_('Abbrechen'), $controller->action_url('index'), ['title' => _('zurück zur Übersicht')]) ?> </footer> </form> diff --git a/app/views/fachabschluss/faecher/fachbereiche.php b/app/views/fachabschluss/faecher/fachbereiche.php index dce4d9845b423d15121fb918955c2fc037dc863d..5a4f6f1027131c05c63a2049eec160ef555ead17 100644 --- a/app/views/fachabschluss/faecher/fachbereiche.php +++ b/app/views/fachabschluss/faecher/fachbereiche.php @@ -14,7 +14,7 @@ <tr class="header-row"> <td class="toggle-indicator"> <a class="mvv-load-in-new-row" - href="<?= $controller->url_for('/details_fachbereich/' . $fachbereich['institut_id']) ?>"><?= htmlReady($fachbereich['name']) ?></a> + href="<?= $controller->action_link('details_fachbereich/' . $fachbereich['institut_id']) ?>"><?= htmlReady($fachbereich['name']) ?></a> </td> <td style="text-align: center;" class="dont-hide"><?= htmlReady($fachbereich['faecher']) ?> </td> </tr> diff --git a/app/views/fachabschluss/faecher/index.php b/app/views/fachabschluss/faecher/index.php index 6710ec48fbc97589dc6f50fe304dae4d2ee189a8..80cdfe3de4a7d5172ef541b464451840ae5e7c3e 100644 --- a/app/views/fachabschluss/faecher/index.php +++ b/app/views/fachabschluss/faecher/index.php @@ -18,7 +18,7 @@ <td class="toggle-indicator"> <? if ($fach->count_abschluesse) : ?> <a class="mvv-load-in-new-row" - href="<?= $controller->url_for('/details/' . $fach->id) ?>"><?= htmlReady($fach->name) ?></a> + href="<?= $controller->action_link('details/' . $fach->id) ?>"><?= htmlReady($fach->name) ?></a> <? else: ?> <?= htmlReady($fach->name) ?> <? endif; ?> @@ -26,7 +26,7 @@ <td class="dont-hide" style="text-align: center;"><?= $fach->count_abschluesse ?> </td> <td class="dont-hide actions" style="white-space: nowrap;"> <? if (MvvPerm::havePermWrite($fach)) : ?> - <a href="<?= $controller->url_for('/fach/' . $fach->id) ?>"> + <a href="<?= $controller->action_link('fach/' . $fach->id) ?>"> <?= Icon::create('edit', Icon::ROLE_CLICKABLE, ['title' => _('Fach bearbeiten')])->asImg(); ?> </a> <? endif; ?> @@ -34,7 +34,7 @@ <? if ($fach->count_abschluesse == 0): ?> <?= Icon::create('trash', Icon::ROLE_CLICKABLE, tooltip2(_('Fach löschen')))->asInput( [ - 'formaction' => $controller->url_for('/delete/' . $fach->id), + 'formaction' => $controller->action_url('delete/' . $fach->id), 'data-confirm' => sprintf(_('Wollen Sie wirklich das Fach "%s" löschen?'), htmlReady($fach->name)), 'name' => 'delete' ]); ?> @@ -61,7 +61,7 @@ $pagination->set_attribute('perPage', MVVController::$items_per_page); $pagination->set_attribute('num_postings', $count); $pagination->set_attribute('page', $page); - $page_link = reset(explode('?', $controller->url_for('/index'))) . '?page_faecher=%s'; + $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_faecher=%s'; $pagination->set_attribute('pagelink', $page_link); echo $pagination->render('shared/pagechooser'); ?> diff --git a/app/views/fachabschluss/kategorien/index.php b/app/views/fachabschluss/kategorien/index.php index effd06695f3812007d02292e7a9b7bbeac4e0e23..5eb1ada2072faca2e16a5b5afb5a12033bd708bd 100644 --- a/app/views/fachabschluss/kategorien/index.php +++ b/app/views/fachabschluss/kategorien/index.php @@ -28,7 +28,7 @@ <?= htmlReady($kategorie->name) ?> <? else: ?> <a class="mvv-load-in-new-row" - href="<?= $controller->url_for('/details/' . $kategorie->id) ?>"><?= htmlReady($kategorie->name) ?> </a> + href="<?= $controller->action_link('details/' . $kategorie->id) ?>"><?= htmlReady($kategorie->name) ?> </a> <? endif; ?> </td> <td class="dont-hide" style="text-align: center;"> @@ -39,7 +39,7 @@ </td> <td style="white-space: nowrap;" class="dont-hide actions"> <? if ($perm->havePermWrite()) : ?> - <a href="<?= $controller->url_for('/kategorie/' . $kategorie->id) ?>"> + <a href="<?= $controller->action_link('kategorie/' . $kategorie->id) ?>"> <?= Icon::create('edit', Icon::ROLE_CLICKABLE, tooltip2(_('Abschluss-Kategorie bearbeiten')))->asImg(); ?> </a> <? endif; ?> @@ -47,7 +47,7 @@ <? if (count($abschluesse) < 1) : ?> <?= Icon::create('trash', Icon::ROLE_CLICKABLE, tooltip2(_('Abschluss-Kategorie löschen')))->asInput( [ - 'formaction' => $controller->url_for('/delete', $kategorie->id), + 'formaction' => $controller->action_url('delete', $kategorie->id), 'data-confirm' => sprintf(_('Wollen Sie wirklich die Abschluss-Kategorie "%s" löschen?'), htmlReady($kategorie->name)), 'name' => 'delete' ]); ?> diff --git a/app/views/file/add_url.php b/app/views/file/add_url.php index 620a1a5bd956fb53c3fce1a3e88fca98497155bb..1b7196b81f82e58b383d9e75d911ce14d33f6549 100644 --- a/app/views/file/add_url.php +++ b/app/views/file/add_url.php @@ -1,4 +1,4 @@ -<form action="<?= $controller->link_for('/add_url/' . $top_folder->id) ?>" method="post" data-dialog class="default"> +<form action="<?= $controller->action_link('add_url/' . $top_folder->id) ?>" method="post" data-dialog class="default"> <?= CSRFProtection::tokenTag() ?> <fieldset> <legend><?= _('Datei aus dem Internet verlinken') ?></legend> @@ -36,7 +36,7 @@ <?= Studip\Button::createAccept(_('Speichern'), 'store') ?> <?= Studip\LinkButton::createCancel( _('Zurück'), - $controller->url_for('/add_files_window/' . Request::option('to_folder_id'), $options), + $controller->action_url('add_files_window/' . Request::option('to_folder_id'), $options), ['data-dialog' => ''] ) ?> </footer> diff --git a/app/views/file/choose_destination.php b/app/views/file/choose_destination.php index ae3f808f53e2c471d86190abab2742374ebc9ead..21ecb1387513f055a6b9e260cc835f7c13e2d3f1 100644 --- a/app/views/file/choose_destination.php +++ b/app/views/file/choose_destination.php @@ -29,36 +29,36 @@ $options = array_filter([ <div> <? if (isset($parent_folder) && ($parent_folder->isWritable($GLOBALS['user']->id) || count($parent_folder->getSubfolders()))): ?> <div class="clickable"> - <?= Icon::create('folder-parent', Icon::ROLE_CLICKABLE)->asInput(50, ['formaction' => $controller->url_for('/choose_folder/' . $parent_folder->getId()), 'to_plugin' => $options['from_plugin']]) ?> + <?= Icon::create('folder-parent', Icon::ROLE_CLICKABLE)->asInput(50, ['formaction' => $controller->action_url('choose_folder/' . $parent_folder->getId()), 'to_plugin' => $options['from_plugin']]) ?> <button class="undecorated" - formaction="<?= $controller->link_for('/choose_folder/' . $parent_folder->getId()) ?>" <? if ($options['from_plugin']): ?> name="to_plugin" value="<?= htmlReady($options['from_plugin']) ?>"<? endif; ?>> + formaction="<?= $controller->action_link('choose_folder/' . $parent_folder->getId()) ?>" <? if ($options['from_plugin']): ?> name="to_plugin" value="<?= htmlReady($options['from_plugin']) ?>"<? endif; ?>> <?= _('Aktueller Ordner') ?> </button> </div> <? endif ?> <div class="clickable"> - <?= Icon::create('files')->asInput(50, ['formaction' => $controller->url_for('/choose_folder/' . Folder::findTopFolder($GLOBALS['user']->id)->getId())]) ?> + <?= Icon::create('files')->asInput(50, ['formaction' => $controller->action_url('choose_folder/' . Folder::findTopFolder($GLOBALS['user']->id)->getId())]) ?> <button class="undecorated" - formaction="<?= $controller->link_for('/choose_folder/' . Folder::findTopFolder($GLOBALS['user']->id)->getId()) ?>"> + formaction="<?= $controller->action_link('choose_folder/' . Folder::findTopFolder($GLOBALS['user']->id)->getId()) ?>"> <?= _('Persönlicher Dateibereich') ?> </button> </div> <div class="clickable"> - <?= Icon::create('seminar')->asinput(50, ['formaction' => $controller->url_for('/choose_folder_from_course')]) ?> + <?= Icon::create('seminar')->asinput(50, ['formaction' => $controller->action_url('choose_folder_from_course')]) ?> <button class="undecorated" - formaction="<?= $controller->link_for('/choose_folder_from_course') ?>"> + formaction="<?= $controller->action_link('choose_folder_from_course') ?>"> <?= _('Meine Veranstaltungen') ?> </button> </div> <div class="clickable"> - <?= Icon::create('institute')->asInput(50, ['formaction' => $controller->url_for('/choose_folder_from_institute')]) ?> + <?= Icon::create('institute')->asInput(50, ['formaction' => $controller->action_url('choose_folder_from_institute')]) ?> <button class="undecorated" - formaction="<?= $controller->link_for('/choose_folder_from_institute') ?>"> + formaction="<?= $controller->action_link('choose_folder_from_institute') ?>"> <?= _('Meine Einrichtungen') ?> </button> </div> @@ -68,8 +68,8 @@ $options = array_filter([ <? $nav = $plugin->getFileSelectNavigation() ?> <? if ($nav) : ?> <div class="clickable"> - <?= $nav->getImage()->asInput(50, ['formaction' => $controller->url_for('/choose_folder'), 'name' => 'to_plugin', 'value' => get_class($plugin)]) ?> - <button formaction="<?= $controller->link_for('/choose_folder') ?>" + <?= $nav->getImage()->asInput(50, ['formaction' => $controller->action_url('choose_folder'), 'name' => 'to_plugin', 'value' => get_class($plugin)]) ?> + <button formaction="<?= $controller->action_link('choose_folder') ?>" type="submit" class="undecorated" name="to_plugin" diff --git a/app/views/file/choose_file.php b/app/views/file/choose_file.php index 4cf0e475338ad9522ece88822781515c89383093..c7eb80fc11940d627b3ff706d3cd8dedf52de945 100644 --- a/app/views/file/choose_file.php +++ b/app/views/file/choose_file.php @@ -164,7 +164,7 @@ if (Request::get('to_plugin')) { <footer data-dialog-button> <?= Studip\LinkButton::create( _('Zurück'), - $controller->url_for('/add_files_window/' . Request::get('to_folder_id'), $options), + $controller->action_url('add_files_window/' . Request::get('to_folder_id'), $options), ['data-dialog' => 1] ) ?> <? if ($filesystemplugin && $filesystemplugin->hasSearch()) : ?> diff --git a/app/views/file/choose_file_from_course.php b/app/views/file/choose_file_from_course.php index ad2ba266ef5115527bb3e1ade7aa7ab76db39b80..84969025927fdc2cb36cf7179179f94d73aa55b2 100644 --- a/app/views/file/choose_file_from_course.php +++ b/app/views/file/choose_file_from_course.php @@ -60,7 +60,7 @@ if (Request::get('range_type')) { <footer data-dialog-button> <?= Studip\LinkButton::create( _('Zurück'), - $controller->url_for('/add_files_window/' . Request::get('to_folder_id'), $options), + $controller->action_url('add_files_window/' . Request::get('to_folder_id'), $options), ['data-dialog' => ''] ) ?> </footer> diff --git a/app/views/file/choose_folder.php b/app/views/file/choose_folder.php index 498ad0e3150a3e21d1869dbc1928f918b13e49fe..d3c92869c3987f2d22b2788de9f65c788e06a08f 100644 --- a/app/views/file/choose_folder.php +++ b/app/views/file/choose_folder.php @@ -28,7 +28,7 @@ $buttonLabels = [ </div> <? /*if ($filesystemplugin && $filesystemplugin->hasSearch()) : ?> - <form action="<?= $controller->url_for('/choose_file/' . $top_folder->parent_id) ?>" method="get" class="default" style="margin-bottom: 50px;"> + <form action="<?= $controller->action_link('choose_file/' . $top_folder->parent_id) ?>" method="get" class="default" style="margin-bottom: 50px;"> <? foreach ($options as $key => $value) : ?> <input type="hidden" name="<?= htmlReady($key) ?>" value="<?= htmlReady($value) ?>"> <? endforeach ?> @@ -79,7 +79,7 @@ $buttonLabels = [ <tr> <td colspan="2"> <!-- neu --> - <button formaction="<?= $controller->link_for('/choose_folder/' . $top_folder->parent_id) ?>" class="undecorated" data-dialog> + <button formaction="<?= $controller->action_link('choose_folder/' . $top_folder->parent_id) ?>" class="undecorated" data-dialog> <small><?= _('Ein Verzeichnis nach oben wechseln') ?></small> </button> </td> @@ -98,7 +98,7 @@ $buttonLabels = [ <tr> <td class="document-icon" data-sort-value="0"> <!-- neu --> - <button formaction="<?= $controller->link_for('/choose_folder/' . $subfolder->getId()) ?>" class="undecorated" data-dialog> + <button formaction="<?= $controller->action_link('choose_folder/' . $subfolder->getId()) ?>" class="undecorated" data-dialog> <? if ($subfolder->is_empty): ?> <?= Icon::create('folder-empty')->asImg(24) ?> <? else: ?> @@ -108,7 +108,7 @@ $buttonLabels = [ </td> <td> <!-- neu --> - <button formaction="<?= $controller->link_for('/choose_folder/' . $subfolder->getId()) ?>" class="undecorated" data-dialog> + <button formaction="<?= $controller->action_link('choose_folder/' . $subfolder->getId()) ?>" class="undecorated" data-dialog> <?= htmlReady($subfolder->name) ?> </button> @@ -192,19 +192,19 @@ switch ($top_folder->range_type) { <? if (Request::get('direct_parent')): ?> <!-- neu --> <?= Studip\Button::create(_('Zurück'), [ - 'formaction' => $controller->url_for('/choose_destination/' . $options['copymode']), + 'formaction' => $controller->action_url('choose_destination/' . $options['copymode']), 'data-dialog' => 'size=auto', ]) ?> <? elseif ($top_folder->range_type === 'course') : ?> <!-- neu --> <?= Studip\Button::create(_('Zurück'), [ - 'formaction' => $controller->url_for('/choose_folder_from_course'), + 'formaction' => $controller->action_url('choose_folder_from_course'), 'data-dialog' => '', ]) ?> <? elseif($top_folder->range_type === 'institute'): ?> <!-- neu --> <?= Studip\Button::create(_('Zurück'), [ - 'formaction' => $controller->url_for('/choose_folder_from_institute'), + 'formaction' => $controller->action_url('choose_folder_from_institute'), 'data-dialog' => '', ]) ?> <? endif; ?> diff --git a/app/views/file/choose_folder_from_institute.php b/app/views/file/choose_folder_from_institute.php index 266859c42087030b7df494590fcab71979c2cc2a..02ae6753d563f99a43431baba58e63dd82cec1e0 100644 --- a/app/views/file/choose_folder_from_institute.php +++ b/app/views/file/choose_folder_from_institute.php @@ -13,7 +13,7 @@ $options = array_filter([ <? if ($GLOBALS['perm']->have_perm("admin")) : ?> <form id="folderchooser_institute_search" method="post" - action="<?= $controller->link_for('/choose_folder_from_institute') ?>" + action="<?= $controller->action_link('choose_folder_from_institute') ?>" data-dialog> <?= QuickSearch::get('Institut_id', $instsearch) ->fireJSFunctionOnSelect("function () { jQuery('#folderchooser_institute_search').submit(); }") @@ -60,7 +60,7 @@ $options = array_filter([ <footer data-dialog-button> <!-- neu --> <?= Studip\Button::create(_('Zurück'), [ - 'formaction' => $controller->url_for('/choose_destination/' . $options['copymode']), + 'formaction' => $controller->action_url('choose_destination/' . $options['copymode']), 'data-dialog' => 'size=auto', ]) ?> </footer> diff --git a/app/views/file/edit.php b/app/views/file/edit.php index f2a3a655f9395f44c284bec4a20593f447eae542..737d2414b6ea48eff20c2094fdf97cd0ef8894a7 100644 --- a/app/views/file/edit.php +++ b/app/views/file/edit.php @@ -3,7 +3,7 @@ <div id="file_management_forms"> <form method="post" data-dialog class="default" - action="<?= $controller->link_for('/edit/' . $file_ref->id, ['from_plugin' => $from_plugin]) ?>"> + action="<?= $controller->action_link('edit/' . $file_ref->id, ['from_plugin' => $from_plugin]) ?>"> <?= CSRFProtection::tokenTag() ?> <fieldset> diff --git a/app/views/file/edit_folder.php b/app/views/file/edit_folder.php index c5c8fe42aa3294d8336d850f406acb11f71f376e..d7573a2fb58842bd14530a9a31b94b71f310a598 100644 --- a/app/views/file/edit_folder.php +++ b/app/views/file/edit_folder.php @@ -2,7 +2,7 @@ <?= $this->render_partial('file/_folder_aside.php') ?> <div id="file_management_forms"> <form method="post" class="default" - action="<?= $controller->url_for('/edit_folder/' . $folder->getId()) ?>" + action="<?= $controller->action_link('edit_folder/' . $folder->getId()) ?>" data-dialog="reload-on-close" > <?= CSRFProtection::tokenTag() ?> diff --git a/app/views/file/edit_urlfile.php b/app/views/file/edit_urlfile.php index 41e7a6c947ed3f39d49b820a7163a2797bcc7175..761f8ae65b77efe09b317632aae8a5902204326d 100644 --- a/app/views/file/edit_urlfile.php +++ b/app/views/file/edit_urlfile.php @@ -3,7 +3,7 @@ <div id="file_management_forms"> <form method="post" data-dialog class="default" - action="<?= $controller->link_for('/edit_urlfile/' . $file_ref->id, ['from_plugin' => $from_plugin]) ?>"> + action="<?= $controller->action_link('edit_urlfile/' . $file_ref->id, ['from_plugin' => $from_plugin]) ?>"> <?= CSRFProtection::tokenTag() ?> <fieldset> diff --git a/app/views/lvgruppen/lvgruppen/details.php b/app/views/lvgruppen/lvgruppen/details.php index aec4a3ab25c093e84195104d4849dfe6626c41c1..e158c615303d99b9c71d07edb6277176c73a1c0e 100644 --- a/app/views/lvgruppen/lvgruppen/details.php +++ b/app/views/lvgruppen/lvgruppen/details.php @@ -59,7 +59,7 @@ </div> <? elseif ($sem_filter == 'all') : ?> <span style="margin-left: 20%" onClick="jQuery('#mvv-lvgruppen-semester').find('.mvv-sem-hidden').slideToggle(); jQuery(this).find('span').toggle(); return false;"> - <a href="<?= $controller->url_for('/details/' . $lvgruppe->id, ['all_sem' => 1]) ?>"> + <a href="<?= $controller->action_link('details/' . $lvgruppe->id, ['all_sem' => 1]) ?>"> <span> <?= Icon::create('arr_1up', Icon::ROLE_CLICKABLE, ['style' => 'vertical-align:text-bottom;'])->asImg(); ?> <?= _('Alle Semester anzeigen') ?> diff --git a/app/views/lvgruppen/lvgruppen/index.php b/app/views/lvgruppen/lvgruppen/index.php index e4800828688d589adade5798ad59f12c50c95d27..984cac8273621eabc7bb5f26482537434e6df1c1 100644 --- a/app/views/lvgruppen/lvgruppen/index.php +++ b/app/views/lvgruppen/lvgruppen/index.php @@ -19,7 +19,7 @@ <tbody class="<?= $lvgruppe->count_seminare || true ? '' : 'empty' ?> <?= ($lvgruppe_id ? 'not-collapsed' : 'collapsed') ?>"> <tr class="header-row"> <td class="toggle-indicator"> - <a class="mvv-load-in-new-row" href="<?= $controller->url_for('/details/' . $lvgruppe->id) ?>"> + <a class="mvv-load-in-new-row" href="<?= $controller->action_link('details/' . $lvgruppe->id) ?>"> <?= htmlReady($lvgruppe->getDisplayName()) ?> </a> </td> @@ -30,7 +30,7 @@ <? $actionMenu = ActionMenu::get()->setContext($lvgruppe->getDisplayName()) ?> <? if (MvvPerm::get($lvgruppe)->havePermWrite()) : ?> <? $actionMenu->addLink( - $controller->url_for('/lvgruppe/' . $lvgruppe->id), + $controller->action_url('lvgruppe/' . $lvgruppe->id), _('Lehrveranstaltungsgruppe bearbeiten'), Icon::create('edit', Icon::ROLE_CLICKABLE, tooltip2(_('Lehrveranstaltungsgruppe bearbeiten'))), ['data-dialog' => 'size='] @@ -50,7 +50,7 @@ _('Lehrveranstaltungsgruppe löschen'), Icon::create('trash', Icon::ROLE_CLICKABLE, tooltip2(_('Modulteil löschen'))), [ - 'formaction' => $controller->url_for('/delete', $lvgruppe->id), + 'formaction' => $controller->action_url('delete', $lvgruppe->id), 'data-confirm' => sprintf( _('Wollen Sie wirklich die Lehrveranstaltungsgruppe "%s" löschen?'), htmlReady($lvgruppe->getDisplayName()) @@ -89,7 +89,7 @@ $pagination->set_attribute('perPage', MVVController::$items_per_page); $pagination->set_attribute('num_postings', $count); $pagination->set_attribute('page', $page); - $page_link = reset(explode('?', $controller->url_for('/index'))) . '?page_lvgruppen=%s'; + $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_lvgruppen=%s'; $pagination->set_attribute('pagelink', $page_link); echo $pagination->render("shared/pagechooser"); ?> diff --git a/app/views/materialien/files/add_dokument.php b/app/views/materialien/files/add_dokument.php index 6a531c5f8efba597b37e8650d4b5ade9971f31ad..f4a9c381382af7ccea3e03afaea2d6fc73891b5f 100644 --- a/app/views/materialien/files/add_dokument.php +++ b/app/views/materialien/files/add_dokument.php @@ -1,4 +1,4 @@ -<form class="default" action="<?= $controller->url_for('/add_dokument', $origin, $range_type, $range_id, $mvvfile_id) ?>" method="post" data-dialog="size=auto"> +<form class="default" action="<?= $controller->action_link('add_dokument', $origin, $range_type, $range_id, $mvvfile_id) ?>" method="post" data-dialog="size=auto"> <input type="hidden" name="mvvfile_id" id="mvvfile_id" value="<?= htmlReady($mvvfile_id) ?>"> <input type="hidden" name="range_id" id="range_id" value="<?= htmlReady($range_id) ?>"> <input type="hidden" name="range_type" id="range_type" value="<?= htmlReady($range_type) ?>"> diff --git a/app/views/materialien/files/add_files_to_range.php b/app/views/materialien/files/add_files_to_range.php index ca8da1db480c311a9fbb613598c2d6b126121656..358fb280799519fd3cdd315b97cf227baef02888 100644 --- a/app/views/materialien/files/add_files_to_range.php +++ b/app/views/materialien/files/add_files_to_range.php @@ -1,4 +1,4 @@ -<form class="default" action="<?= $controller->url_for('/add_files_to_range',$range_type, $range_id) ?>" method="post" data-dialog=""> +<form class="default" action="<?= $controller->action_link('add_files_to_range',$range_type, $range_id) ?>" method="post" data-dialog=""> <label> <select id="search-file-select" class="nested-select" multiple name="files[]"> <? if ($files) : ?> diff --git a/app/views/materialien/files/add_ranges_to_file.php b/app/views/materialien/files/add_ranges_to_file.php index 5458dad27ab5ff71e287bf443fa98aa6ec915a9d..6e8c0c5171fa8baad090947c0179ea19db972a8c 100644 --- a/app/views/materialien/files/add_ranges_to_file.php +++ b/app/views/materialien/files/add_ranges_to_file.php @@ -1,4 +1,4 @@ -<form class="default" action="<?= $controller->url_for('/add_ranges_to_file', $mvvfile_id, $range_type) ?>" method="post" data-dialog="size=auto"> +<form class="default" action="<?= $controller->action_link('add_ranges_to_file', $mvvfile_id, $range_type) ?>" method="post" data-dialog="size=auto"> <label> <? if ($range_type == 'Studiengang'): ?> diff --git a/app/views/materialien/files/index.php b/app/views/materialien/files/index.php index c1976782b64b42e1b20fda4a322a87923722d14b..10f8d7a7e390e1f30736ed09d3a5e6b91d4a092a 100644 --- a/app/views/materialien/files/index.php +++ b/app/views/materialien/files/index.php @@ -109,7 +109,7 @@ $pagination->set_attribute('num_postings', $count); $pagination->set_attribute('page', $page); // ARGH! - $page_link = reset(explode('?', $controller->url_for('/index'))) . '?page_files=%s'; + $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_files=%s'; $pagination->set_attribute('pagelink', $page_link); echo $pagination->render("shared/pagechooser"); ?> diff --git a/app/views/materialien/files/new_dokument.php b/app/views/materialien/files/new_dokument.php index 2401fd5c6b91f8f72cf4f455a3234ddebbee0bfa..974c6fdc2ffeeecfcd3c1987ebaea9ea80fea56b 100644 --- a/app/views/materialien/files/new_dokument.php +++ b/app/views/materialien/files/new_dokument.php @@ -1,4 +1,4 @@ -<form class="default" action="<?= $controller->url_for('/new_dokument') ?>" method="post" data-dialog="size=auto"> +<form class="default" action="<?= $controller->action_link('new_dokument') ?>" method="post" data-dialog="size=auto"> <label> <select id="mvv-contacts-range_types" name="range_type"> diff --git a/app/views/materialien/files/select_range.php b/app/views/materialien/files/select_range.php index 1148668b504b759c2ba6257b10f46171e718ee98..735e7efc05d8e388ab3b9eebbf02d01d0a182e8d 100644 --- a/app/views/materialien/files/select_range.php +++ b/app/views/materialien/files/select_range.php @@ -1,4 +1,4 @@ -<form class="default" action="<?= $controller->url_for('/select_range', $range_type) ?>" method="post" data-dialog=""> +<form class="default" action="<?= $controller->action_link('select_range', $range_type) ?>" method="post" data-dialog=""> <label> <select class="nested-select" multiple name="range_id[]"> <? if ($range_type == 'Studiengang'): ?> diff --git a/app/views/materialien/files/select_range_type.php b/app/views/materialien/files/select_range_type.php index e443d5a6e7c4e3079ed4d0c2e71b1a0baf361bda..3464ada8c21a28b3b6595aa6ffcdd2cc425a4f84 100644 --- a/app/views/materialien/files/select_range_type.php +++ b/app/views/materialien/files/select_range_type.php @@ -1,4 +1,4 @@ -<form class="default" action="<?= $controller->url_for('/select_range_type', $mvvfile_id) ?>" method="post" data-dialog="size=auto"> +<form class="default" action="<?= $controller->action_link('select_range_type', $mvvfile_id) ?>" method="post" data-dialog="size=auto"> <label> <select id="mvv-files-range_types" name="range_type"> diff --git a/app/views/materialien/files/sort.php b/app/views/materialien/files/sort.php index 30946f20c5c6817db5800c310da37077a98498aa..da1c3b6a9e3fa083810368e393d8dc1d13240206 100644 --- a/app/views/materialien/files/sort.php +++ b/app/views/materialien/files/sort.php @@ -20,7 +20,7 @@ jQuery(function ($) { </div> </div> -<form class="default" id="order_form" action="<?= $controller->url_for('/sort', $range_type, $range_id) ?>" method="POST" data-dialog="size=auto"> +<form class="default" id="order_form" action="<?= $controller->action_link('sort', $range_type, $range_id) ?>" method="POST" data-dialog="size=auto"> <input type="hidden" name="ordering" id="ordering"> <footer data-dialog-button> <?= Studip\Button::createAccept(_('Speichern'), 'order') ?> diff --git a/app/views/module/institute/index.php b/app/views/module/institute/index.php index e2125edd5f8ecc113beb80cab2d6d5143e35d69c..1ba7ca1c3d3b9d7e5e51ff7f90d4584623285f01 100644 --- a/app/views/module/institute/index.php +++ b/app/views/module/institute/index.php @@ -13,7 +13,7 @@ <td class="toggle-indicator"> <? if ($institut->count_objects) : ?> <a class="mvv-load-in-new-row" - href="<?= $controller->url_for('/details', ['institut_id' => $institut->id]) ?>"> + href="<?= $controller->action_link('details', ['institut_id' => $institut->id]) ?>"> <?= htmlReady($institut->getDisplayName()) ?> </a> <? else : ?> diff --git a/app/views/module/module/approve.php b/app/views/module/module/approve.php index c2348dce9a1bdf121663b1b4066a84265f649c7b..8153a19c630b95427f3c3e93fd209429f9dc4140 100644 --- a/app/views/module/module/approve.php +++ b/app/views/module/module/approve.php @@ -1,5 +1,5 @@ <form name="approve" - action="<?= $controller->url_for('/approve/' . $modul_id) ?>" + action="<?= $controller->action_link('approve/' . $modul_id) ?>" method="post" class="default"> <? $response = $controller->relay('shared/modul/description/' . $modul_id); ?> diff --git a/app/views/module/module/copy_form.php b/app/views/module/module/copy_form.php index da956110105886b3d787bad6de99a5bdd5080004..c764c2d6c374427578655f6c731efb5d23400cec 100644 --- a/app/views/module/module/copy_form.php +++ b/app/views/module/module/copy_form.php @@ -8,7 +8,7 @@ <? if ($perm->havePermRead()) : ?> <section> <p> - <a href="<?= $controller->url_for('/modul/' . $modul->id) ?>"> + <a href="<?= $controller->action_link('modul/' . $modul->id) ?>"> <?= Icon::create('edit', Icon::ROLE_CLICKABLE ,['title' => _('Modul bearbeiten')]) ?> <strong><?= _('Aktuellste Version bearbeiten') ?></strong> </a> @@ -78,7 +78,7 @@ <?= _('Zuordnungen zu Studiengängen mit übernehmen') ?> </label> <a title="<?= _('Verwendet in Studiengängen') ?>" - href="<?= $controller->url_for('/assignments/' . $modul->id) ?>" + href="<?= $controller->action_link('assignments/' . $modul->id) ?>" onclick="STUDIP.Dialog.fromURL(this.href, {title: this.title, resizable: true, id: 'stgteil_assignments'}); return false;"> <?= Icon::create('info-circle', Icon::ROLE_CLICKABLE , ['title' => _('Zuordnungen anzeigen')]) ?> </a> diff --git a/app/views/module/module/details.php b/app/views/module/module/details.php index dd5bf8d88a29e25920c1289367ae79df60e1eaf7..fed9e534eb817fd933192690cc8c37855bb8545f 100644 --- a/app/views/module/module/details.php +++ b/app/views/module/module/details.php @@ -12,7 +12,7 @@ <td class="toggle-indicator"> <? if (count($modulteil->lvgruppen) || $perm->haveFieldPermLvgruppen(MvvPerm::PERM_CREATE)) : ?> <a class="mvv-load-in-new-row" - href="<?= $controller->url_for('/modulteil_lvg/' . $modulteil->id) ?>"> + href="<?= $controller->action_link('modulteil_lvg/' . $modulteil->id) ?>"> <?= htmlReady($modulteil->getDisplayName()) ?></a> <? else : ?> <?= htmlReady($modulteil->getDisplayName()) ?> @@ -22,7 +22,7 @@ <? if ($perm->havePermWrite()) : ?> <? foreach ($modulteil->deskriptoren->getAvailableTranslations() as $language) : ?> <? $lang = $GLOBALS['MVV_MODUL_DESKRIPTOR']['SPRACHE']['values'][$language]; ?> - <a href="<?= $controller->url_for('/modulteil/' . join('/', [$modulteil->id, $institut_id]), ['display_language' => $language]) ?>"> + <a href="<?= $controller->action_link('modulteil/' . join('/', [$modulteil->id, $institut_id]), ['display_language' => $language]) ?>"> <img src="<?= Assets::image_path('languages/lang_' . mb_strtolower($language) . '.gif') ?>" alt="<?= $lang['name'] ?>" title="<?= $lang['name'] ?>"> </a> @@ -35,7 +35,7 @@ <? $actionMenu = ActionMenu::get()->setContext($modulteil->getDisplayName()) ?> <? if (MvvPerm::havePermCreate('Lvgruppe') && $perm->haveFieldPermLvgruppen(MvvPerm::PERM_CREATE)) : ?> <? $actionMenu->addLink( - $controller->url_for('/lvgruppe/' . $modulteil->id), + $controller->action_url('lvgruppe/' . $modulteil->id), _('Neue LV-Gruppe anlegen'), Icon::create('file', Icon::ROLE_CLICKABLE, ['title' => _('Neue LV-Gruppe anlegen')]), [ @@ -46,14 +46,14 @@ <? endif; ?> <? if ($perm->havePermWrite()) : ?> <? $actionMenu->addLink( - $controller->url_for('/modulteil/' . $modulteil->id), + $controller->action_url('modulteil/' . $modulteil->id), _('Modulteil bearbeiten'), Icon::create('edit', Icon::ROLE_CLICKABLE, ['title' => _('Modulteil bearbeiten')]) ) ?> <? endif; ?> <? if ($perm->havePermCreate()) : ?> <? $actionMenu->addLink( - $controller->url_for('/copy_modulteil/' . $modulteil->id), + $controller->action_url('copy_modulteil/' . $modulteil->id), _('Modulteil kopieren'), Icon::create('files', Icon::ROLE_CLICKABLE,['title' => _('Modulteil kopieren')]) ) ?> @@ -64,7 +64,7 @@ _('Modulteil löschen'), Icon::create('trash', Icon::ROLE_CLICKABLE, ['title' => _('Modulteil löschen')]), [ - 'formaction' => $controller->url_for('/delete_modulteil/' . $modulteil->id), + 'formaction' => $controller->action_url('delete_modulteil/' . $modulteil->id), 'data-confirm' => sprintf( _('Wollen Sie wirklich den Modulteil "%s" löschen?'), htmlReady($modulteil->getDisplayName()) diff --git a/app/views/module/module/diff_select.php b/app/views/module/module/diff_select.php index cfb09b1730f5e69eb91e655f8938b19f9b569a30..716cbbb014b4d0bdfe6242ec810f3314effa2922 100644 --- a/app/views/module/module/diff_select.php +++ b/app/views/module/module/diff_select.php @@ -1,7 +1,7 @@ <h1><?= htmlReady($modul->getDisplayName()) ?></h1> <div> <h4><?= _('Vergleich mit folgendem Modul:') ?></h4> - <form data-dialog="size=auto" class="mvv-new-tab" action="<?= $controller->link_for('/diff') ?>" method="post"> + <form data-dialog="size=auto" class="mvv-new-tab" action="<?= $controller->action_link('diff') ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <div> <?= $search_modul->render(); ?> @@ -18,13 +18,13 @@ <? if ($quelle) : ?> <div> <h4><?= _('Dieses Modul ist eine Novellierung des Moduls:') ?></h4> - <a class="mvv-new-tab" href="<?= $controller->link_for('/diff', $modul->id, $quelle->id) ?>"><?= htmlReady($quelle->getDisplayName()) ?></a> + <a class="mvv-new-tab" href="<?= $controller->action_link('diff', $modul->id, $quelle->id) ?>"><?= htmlReady($quelle->getDisplayName()) ?></a> </div> <? endif; ?> <? if ($variante) : ?> <div> <h4><?= _('Dieses Modul ist eine Variante von:') ?></h4> - <a class="mvv-new-tab" href="<?= $controller->link_for('/diff', $modul->id, $variante->id) ?>"><?= htmlReady($variante->getDisplayName()) ?></a> + <a class="mvv-new-tab" href="<?= $controller->action_link('diff', $modul->id, $variante->id) ?>"><?= htmlReady($variante->getDisplayName()) ?></a> <? endif; ?> </div> <? $variants = $modul->getVariants(); ?> @@ -34,7 +34,7 @@ <ul> <? foreach ($variants as $variant) : ?> <li> - <a href="<?= $controller->link_for('/diff', $modul->id, $variant->id) ?>"> + <a href="<?= $controller->action_link('diff', $modul->id, $variant->id) ?>"> <?= htmlReady($variant->getDisplayName()) ?> </a> </li> diff --git a/app/views/module/module/index.php b/app/views/module/module/index.php index e15d3f01147220811ace23db27fbb615c8ef4978..7f3df8bcf454b59d0fb0f4f392904261aa9c3c82 100644 --- a/app/views/module/module/index.php +++ b/app/views/module/module/index.php @@ -27,7 +27,7 @@ $pagination->set_attribute('perPage', MVVController::$items_per_page); $pagination->set_attribute('num_postings', $count); $pagination->set_attribute('page', $page); - $page_link = reset(explode('?', $controller->url_for('/index'))) . '?page_module=%s'; + $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_module=%s'; $pagination->set_attribute('pagelink', $page_link); echo $pagination->render('shared/pagechooser'); ?> diff --git a/app/views/module/module/modul.php b/app/views/module/module/modul.php index 6c03e424444bea88a13031253c896d34ae112142..b2a9e7245e38c875ab9c8cedb9698d8f1d8c9010 100644 --- a/app/views/module/module/modul.php +++ b/app/views/module/module/modul.php @@ -13,7 +13,7 @@ if ($GLOBALS['MVV_MODUL']['SPRACHE']['default'] != $display_language) { </script> <? endif; ?> -<form id="modul_form" class="default" action="<?= $controller->url_for('/modul', $modul->id) ?>" method="post"> +<form id="modul_form" class="default" action="<?= $controller->action_link('modul', $modul->id) ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <fieldset class="collapsable"> @@ -686,7 +686,7 @@ if ($GLOBALS['MVV_MODUL']['SPRACHE']['default'] != $display_language) { <? endif; ?> <? if (!$def_lang && !$deskriptor->isNew() && in_array($display_language, $translations)) : ?> <?= Button::create(_('Löschen'), 'delete', ['title' => _('Deskriptor löschen'), 'data-confirm' => sprintf(_('Soll der Deskriptor in der Ausgabesprache %s gelöscht werden?'), htmlReady($GLOBALS['MVV_LANGUAGES']['values'][$display_language]['name'])), - 'formaction' => $controller->url_for('/delete_modul_deskriptor', $deskriptor->id, $display_language)]); ?> + 'formaction' => $controller->action_url('delete_modul_deskriptor', $deskriptor->id, $display_language)]); ?> <? endif; ?> <? endif; ?> <?= LinkButton::createCancel(_('Abbrechen'), $cancel_url, ['title' => _('zurück zur Übersicht')]) ?> diff --git a/app/views/module/module/module.php b/app/views/module/module/module.php index 9e6d6ca6789803f765dad8fa4327cdf54e33083a..5dfe3656a3987d784e2cd38b04796bd71babc435 100644 --- a/app/views/module/module/module.php +++ b/app/views/module/module/module.php @@ -6,8 +6,8 @@ <tr class="header-row" id="modul_<?= $modul->getId() ?>"> <? if ($modul->count_modulteile) : ?> <td style="white-space:nowrap;" class="toggle-indicator"> - <? $details_url = $details_url ?: '/details'; ?> - <a class="mvv-load-in-new-row" href="<?= $controller->url_for($details_url, $modul->getId()) ?>"> + <? $details_action = $details_action ?: 'details'; ?> + <a class="mvv-load-in-new-row" href="<?= $controller->action_link($details_action, $modul->getId()) ?>"> <? if ($ampel_icon) : ?> <?= $ampel_icon->asImg(['title' => $ampelstatus, 'style' => 'vertical-align: text-top;']) ?> <? endif; ?> @@ -15,7 +15,7 @@ </a> </td> <td class="dont-hide toggle-indicator"> - <a class="mvv-load-in-new-row" href="<?= $controller->url_for($details_url, $modul->getId()) ?>" + <a class="mvv-load-in-new-row" href="<?= $controller->action_link($details_action, $modul->getId()) ?>" style="background-image: none; padding: 0; display: inline;"> <?= htmlReady($modul->getDisplayName(0)) ?> </a> @@ -46,7 +46,7 @@ <? $languages = $modul->deskriptoren->getAvailableTranslations(); ?> <? foreach ($languages as $language) : ?> <? $lang = $GLOBALS['MVV_MODUL_DESKRIPTOR']['SPRACHE']['values'][$language]; ?> - <a href="<?= $controller->url_for('/modul/' . $modul->id . '/', ['display_language' => $language]) ?>"> + <a href="<?= $controller->action_link('modul/' . $modul->id . '/', ['display_language' => $language]) ?>"> <img src="<?= Assets::image_path('languages/lang_' . mb_strtolower($language) . '.gif') ?>" alt="<?= $lang['name'] ?>" title="<?= $lang['name'] ?>"> </a> @@ -59,7 +59,7 @@ <? $actionMenu = ActionMenu::get()->setContext($modul->getDisplayName()) ?> <? if ($modul->stat === 'planung' && $perm->haveFieldPerm('stat')) : ?> <? $actionMenu->addLink( - $controller->url_for('/approve/' . $modul->id), + $controller->action_url('approve/' . $modul->id), _('Modul genehmigen'), Icon::create('accept', Icon::ROLE_CLICKABLE, ['title' => _('Modul genehmigen')]), ['data-dialog' => 'size=auto;'] @@ -67,7 +67,7 @@ <? endif; ?> <? if ($perm->havePermRead()) : ?> <? $actionMenu->addLink( - $controller->url_for('/description', $modul->id), + $controller->action_url('description', $modul->id), _('Modulbeschreibung ansehen'), Icon::create('log', Icon::ROLE_CLICKABLE,['title' => _('Modulbeschreibung ansehen')]), [ @@ -78,21 +78,21 @@ <? endif; ?> <? if ($perm->haveFieldPerm('modulteile', MvvPerm::PERM_CREATE)) : ?> <? $actionMenu->addLink( - $controller->url_for('/modulteil', ['modul_id' => $modul->id]), + $controller->action_url('modulteil', ['modul_id' => $modul->id]), _('Modulteil anlegen'), Icon::create('add', Icon::ROLE_CLICKABLE,['title' => _('Modulteil anlegen')]) ) ?> <? endif; ?> <? if ($perm->havePermWrite()) : ?> <? $actionMenu->addLink( - $controller->url_for('/modul/' . $modul->id), + $controller->action_url('modul/' . $modul->id), _('Modul bearbeiten'), Icon::create('edit', Icon::ROLE_CLICKABLE,['title' => _('Modul bearbeiten')]) ) ?> <? endif; ?> <? if ($perm->haveFieldPerm('copy_module', MvvPerm::PERM_CREATE)) : ?> <? $actionMenu->addLink( - $controller->url_for('/copy_form', $modul->id), + $controller->action_url('copy_form', $modul->id), _('Modul kopieren'), Icon::create('files', Icon::ROLE_CLICKABLE,['title' => _('Modul kopieren')]), ['data-dialog' => ''] @@ -104,7 +104,7 @@ _('Modul löschen'), Icon::create('trash', Icon::ROLE_CLICKABLE,['title' => _('Modul löschen')]), [ - 'formaction' => $controller->url_for('/delete/' . $modul->id), + 'formaction' => $controller->action_url('delete/' . $modul->id), 'data-confirm' => sprintf( _('Wollen Sie wirklich das Modul "%s" löschen?'), htmlReady($modul->getDisplayName()) diff --git a/app/views/module/module/modulteil.php b/app/views/module/module/modulteil.php index c2c4f20a4846337757deb8bef928dd2b9cb5016b..cf6452d19d129223f7a04447aa42bab6e7269487 100644 --- a/app/views/module/module/modulteil.php +++ b/app/views/module/module/modulteil.php @@ -11,7 +11,7 @@ if ($GLOBALS['MVV_MODULTEIL']['SPRACHE']['default'] != $display_language) { STUDIP.MVV.PARENT_ID = '<?= $modulteil->getId() ?>'; </script> -<form id="modulteil_form" class="default" action="<?= $controller->url_for('/modulteil/', $modulteil->id) ?>" +<form id="modulteil_form" class="default" action="<?= $controller->action_link('modulteil/', $modulteil->id) ?>" method="post"> <?= CSRFProtection::tokenTag() ?> @@ -468,7 +468,7 @@ if ($GLOBALS['MVV_MODULTEIL']['SPRACHE']['default'] != $display_language) { _('Löschen'), 'delete', ['title' => _('Deskriptor löschen'), 'data-confirm' => sprintf(_('Soll der Deskriptor in der Ausgabesprache %s gelöscht werden?'), htmlReady($GLOBALS['MVV_LANGUAGES']['values'][$display_language]['name'])), - 'formaction' => $controller->url_for('/delete_modulteil_deskriptor', $deskriptor->id, $display_language) + 'formaction' => $controller->action_url('delete_modulteil_deskriptor', $deskriptor->id, $display_language) ] ); ?>s <? endif; ?> diff --git a/app/views/module/module/modulteil_lvg.php b/app/views/module/module/modulteil_lvg.php index 6c6d071828032028d2f1a203a1fe191e2a8fb412..e13ec5b09a3ddd3da7e683f683e5a9a1c6ef4c0f 100644 --- a/app/views/module/module/modulteil_lvg.php +++ b/app/views/module/module/modulteil_lvg.php @@ -15,7 +15,7 @@ <? $actionMenu = ActionMenu::get()->setContext($lvgruppe->getDisplayName()) ?> <? if (MvvPerm::haveFieldPermLvgruppen($modulteil, MvvPerm::PERM_WRITE)) : ?> <? $actionMenu->addLink( - $controller->url_for('/lvgruppe/' . $modulteil->id . '/' . $lvgruppe->id), + $controller->action_url('lvgruppe/' . $modulteil->id . '/' . $lvgruppe->id), _('LV-Gruppe bearbeiten'), Icon::create('edit', Icon::ROLE_CLICKABLE ,['title' => _('LV-Gruppe bearbeiten')]), [ @@ -30,7 +30,7 @@ _('Zuordnung der LV-Gruppe löschen'), Icon::create('trash', Icon::ROLE_CLICKABLE , ['title' => _('Zuordnung der LV-Gruppe löschen')]), [ - 'formaction' => $controller->url_for('/delete_lvgruppe/' . $modulteil->id . '/' . $lvgruppe->id), + 'formaction' => $controller->action_url('delete_lvgruppe/' . $modulteil->id . '/' . $lvgruppe->id), 'data-confirm' => sprintf( _('Wollen Sie wirklich die Lehrveranstaltungsgruppe "%s" vom Modulteil "%s" entfernen?'), htmlReady($lvgruppe->getDisplayName()), @@ -49,7 +49,7 @@ <tbody> <tr> <td colspan="2"> - <form action="<?= $controller->url_for('/add_lvgruppe/' . $modulteil->id) ?>" method="post"> + <form action="<?= $controller->action_link('add_lvgruppe/' . $modulteil->id) ?>" method="post"> <?= CSRFProtection::tokenTag(); ?> <input type="hidden" name="security_token" value="<?= $security_token ?>"> <div style="float: left; padding-right: 10px;"><?= _('LV-Gruppe hinzufügen:') ?></div> diff --git a/app/views/search/angebot/detail.php b/app/views/search/angebot/detail.php index 0947e0b69d238579b128c83dac190f0f78a45d9b..f1789203e930772a3431a9c6f6332f9f9780dd0c 100644 --- a/app/views/search/angebot/detail.php +++ b/app/views/search/angebot/detail.php @@ -6,9 +6,9 @@ <ul class="mvv-result-list"> <? foreach($studiengaenge as $studiengang):?> <li> - <a href="<?= $controller->url_for($url, $studiengang->id) ?>"><?= htmlReady($studiengang->getDisplayName()) ?></a> + <a href="<?= $controller->link_for($url, $studiengang->id) ?>"><?= htmlReady($studiengang->getDisplayName()) ?></a> <? if ($studiengang->getValue('beschreibung')) : ?> - <a data-dialog href="<?= $this->controller->url_for('/info', $studiengang->id) ?>"> + <a data-dialog href="<?= $this->controller->action_link('info', $studiengang->id) ?>"> <?= Icon::create('info-circle', 'clickable', ['title' => _('Informationen zum Studiengang')]); ?> </a> <? endif; ?> diff --git a/app/views/search/breadcrumb.php b/app/views/search/breadcrumb.php index da6c371789d6de789f0d8544b108895194762c7d..acbfbe5be68fa8064c5ada81d548208f4742b76d 100644 --- a/app/views/search/breadcrumb.php +++ b/app/views/search/breadcrumb.php @@ -4,7 +4,7 @@ <? $index = 0; ?> <? foreach($bc_points as $type => $point):?> <? $id2 = reset(array_values((array) $point['add'])); ?> - <? $link = $controller->link_for('/' . $point['actn'], $point['id'], $id2); ?> + <? $link = $controller->action_link('' . $point['actn'], $point['id'], $id2); ?> <? if (is_array($point['add'])) : ?> <? $mvv_object = $type::find($point['id']); ?> <? if ($mvv_object && $type == 'Fach' && $additional_object = Abschluss::find($point['add']['Abschluss'])) : ?> diff --git a/app/views/search/module/_drill_down_list.php b/app/views/search/module/_drill_down_list.php index 4a38a0007d5360b7b4842e10bba6abfeb6b5bca0..bcb73c10a74c6572bbc10a50832162407684f1c8 100644 --- a/app/views/search/module/_drill_down_list.php +++ b/app/views/search/module/_drill_down_list.php @@ -31,7 +31,7 @@ */ ?> -<form action="<?= $controller->link_for('/index') ?>" method="post"> +<form action="<?= $controller->action_link('index') ?>" method="post"> <select name="actlist" style="margin:0;" class="submit-upon-select"> <? foreach ($lists as $lname => $list) : ?> <option value="<?= $lname ?>" <?= $lname == $act_list ? 'selected' :''; ?>><?= $list['name'] ?></option> diff --git a/app/views/search/module/_modul.php b/app/views/search/module/_modul.php index 4558d2d64e501a19960d81c613080d4f768005dc..1aadce74a199c46a3c61cc423592f538a5cb0a2c 100644 --- a/app/views/search/module/_modul.php +++ b/app/views/search/module/_modul.php @@ -7,7 +7,7 @@ </td> <? if (count($modul->getAssignedCoursesBySemester($selected_semester->id, $GLOBALS['user']->id))) : ?> <td class="toggle-indicator"> - <a class="mvv-search-modules-row-link mvv-load-in-new-row" href="<?= $controller->link_for("/details/{$modul->id}/#{$modul->id}") ?>"> + <a class="mvv-search-modules-row-link mvv-load-in-new-row" href="<?= $controller->action_link("details/{$modul->id}/#{$modul->id}") ?>"> <?= htmlReady($modul->getDisplayName(ModuleManagementModel::DISPLAY_CODE)) ?> </a> </td> diff --git a/app/views/search/module/index.php b/app/views/search/module/index.php index d0b535377819fa22e021a56ae12463c206af5192..c072cf07b11e3c1f2cae9acf2a94f71fa2af5b6a 100644 --- a/app/views/search/module/index.php +++ b/app/views/search/module/index.php @@ -1,6 +1,6 @@ <? use Studip\Button, Studip\LinkButton; ?> <div style="padding:2em; text-align:center; vertical-align: middle; background-color: #e7ebf1; margin-bottom: 20px;"> - <form action="<?= $controller->link_for('/index') ?>" method="post"> + <form action="<?= $controller->action_link('index') ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <input type="text" style="width:50%;" name="sterm" value="<?= htmlReady($input_search) ?>"> <input type="hidden" name="do_search" value="1"> @@ -51,7 +51,7 @@ $pagination->set_attribute('perPage', MVVController::$items_per_page); $pagination->set_attribute('num_postings', $count); $pagination->set_attribute('page', $page); - $page_link = reset(explode('?', $controller->url_for('/index'))) . '?page_module=%s'; + $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_module=%s'; $pagination->set_attribute('pagelink', $page_link); echo $pagination->render('shared/pagechooser'); ?> diff --git a/app/views/search/stgtable/index.php b/app/views/search/stgtable/index.php index 58a7bce0588c85284f8c119126f864804c8a263a..1e54e0652655828e8ea49ea8252a15c5ba505ec0 100644 --- a/app/views/search/stgtable/index.php +++ b/app/views/search/stgtable/index.php @@ -20,7 +20,7 @@ <? foreach ($kategorien as $kat_id => $kategorie): ?> <? if ($stg[$kat_id]) : ?> <td style="text-align: center;"> - <a href="<?= $controller->link_for('/studiengang', $stg[$kat_id]) ?>"><?= Icon::create('info-circle-full', 'clickable', ['title' => _('Studiengang anzeigen')])->asImg(); ?></a> + <a href="<?= $controller->action_link('studiengang', $stg[$kat_id]) ?>"><?= Icon::create('info-circle-full', 'clickable', ['title' => _('Studiengang anzeigen')])->asImg(); ?></a> </td> <? else : ?> <td></td> diff --git a/app/views/search/studiengaenge/info.php b/app/views/search/studiengaenge/info.php index e834588bce2da08ada06d3a56347750db78eeeae..0e78c1e00d643e725f250f32e2eff2f63e5d8bb7 100644 --- a/app/views/search/studiengaenge/info.php +++ b/app/views/search/studiengaenge/info.php @@ -29,7 +29,7 @@ </style> <div style="width: 100%; text-align: right;"> <? foreach (Config::get()->CONTENT_LANGUAGES as $locale => $language) : ?> - <a data-dialog="title='<?= htmlReady($studiengang->getDisplayName()) ?>'" href="<?= $controller->url_for('/info/' . $studiengang->id . '/', ['language' => $locale]) ?>"> + <a data-dialog="title='<?= htmlReady($studiengang->getDisplayName()) ?>'" href="<?= $controller->action_link('info/' . $studiengang->id . '/', ['language' => $locale]) ?>"> <img src="<?= Assets::image_path('languages/' . $language['picture']) ?>" alt="<?= $language['name'] ?>" title="<?= $language['name'] ?>"> </a> <? endforeach ?> diff --git a/app/views/shared/chooser_form.php b/app/views/shared/chooser_form.php index e5e8f925e0cbd630f0a2f8bdd5584820f44fc1b4..bb5e47e482b0b01b964cd97cdc459355bc9f1f96 100644 --- a/app/views/shared/chooser_form.php +++ b/app/views/shared/chooser_form.php @@ -1,4 +1,4 @@ -<form action="<?= $list['stop'] ? $controller->url_for('/index') : $controller->url_for('/chooser'); ?>" style="width: 100%;" id="<?= htmlReady($name) ?>"> +<form action="<?= $list['stop'] ? $controller->action_link('index') : $controller->action_link('chooser'); ?>" style="width: 100%;" id="<?= htmlReady($name) ?>"> <? if (is_array($list['elements']) && sizeof($list['elements'])) : ?> <input type="hidden" name="step" value="<?= htmlReady($name) ?>"> <? if ($list['stop']) : ?> diff --git a/app/views/shared/contacts/add_ansprechpartner.php b/app/views/shared/contacts/add_ansprechpartner.php index 30317bcb84162b0e01cfc385b783ca9ea40274fd..73e725b37278c5ad05a150c0bab21fdb23f08d17 100644 --- a/app/views/shared/contacts/add_ansprechpartner.php +++ b/app/views/shared/contacts/add_ansprechpartner.php @@ -27,7 +27,7 @@ jQuery(function ($) { }); </script> -<form class="default" action="<?= $controller->url_for('/add_ansprechpartner',$origin, $range_type, $range_id, $user_id, $ansp_kat) ?>" method="post" data-dialog="size=auto"> +<form class="default" action="<?= $controller->action_link('add_ansprechpartner',$origin, $range_type, $range_id, $user_id, $ansp_kat) ?>" method="post" data-dialog="size=auto"> <input type="hidden" name="user_id" id="user_id" value="<?= htmlReady($user_id) ?>"> <input type="hidden" name="range_id" id="range_id" value="<?= htmlReady($range_id) ?>"> <input type="hidden" name="range_type" id="range_type" value="<?= htmlReady($range_type) ?>"> diff --git a/app/views/shared/contacts/add_ranges_to_contact.php b/app/views/shared/contacts/add_ranges_to_contact.php index f4a428e4d70b978cc8c83205de475a37e30786e7..389e72cf65730feec0640892e0802908df509948 100644 --- a/app/views/shared/contacts/add_ranges_to_contact.php +++ b/app/views/shared/contacts/add_ranges_to_contact.php @@ -1,4 +1,4 @@ -<form class="default" action="<?= $controller->url_for('/add_ranges_to_contact', $mvvcontact_id, $range_type) ?>" method="post" data-dialog="size=auto"> +<form class="default" action="<?= $controller->action_link('add_ranges_to_contact', $mvvcontact_id, $range_type) ?>" method="post" data-dialog="size=auto"> <label> <? if ($range_type == 'Studiengang'): ?> diff --git a/app/views/shared/contacts/edit_ansprechpartner.php b/app/views/shared/contacts/edit_ansprechpartner.php index fed2665dfd43c596d2b0689c10f2056d5d955dcf..ec5357271e29328dd69b9605a668c598006e3476 100644 --- a/app/views/shared/contacts/edit_ansprechpartner.php +++ b/app/views/shared/contacts/edit_ansprechpartner.php @@ -1,4 +1,4 @@ -<form class="default" action="<?= $controller->url_for('/store_ansprechpartner', $contact_range->contact_range_id, $origin) ?>" method="post" data-dialog="size=auto"> +<form class="default" action="<?= $controller->action_link('store_ansprechpartner', $contact_range->contact_range_id, $origin) ?>" method="post" data-dialog="size=auto"> <fieldset> <legend> <?= _('Personendaten') ?> diff --git a/app/views/shared/contacts/index.php b/app/views/shared/contacts/index.php index ab7698341abc2dccec685cd47aeb28fd2a73f3c1..2d18dc7c7af6b085bc94082130ae6b659d15c2cf 100644 --- a/app/views/shared/contacts/index.php +++ b/app/views/shared/contacts/index.php @@ -82,7 +82,7 @@ $pagination->set_attribute('perPage', MVVController::$items_per_page); $pagination->set_attribute('num_postings', $count); $pagination->set_attribute('page', $page); - $page_link = reset(explode('?', $controller->url_for('/index'))) . '?page_contacts=%s'; + $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_contacts=%s'; $pagination->set_attribute('pagelink', $page_link); echo $pagination->render('shared/pagechooser'); ?> diff --git a/app/views/shared/contacts/new_ansprechpartner.php b/app/views/shared/contacts/new_ansprechpartner.php index 0dea8ba6e818e89354b43415ac54650abb297014..2c4b700d3c56412f30b0512509412c23d770cc95 100644 --- a/app/views/shared/contacts/new_ansprechpartner.php +++ b/app/views/shared/contacts/new_ansprechpartner.php @@ -1,4 +1,4 @@ -<form class="default" action="<?= $controller->url_for('/new_ansprechpartner') ?>" method="post" data-dialog="size=auto"> +<form class="default" action="<?= $controller->action_link('new_ansprechpartner') ?>" method="post" data-dialog="size=auto"> <label> <select id="mvv-contacts-range_types" name="range_type"> diff --git a/app/views/shared/contacts/select_range.php b/app/views/shared/contacts/select_range.php index 3de2e35b1689b6c339c8884cf02a3d2b71167363..41d5195b931f1edfa5f20ca713efc1d365ad7014 100644 --- a/app/views/shared/contacts/select_range.php +++ b/app/views/shared/contacts/select_range.php @@ -1,4 +1,4 @@ -<form class="default" action="<?= $controller->url_for('/select_range', $range_type) ?>" method="post" data-dialog="size=auto"> +<form class="default" action="<?= $controller->action_link('select_range', $range_type) ?>" method="post" data-dialog="size=auto"> <?= CSRFProtection::tokenTag(); ?> <label> diff --git a/app/views/shared/contacts/select_range_type.php b/app/views/shared/contacts/select_range_type.php index b4ec9a1e3cbac42fa6a9b35119644f476337c54c..8a96447eb7d0d9933d0aa0c2d3d3c405eb385063 100644 --- a/app/views/shared/contacts/select_range_type.php +++ b/app/views/shared/contacts/select_range_type.php @@ -1,4 +1,4 @@ -<form class="default" action="<?= $controller->url_for('/select_range_type', $mvvcontact_id) ?>" method="post" data-dialog="size=auto"> +<form class="default" action="<?= $controller->action_link('select_range_type', $mvvcontact_id) ?>" method="post" data-dialog="size=auto"> <label> <select id="mvv-contacts-range_types" name="range_type"> diff --git a/app/views/shared/contacts/sort.php b/app/views/shared/contacts/sort.php index 779cfff452451738647f225a0d77bf5ddc1b3b7d..7ca3015f2f5bf5cd65df0b33e321ee669c29e7bf 100644 --- a/app/views/shared/contacts/sort.php +++ b/app/views/shared/contacts/sort.php @@ -20,7 +20,7 @@ jQuery(function ($) { </div> </div> -<form class="default" id="order_form" action="<?= $controller->url_for('/sort', $range_id) ?>" method="POST" data-dialog="size=auto"> +<form class="default" id="order_form" action="<?= $controller->action_link('sort', $range_id) ?>" method="POST" data-dialog="size=auto"> <input type="hidden" name="ordering" id="ordering"> <footer data-dialog-button> <?= Studip\Button::createAccept(_('Speichern'), 'order') ?> diff --git a/app/views/shared/modul/description.php b/app/views/shared/modul/description.php index 5aac3785634deb96f5e5574b4ee5a7dcd64a75db..df6425f3b5fa27118b5eaa532c36eb09ac876d36 100644 --- a/app/views/shared/modul/description.php +++ b/app/views/shared/modul/description.php @@ -2,7 +2,7 @@ <div style="width: 100%; text-align: right;"> <? foreach ($modul->deskriptoren->getAvailableTranslations() as $language) : ?> <? $lang = $GLOBALS['MVV_MODUL_DESKRIPTOR']['SPRACHE']['values'][$language]; ?> - <a data-dialog="size=auto;title='<?= htmlReady($modul->getDisplayName()) ?>'" href="<?= $controller->url_for('/description/' . $modul->id . '/', ['display_language' => $language]) ?>"> + <a data-dialog="size=auto;title='<?= htmlReady($modul->getDisplayName()) ?>'" href="<?= $controller->action_link('description/' . $modul->id . '/', ['display_language' => $language]) ?>"> <img src="<?= Assets::image_path('languages/lang_' . mb_strtolower($language) . '.gif') ?>" alt="<?= $lang['name'] ?>" title="<?= $lang['name'] ?>"> </a> <? endforeach; ?> diff --git a/app/views/shared/studiengang/description.php b/app/views/shared/studiengang/description.php index 4bf881abc9ef0ce0850119dad1e4d57bf0b08c69..c52deed2572bfbaeb428ca7634a079341908272b 100644 --- a/app/views/shared/studiengang/description.php +++ b/app/views/shared/studiengang/description.php @@ -2,7 +2,7 @@ <? if (count($languages) > 1): ?> <div style="width: 100%; text-align: right;"> <? foreach ($languages as $language) : ?> - <a data-dialog="size=auto;title='<?= htmlReady($stg->getDisplayName()) ?>'" href="<?= $controller->url_for('/description/' . $stg->id . '/', array('display_language' => $language)) ?>"> + <a data-dialog="size=auto;title='<?= htmlReady($stg->getDisplayName()) ?>'" href="<?= $controller->action_link('description/' . $stg->id . '/', array('display_language' => $language)) ?>"> <img src="<?= Assets::image_path('languages/' . $language['picture']) ?>" alt="<?= $language['name'] ?>" title="<?= $language['name'] ?>"> </a> <? endforeach; ?> diff --git a/app/views/studiengaenge/abschluesse/index.php b/app/views/studiengaenge/abschluesse/index.php index 59610f8a2e7f318dd3d2375b54d62fd1c3d451be..f11ad6a4849e748f101d863f93696afff4a8c952 100644 --- a/app/views/studiengaenge/abschluesse/index.php +++ b/app/views/studiengaenge/abschluesse/index.php @@ -17,13 +17,13 @@ <tr class="header-row" id="abschluss_<?= $abschluss->id ?>"> <td class="toggle-indicator"> <? if (is_null($abschluss->name) && $abschluss->count_studiengaenge) : ?> - <a class="mvv-load-in-new-row" href="<?= $controller->link_for('/details/' . $abschluss->id) ?>"> + <a class="mvv-load-in-new-row" href="<?= $controller->action_link('details/' . $abschluss->id) ?>"> <?= _('Keinem Abschluss zugeordnet') ?> </a> <? else : ?> <? if ($abschluss->count_studiengaenge) : ?> <a class="mvv-load-in-new-row" - href="<?= $controller->link_for('/details/' . $abschluss->id) ?>"> + href="<?= $controller->action_link('details/' . $abschluss->id) ?>"> <?= htmlReady($abschluss->getDisplayName()) ?> </a> <? else : ?> diff --git a/app/views/studiengaenge/fachbereiche/index.php b/app/views/studiengaenge/fachbereiche/index.php index d666e89fc9a5d3f7af20feed6af7dde0a5fd3089..b66697edfc6a3c419ec408d388dac38a1f8646dd 100644 --- a/app/views/studiengaenge/fachbereiche/index.php +++ b/app/views/studiengaenge/fachbereiche/index.php @@ -18,13 +18,13 @@ <td class="toggle-indicator"> <? if (is_null($fachbereich->name) && $fachbereich->count_objects) : ?> <a class="mvv-load-in-new-row" - href="<?= $controller->url_for('/details/' . $fachbereich->id) ?>"> + href="<?= $controller->action_link('details/' . $fachbereich->id) ?>"> <?= _('Keinem Fachbereich zugeordnet') ?> </a> <? else : ?> <? if ($fachbereich->count_objects) : ?> <a class="mvv-load-in-new-row" - href="<?= $controller->url_for('/details/' . $fachbereich->id) ?>"> + href="<?= $controller->action_link('details/' . $fachbereich->id) ?>"> <?= htmlReady($fachbereich->getDisplayName()) ?> </a> <? else : ?> diff --git a/app/views/studiengaenge/fachbereichestgteile/index.php b/app/views/studiengaenge/fachbereichestgteile/index.php index f8c95ef6de4d5702960dec9abcf917e89c957ef8..24f44298d0ed908f94a8934c17cf25ecb75ccbb9 100644 --- a/app/views/studiengaenge/fachbereichestgteile/index.php +++ b/app/views/studiengaenge/fachbereichestgteile/index.php @@ -13,7 +13,7 @@ <td class="toggle-indicator"> <? if ($fachbereich['stgteile']) : ?> <a class="mvv-load-in-new-row" - href="<?= $controller->url_for('/details_fachbereich/' . $fachbereich['institut_id']) ?>"> + href="<?= $controller->action_link('details_fachbereich/' . $fachbereich['institut_id']) ?>"> <?= htmlReady($fachbereich['name']) ?> </a> <? else: ?> @@ -22,7 +22,7 @@ </td> <td class="actions dont-hide" style="white-space: nowrap;"> <? if (MvvPerm::havePermCreate('StudiengangTeil')) : ?> - <a href="<?= $controller->url_for('/stgteil_fachbereich/' . $fachbereich['institut_id']) ?>"> + <a href="<?= $controller->action_link('stgteil_fachbereich/' . $fachbereich['institut_id']) ?>"> <?= Icon::create('file', Icon::ROLE_CLICKABLE , ['title' => _('Neuen Studiengangteil in diesem Fachbereich anlegen')])->asImg(); ?> </a> <? endif; ?> diff --git a/app/views/studiengaenge/faecher/index.php b/app/views/studiengaenge/faecher/index.php index a71ed08dea661fedff2ffe470530ae9d2d5a4e08..d9540bcd0b77012b2c69410e4283122c18a1337d 100644 --- a/app/views/studiengaenge/faecher/index.php +++ b/app/views/studiengaenge/faecher/index.php @@ -18,7 +18,7 @@ <td class="toggle-indicator"> <? if ($fach->count_stgteile) : ?> <a class="mvv-load-in-new-row" - href="<?= $controller->url_for('/details_fach/' . $fach->id) ?>"> + href="<?= $controller->action_link('details_fach/' . $fach->id) ?>"> <?= htmlReady($fach->name) ?> </a> <? else: ?> @@ -28,7 +28,7 @@ <td style="text-align: center;" class="dont-hide"><?= $fach->count_stgteile ?> </td> <td class="dont-hide actions"> <? if (MvvPerm::havePermCreate('StudiengangTeil')) : ?> - <a href="<?= $controller->url_for('/stgteil_fach/' . $fach->id) ?>"> + <a href="<?= $controller->action_link('stgteil_fach/' . $fach->id) ?>"> <?= Icon::create('file', Icon::ROLE_CLICKABLE ,['title' => _('Neuen Studiengangteil für gewähltes Fach anlegen')])->asImg(); ?> </a> <? endif; ?> @@ -51,7 +51,7 @@ $pagination->set_attribute('perPage', MVVController::$items_per_page); $pagination->set_attribute('num_postings', $count); $pagination->set_attribute('page', $page); - $page_link = reset(explode('?', $controller->url_for('/index'))) . '?page_faecher=%s'; + $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_faecher=%s'; $pagination->set_attribute('pagelink', $page_link); echo $pagination->render("shared/pagechooser"); ?> diff --git a/app/views/studiengaenge/informationen/degree.php b/app/views/studiengaenge/informationen/degree.php index 2fe86a826e92c6d239e8b4e26e2abef76f379871..68d53367039c4ef55a48d1528151097799dd4dd4 100644 --- a/app/views/studiengaenge/informationen/degree.php +++ b/app/views/studiengaenge/informationen/degree.php @@ -17,7 +17,7 @@ <tr class="table-header header-row"> <td class="toggle-indicator"> <a id="<?= $deg->abschluss_id ?>" class="mvv-load-in-new-row" - href="<?= $controller->url_for('/showstudycourse', $deg->abschluss_id, $key + 1) ?>"> + href="<?= $controller->action_link('showstudycourse', $deg->abschluss_id, $key + 1) ?>"> <?= htmlReady($deg->name) ?> </a> </td> diff --git a/app/views/studiengaenge/kategorien/index.php b/app/views/studiengaenge/kategorien/index.php index 7bd291d7043ea150dd709440c1f72524380f93e8..769c2872f1bf8df62e3f2dcb404dec54c725661b 100644 --- a/app/views/studiengaenge/kategorien/index.php +++ b/app/views/studiengaenge/kategorien/index.php @@ -18,13 +18,13 @@ <td class="toggle-indicator"> <? if (is_null($kategorie->name) && $kategorie->count_studiengaenge) : ?> <a class="mvv-load-in-new-row" - href="<?= $controller->url_for('/details/' . $kategorie->id) ?>"> + href="<?= $controller->action_link('details/' . $kategorie->id) ?>"> <?= _('Keiner Abschluss-Kategorie zugeordnet') ?> </a> <? else : ?> <? if ($kategorie->count_studiengaenge) : ?> <a class="mvv-load-in-new-row" - href="<?= $controller->url_for('/details/' . $kategorie->id) ?>"> + href="<?= $controller->action_link('details/' . $kategorie->id) ?>"> <?= htmlReady($kategorie->getDisplayName()) ?> </a> <? else : ?> diff --git a/app/views/studiengaenge/stgteilbezeichnungen/index.php b/app/views/studiengaenge/stgteilbezeichnungen/index.php index f1618b0259342e7f9849cd4b0a9ad33deddc6d83..c9378eee0573c637a220e8418813d45e93c13a6b 100644 --- a/app/views/studiengaenge/stgteilbezeichnungen/index.php +++ b/app/views/studiengaenge/stgteilbezeichnungen/index.php @@ -22,7 +22,7 @@ <tr class="header-row sort_item"> <td class="toggle-indicator"> <a class="mvv-load-in-new-row" - href="<?= $controller->url_for('/details/' . $stgteilbezeichnung->id) ?>"> + href="<?= $controller->action_link('details/' . $stgteilbezeichnung->id) ?>"> <?= htmlReady($stgteilbezeichnung->name) ?> </a> </td> @@ -35,14 +35,14 @@ <td class="dont-hide actions"> <? if ($perm->havePermWrite()) : ?> <a data-dialog - href="<?= $controller->url_for('/stgteilbezeichnung/' . $stgteilbezeichnung->id) ?>"> + href="<?= $controller->action_link('stgteilbezeichnung/' . $stgteilbezeichnung->id) ?>"> <?= Icon::create('edit', Icon::ROLE_CLICKABLE ,['title' => _('Studiengangteil-Bezeichnung bearbeiten')])->asImg(); ?> </a> <? endif; ?> <? if ($perm->havePermCreate() && $stgteilbezeichnung->count_stgteile < 1) : ?> <?= Icon::create('trash', Icon::ROLE_CLICKABLE , ['title' => _('Studiengangteil-Bezeichnung löschen')]) ->asInput([ - 'formaction' => $controller->url_for('/delete/' . $stgteilbezeichnung->id), + 'formaction' => $controller->action_url('delete/' . $stgteilbezeichnung->id), 'data-confirm' => sprintf(_('Wollen Sie wirklich die Studiengangteil-Bezeichnung "%s" löschen?'), htmlReady($stgteilbezeichnung->name)),]) ?> <? endif; ?> </td> diff --git a/app/views/studiengaenge/studiengaenge/approve.php b/app/views/studiengaenge/studiengaenge/approve.php index c8b8af045dadc78f0ebd2fd6210808489bae5b81..6331b00986ab990aa89cf768e2b778642a100cda 100644 --- a/app/views/studiengaenge/studiengaenge/approve.php +++ b/app/views/studiengaenge/studiengaenge/approve.php @@ -1,4 +1,4 @@ -<form data-dialog="reload-on-close" name="approve" action="<?= $controller->url_for('/approve', $studiengang_id) ?>" +<form data-dialog="reload-on-close" name="approve" action="<?= $controller->action_link('approve', $studiengang_id) ?>" method="post" style="margin-left: auto; margin-right: auto;"> <?= $this->render_partial('shared/studiengang/_studiengang', ['studiengang' => $studiengang, 'institut' => $institut]); ?> <? if (count($studiengang->stgteil_assignments)) : ?> diff --git a/app/views/studiengaenge/studiengaenge/index.php b/app/views/studiengaenge/studiengaenge/index.php index 8919c62575768f3577beead1328a76002fd5d19c..f144269f226d76cdd2d283aef27bdae1c38613d0 100644 --- a/app/views/studiengaenge/studiengaenge/index.php +++ b/app/views/studiengaenge/studiengaenge/index.php @@ -31,7 +31,7 @@ $pagination->set_attribute('perPage', MVVController::$items_per_page); $pagination->set_attribute('num_postings', $count); $pagination->set_attribute('page', $page); - $page_link = reset(explode('?', $controller->url_for('/index'))) . '?page_studiengaenge=%s'; + $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_studiengaenge=%s'; $pagination->set_attribute('pagelink', $page_link); echo $pagination->render('shared/pagechooser'); ?> diff --git a/app/views/studiengaenge/studiengaenge/stgteil_bezeichnungen.php b/app/views/studiengaenge/studiengaenge/stgteil_bezeichnungen.php index 4208227aaf084517136d847f1dbdd2ae2aa752ff..8a1b6a81eb450bb6391ddabd622f620bc6ae0670 100644 --- a/app/views/studiengaenge/studiengaenge/stgteil_bezeichnungen.php +++ b/app/views/studiengaenge/studiengaenge/stgteil_bezeichnungen.php @@ -11,7 +11,7 @@ <td class="toggle-indicator"> <? if ($bez_stgteil->count_stgteile) : ?> <a class="mvv-load-in-new-row" - href="<?= $controller->url_for('/details_studiengang', $studiengang->id, $bez_stgteil->id) ?>"> + href="<?= $controller->action_link('details_studiengang', $studiengang->id, $bez_stgteil->id) ?>"> <?= htmlReady($bez_stgteil->name) ?> </a> <? else : ?> @@ -32,7 +32,7 @@ <tr> <td colspan="3"> <form style="width: 100%;" - action="<?= $controller->url_for('/add_stgteil/' . $studiengang->id) ?>" method="post"> + action="<?= $controller->action_link('add_stgteil/' . $studiengang->id) ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <div style="float: left; padding-right: 10px;"><?= _('Studiengangteil hinzufügen') ?></div> <div style="float: left; padding-right: 10px;"> diff --git a/app/views/studiengaenge/studiengaenge/studiengaenge.php b/app/views/studiengaenge/studiengaenge/studiengaenge.php index 78a1eab4a74e1bbeec774e49a08f78b857ff44e9..6932aef668b706e6d5468fb7e4e8e74b4597a273 100644 --- a/app/views/studiengaenge/studiengaenge/studiengaenge.php +++ b/app/views/studiengaenge/studiengaenge/studiengaenge.php @@ -4,7 +4,7 @@ <tr class="table-header header-row" id="studiengang_<?= $studiengang->id ?>"> <td class="toggle-indicator"> <a class="mvv-load-in-new-row" - href="<?= $controller->url_for('/details_studiengang/' . $studiengang->id) ?>"> + href="<?= $controller->action_link('details_studiengang/' . $studiengang->id) ?>"> <? $ampel_icon = $GLOBALS['MVV_STUDIENGANG']['STATUS']['values'][$studiengang->stat]['icon'] ?> <? $ampelstatus = $GLOBALS['MVV_STUDIENGANG']['STATUS']['values'][$studiengang->stat]['name'] ?> <? if ($ampel_icon) : ?> @@ -41,7 +41,7 @@ <? $actionMenu = ActionMenu::get()->setContext($studiengang->name) ?> <? if ($studiengang->stat === 'planung' && MvvPerm::haveFieldPermStat($studiengang)) : ?> <? $actionMenu->addLink( - $controller->url_for('/approve/' . $studiengang->id), + $controller->action_url('approve/' . $studiengang->id), _('Studiengang genehmigen'), Icon::create('accept', Icon::ROLE_CLICKABLE , ['title' => _('Studiengang genehmigen')]), ['data-dialog' => 'buttons=false']) @@ -49,7 +49,7 @@ <? endif; ?> <? if ($perm->havePerm(MvvPerm::PERM_WRITE)) : ?> <? $actionMenu->addLink( - $controller->url_for('/studiengang/' . $studiengang->id), + $controller->action_url('studiengang/' . $studiengang->id), _('Studiengang bearbeiten'), Icon::create('edit', Icon::ROLE_CLICKABLE , ['title' => _('Studiengang bearbeiten')])) ?> @@ -61,7 +61,7 @@ _('Studiengang löschen'), Icon::create('trash', Icon::ROLE_CLICKABLE ,tooltip2(_('Studiengang löschen'))), [ - 'formaction' => $controller->url_for('/delete/' . $studiengang->id), + 'formaction' => $controller->action_url('delete/' . $studiengang->id), 'data-confirm' => sprintf(_('Wollen Sie wirklich den Studiengang "%s" löschen?'), htmlReady($studiengang->name)) ] ) ?> diff --git a/app/views/studiengaenge/studiengaenge/studiengang.php b/app/views/studiengaenge/studiengaenge/studiengang.php index b9783c367414f242082ce6566893630114b75f46..01044cf3a052694182d5a00e6e02aedfdfe6f7f2 100644 --- a/app/views/studiengaenge/studiengaenge/studiengang.php +++ b/app/views/studiengaenge/studiengaenge/studiengang.php @@ -1,7 +1,7 @@ <? use Studip\Button, Studip\LinkButton; ?> <?= $controller->jsUrl() ?> <? $perm = MvvPerm::get($studiengang) ?> -<form class="default" action="<?= $controller->link_for('/studiengang', $studiengang->id) ?>" method="post"> +<form class="default" action="<?= $controller->action_link('studiengang', $studiengang->id) ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <fieldset class="collapsable"> @@ -352,7 +352,7 @@ <?= Button::createAccept(_('Übernehmen'), 'store', [ 'title' => _('Änderungen übernehmen'), - 'formaction' => $controller->url_for('/studiengang', $studiengang->id), + 'formaction' => $controller->action_url('studiengang', $studiengang->id), 'formmethod' => 'post' ]) ?> <? endif ?> diff --git a/app/views/studiengaenge/studiengaenge/studiengangteile.php b/app/views/studiengaenge/studiengaenge/studiengangteile.php index 1b055cc46bcfd9b831af00a212733e785142934c..58a11e3567f33cc373aa38caecfdd071647d9ec1 100644 --- a/app/views/studiengaenge/studiengaenge/studiengangteile.php +++ b/app/views/studiengaenge/studiengaenge/studiengangteile.php @@ -17,7 +17,7 @@ htmlReady($stg_bez->getDisplayName()), htmlReady($studiengang->getDisplayName()) ) ?> - <form action="<?= $controller->url_for('/delete_stgteilmf/' . $studiengang->id, $stgteil->id, $stg_bez->id) ?>" + <form action="<?= $controller->action_link('delete_stgteilmf/' . $studiengang->id, $stgteil->id, $stg_bez->id) ?>" method="post"> <?= CSRFProtection::tokenTag(); ?> <?= Icon::create( @@ -32,7 +32,7 @@ htmlReady($stgteil->getDisplayName()), htmlReady($studiengang->getDisplayName()) ) ?> - <form action="<?= $controller->url_for('/delete_stgteil/' . $studiengang->id, $stgteil->id) ?>" + <form action="<?= $controller->action_link('delete_stgteil/' . $studiengang->id, $stgteil->id) ?>" method="post"> <?= CSRFProtection::tokenTag(); ?> <?= Icon::create( @@ -52,7 +52,7 @@ <tr> <td colspan="2"> <form style="width: 100%;" - action="<?= $controller->url_for('/add_stgteil/' . $studiengang->id) ?>" method="post"> + action="<?= $controller->action_link('add_stgteil/' . $studiengang->id) ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <?= _('Studiengangteil hinzufügen') ?></div> <?= $search->render() ?> diff --git a/app/views/studiengaenge/studiengangteile/details_grouped.php b/app/views/studiengaenge/studiengangteile/details_grouped.php index ab4cd519b8931c859099d61e7f79934aed0f0ca4..19830150e859de1e957a206bf8283aed4d138dc8 100644 --- a/app/views/studiengaenge/studiengangteile/details_grouped.php +++ b/app/views/studiengaenge/studiengangteile/details_grouped.php @@ -13,14 +13,14 @@ <? $actionMenu = ActionMenu::get()->setContext($stgteil->fach_name) ?> <? if (MvvPerm::havePermWrite($stgteil)) : ?> <? $actionMenu->addLink( - $controller->url_for('/stgteil/' . $stgteil->id), + $controller->action_url('stgteil/' . $stgteil->id), _('Studiengangteil bearbeiten'), Icon::create('edit', Icon::ROLE_CLICKABLE , ['title' => _('Studiengangteil bearbeiten')])) ?> <? endif; ?> <? if (MvvPerm::havePermCreate($stgteil)) : ?> <? $actionMenu->addLink( - $controller->url_for('/copy/' . $stgteil->id), + $controller->action_url('copy/' . $stgteil->id), _('Studiengangteil kopieren'), Icon::create('files', Icon::ROLE_CLICKABLE , ['title' => _('Studiengangteil kopieren')])) ?> @@ -33,7 +33,7 @@ 'trash', Icon::ROLE_CLICKABLE , ['title' => _('Studiengangteil löschen'), - 'formaction' => $controller->url_for('/delete/' . $stgteil->getId()), + 'formaction' => $controller->action_url('delete/' . $stgteil->getId()), 'data-confirm' => sprintf(_('Wollen Sie wirklich den Studiengangteil "%s" löschen?'), htmlReady($stgteil->getDisplayName()))] )) ?> diff --git a/app/views/studiengaenge/studiengangteile/index.php b/app/views/studiengaenge/studiengangteile/index.php index 68fedb487675892f8c4c2e836d2e8a8bc17fce49..8deede03f937a4b76168b0075fe821aa32056ae3 100644 --- a/app/views/studiengaenge/studiengangteile/index.php +++ b/app/views/studiengaenge/studiengangteile/index.php @@ -22,7 +22,7 @@ <td class="toggle-indicator"> <? if ($stgteil->count_versionen) : ?> <a class="mvv-load-in-new-row" - href="<?= $controller->url_for('/details/' . $stgteil->getId()) ?>"> + href="<?= $controller->action_link('details/' . $stgteil->getId()) ?>"> <?= htmlReady($stgteil->fach_name) ?> <? if ($stgteil->count_contacts) : ?> <?= Icon::create('community', Icon::ROLE_INFO, ['title' => sprintf(ngettext('%s Kontakt zugeordnet', '%s Kontakte zugeordnet', $stgteil->count_contacts), $stgteil->count_contacts)]) ?> @@ -42,21 +42,21 @@ <? $actionMenu = ActionMenu::get()->setContext($stgteil->fach_name) ?> <? if (MvvPerm::havePermCreate('StgteilVersion')) : ?> <? $actionMenu->addLink( - $controller->url_for('/version/' . $stgteil->getId()), + $controller->action_url('version/' . $stgteil->getId()), _('Neue Version anlegen'), Icon::create('file', Icon::ROLE_CLICKABLE, ['title' => _('Neue Version anlegen')]) ) ?> <? endif; ?> <? if (MvvPerm::havePermWrite($stgteil)) : ?> <? $actionMenu->addLink( - $controller->url_for('/stgteil/' . $stgteil->getId()), + $controller->action_url('stgteil/' . $stgteil->getId()), _('Studiengangteil bearbeiten'), Icon::create('edit', Icon::ROLE_CLICKABLE, ['title' => _('Studiengangteil bearbeiten')]) ) ?> <? endif; ?> <? if (MvvPerm::havePermCreate('StudiengangTeil')) : ?> <? $actionMenu->addLink( - $controller->url_for('/copy/' . $stgteil->getId()), + $controller->action_url('copy/' . $stgteil->getId()), _('Studiengangteil kopieren'), Icon::create('files', Icon::ROLE_CLICKABLE, ['title' => _('Studiengangteil kopieren')]) ) ?> @@ -67,7 +67,7 @@ _('Studiengangteil löschen'), Icon::create('trash', Icon::ROLE_CLICKABLE, [ 'title' => _('Studiengangteil löschen'), - 'formaction' => $controller->url_for('/delete/' . $stgteil->getId()), + 'formaction' => $controller->action_url('delete/' . $stgteil->getId()), 'data-confirm' => sprintf(_('Wollen Sie wirklich den Studiengangteil "%s" löschen?'), htmlReady($stgteil->getDisplayName())), ]) ) ?> @@ -88,7 +88,7 @@ <tr> <td colspan="5" style="text-align: right;"> <? - $page_link = reset(explode('?', $controller->url_for('/index'))) . '?page_studiengangteile=%s'; + $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_studiengangteile=%s'; $pagination = $GLOBALS['template_factory']->open('shared/pagechooser'); $pagination->clear_attributes(); diff --git a/app/views/studiengaenge/studiengangteile/stgteil.php b/app/views/studiengaenge/studiengangteile/stgteil.php index ce18fddbe7a50c331f651bf0256a672df5a42989..100fda95caba61110cf409cf2b8f07cbe519b413 100644 --- a/app/views/studiengaenge/studiengangteile/stgteil.php +++ b/app/views/studiengaenge/studiengangteile/stgteil.php @@ -2,7 +2,7 @@ <?= $controller->jsUrl() ?> <? $perm = MvvPerm::get($stgteil) ?> -<form class="default" action="<?= $controller->url_for('/stgteil/' . $stgteil->id) ?>" method="post"> +<form class="default" action="<?= $controller->action_link('stgteil/' . $stgteil->id) ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <fieldset class="collapsable"> diff --git a/app/views/studiengaenge/versionen/abschnitt.php b/app/views/studiengaenge/versionen/abschnitt.php index dccc3e0c70add6ea6b07c1e47da1be578ebbea3a..21543058793ed492d697db271055e8b747783375 100644 --- a/app/views/studiengaenge/versionen/abschnitt.php +++ b/app/views/studiengaenge/versionen/abschnitt.php @@ -1,7 +1,7 @@ <? use Studip\Button, Studip\LinkButton; ?> <? $perm = MvvPerm::get($abschnitt) ?> -<form class="default" action="<?= $controller->url_for('/abschnitt/' . $abschnitt->id) ?>" method="post"> +<form class="default" action="<?= $controller->action_link('abschnitt/' . $abschnitt->id) ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <fieldset> <legend><?= _('Grunddaten') ?></legend> diff --git a/app/views/studiengaenge/versionen/abschnitte.php b/app/views/studiengaenge/versionen/abschnitte.php index 83b90c221b3b215d1bbbdb3e87890d1cd40a7d80..34ce8c66ffa5d49c385a5694a7ffb1bfbe7f28ac 100644 --- a/app/views/studiengaenge/versionen/abschnitte.php +++ b/app/views/studiengaenge/versionen/abschnitte.php @@ -10,7 +10,7 @@ <tr class="header-row sort_item" id="abschnittt_<?= $abschnitt->id ?>"> <td class="toggle-indicator"> <a class="mvv-load-in-new-row" - href="<?= $controller->url_for('/details_abschnitt/' . $abschnitt->id) ?>"> + href="<?= $controller->action_link('details_abschnitt/' . $abschnitt->id) ?>"> <?= htmlReady($abschnitt->name) ?> </a> </td> @@ -20,7 +20,7 @@ <? $actionMenu = ActionMenu::get()->setContext($abschnitt->name) ?> <? if (MvvPerm::havePermWrite($version)) : ?> <? $actionMenu->addLink( - $controller->url_for('/abschnitt/' . $abschnitt->id), + $controller->action_url('abschnitt/' . $abschnitt->id), _('Studiengangteil-Abschnitt bearbeiten'), Icon::create('edit', Icon::ROLE_CLICKABLE, tooltip2(_('Studiengangteil-Abschnitt bearbeiten'))), ['data-dialog' => true]) @@ -33,7 +33,7 @@ _('Studiengangteil-Abschnitt löschen'), Icon::create('trash', Icon::ROLE_CLICKABLE, tooltip2(_('Studiengangteil-Abschnitt löschen'))), [ - 'formaction' => $controller->url_for('/delete_abschnitt/' . $abschnitt->id), + 'formaction' => $controller->action_url('delete_abschnitt/' . $abschnitt->id), 'data-confirm' => sprintf(_('Wollen Sie den Studiengangteil-Abschnitt "%s" wirklich löschen?'), htmlReady($abschnitt->getDisplayName())) ] ) ?> @@ -56,7 +56,7 @@ <tbody> <tr> <td colspan="3"> - <form class="mvv-qsform" action="<?= $controller->link_for('/add_modul/' . $version->id) ?>" + <form class="mvv-qsform" action="<?= $controller->action_link('add_modul/' . $version->id) ?>" method="post"> <?= _('Modul hinzufügen') ?> <?= CSRFProtection::tokenTag() ?> diff --git a/app/views/studiengaenge/versionen/approve.php b/app/views/studiengaenge/versionen/approve.php index 57b61ecc44a4d0cb33c7280d52284a356c4d000c..840ed47f6d9307657aa616f2291aad757afbe046 100644 --- a/app/views/studiengaenge/versionen/approve.php +++ b/app/views/studiengaenge/versionen/approve.php @@ -1,4 +1,4 @@ -<form name="approve" action="<?= $controller->url_for('/approve/' . $version_id) ?>" method="post" +<form name="approve" action="<?= $controller->action_link('approve/' . $version_id) ?>" method="post" style="margin-left: auto; margin-right: auto;"> <? echo $this->render_partial('shared/studiengang/_stgteilversion', ['version' => $version]); ?> <? echo $this->render_partial('shared/version/_versionmodule', ['version' => $version]); ?> diff --git a/app/views/studiengaenge/versionen/details_abschnitt.php b/app/views/studiengaenge/versionen/details_abschnitt.php index da2e6f31f3305c70f01a37c032ea8bd5b7caad5b..e368d69c404ecbcbfd85f8ef55708056833f7f1f 100644 --- a/app/views/studiengaenge/versionen/details_abschnitt.php +++ b/app/views/studiengaenge/versionen/details_abschnitt.php @@ -11,7 +11,7 @@ <tr id="modul_<?= $assignment->modul->id ?>" class="header-row sort_item"> <td class="toggle-indicator"> <? if (count($assignment->modul->modulteile)) : ?> - <a class="mvv-load-in-new-row" href="<?= $controller->url_for('/modulteile', $assignment->id) ?>"><?= htmlReady($assignment->getDisplayName()) ?></a> + <a class="mvv-load-in-new-row" href="<?= $controller->action_link('modulteile', $assignment->id) ?>"><?= htmlReady($assignment->getDisplayName()) ?></a> <? else : ?> <?= htmlReady($assignment->getDisplayName()) ?> <? endif; ?> @@ -24,7 +24,7 @@ </td> <td class="dont-hide actions" style="white-space: nowrap;"> <? if (MvvPerm::haveFieldPermModul_zuordnungen($abschnitt, MvvPerm::PERM_WRITE)) : ?> - <a data-dialog="" href="<?= $controller->link_for('/modul_zuordnung', $assignment->id) ?>"> + <a data-dialog="" href="<?= $controller->action_link('modul_zuordnung', $assignment->id) ?>"> <?= Icon::create('edit', Icon::ROLE_CLICKABLE , tooltip2(_('Modulzuordnung bearbeiten')))->asImg(); ?> </a> <? endif; ?> @@ -32,7 +32,7 @@ <?= Icon::create('trash', Icon::ROLE_CLICKABLE , tooltip2(_('Modulzuordnung löschen'))) ->asInput([ 'name' => 'delete', - 'formaction' => $controller->url_for('/delete_modul', $assignment->abschnitt_id, $assignment->modul_id), + 'formaction' => $controller->action_url('delete_modul', $assignment->abschnitt_id, $assignment->modul_id), 'data-confirm' => sprintf( _('Wollen Sie die Zuordnung des Moduls "%s" zum Studiengangteil-Abschnitt "%s" wirklich löschen?'), htmlReady($assignment->modul->getDisplayName()), @@ -61,7 +61,7 @@ <?= Icon::create('accept', Icon::ROLE_CLICKABLE , tooltip2(_('Modul hinzufügen'))) ->asInput( [ - 'formaction' => $controller->url_for('/add_modul', $version->id), + 'formaction' => $controller->action_url('add_modul', $version->id), 'name' => 'add_modul', 'class' => 'text-top mvv-submit' ] diff --git a/app/views/studiengaenge/versionen/diff_select.php b/app/views/studiengaenge/versionen/diff_select.php index 45a59f18acb68cde25c0da1a9d7af40390a0706b..c1819f393a1ea3c0dda22e98983dcc4b4e9e1d83 100644 --- a/app/views/studiengaenge/versionen/diff_select.php +++ b/app/views/studiengaenge/versionen/diff_select.php @@ -1,7 +1,7 @@ <h1><?= htmlReady($version->getDisplayName()) ?></h1> <div> <h4><?= _('Vergleich mit folgender Version:') ?></h4> - <form data-dialog="size=auto" class="mvv-new-tab" action="<?= $controller->link_for('/diff') ?>" method="post"> + <form data-dialog="size=auto" class="mvv-new-tab" action="<?= $controller->action_link('diff') ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <div> <?= $search_version->render(); ?> diff --git a/app/views/studiengaenge/versionen/index.php b/app/views/studiengaenge/versionen/index.php index e0690243aaa6565c844e4a5cb240069e533d266d..f41d43c9b2c0cf656e0a3b93e19def54b08b6ed5 100644 --- a/app/views/studiengaenge/versionen/index.php +++ b/app/views/studiengaenge/versionen/index.php @@ -35,7 +35,7 @@ <a href="<?= $controller->url_for('studiengaenge/versionen/version') ?>"> <?= Studip\LinkButton::create( _('Eine neue Version anlegen.'), - $controller->url_for('/version/' . $stgteil->id), + $controller->action_url('version/' . $stgteil->id), ['title' => _('Eine neue Version anlegen')] ) ?> </a> diff --git a/app/views/studiengaenge/versionen/modul_zuordnung.php b/app/views/studiengaenge/versionen/modul_zuordnung.php index ce68a7de0303f7162b6ce9cfcb5bc84497af7e33..59a1194a3ffa94c3ed6d106f0f0ab5915370cef9 100644 --- a/app/views/studiengaenge/versionen/modul_zuordnung.php +++ b/app/views/studiengaenge/versionen/modul_zuordnung.php @@ -1,6 +1,6 @@ <? use Studip\Button, Studip\LinkButton; ?> <? $perm = new MvvPerm($zuordnung) ?> -<form class="default" action="<?= $controller->url_for('/modul_zuordnung/' . $zuordnung->id) ?>" method="post"> +<form class="default" action="<?= $controller->action_link('modul_zuordnung/' . $zuordnung->id) ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <fieldset> <legend><?= _('Grunddaten') ?></legend> @@ -34,7 +34,7 @@ ) ?> <?= LinkButton::createCancel( _('Abbrechen'), - $controller->url_for('/'), + $controller->action_url(''), ['title' => _('zurück zur Übersicht')] ) ?> </footer> diff --git a/app/views/studiengaenge/versionen/modulteil_semester.php b/app/views/studiengaenge/versionen/modulteil_semester.php index 3252876602cd929bfca81f1fb021c426e0233ea0..7d64ed1954fdf64ad27adf6fcc49f76c987b8332 100644 --- a/app/views/studiengaenge/versionen/modulteil_semester.php +++ b/app/views/studiengaenge/versionen/modulteil_semester.php @@ -3,7 +3,7 @@ <h3> <?= _('Zuordnung der Modulteile zu Fachsemestern') ?> </h3> -<form class="default" data-dialog="" action="<?= $controller->url_for('/modulteil_semester', $abschnitt_modul->id, $modulteil->id) ?>" method="post"> +<form class="default" data-dialog="" action="<?= $controller->action_link('modulteil_semester', $abschnitt_modul->id, $modulteil->id) ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <fieldset> <legend><?= _('Belegung in folgenden Fachsemestern') ?></legend> @@ -51,7 +51,7 @@ <? if ($perm_abschnitt >= MvvPerm::PERM_WRITE) : ?> <?= Button::createAccept(_('Übernehmen'), 'store', ['title' => _('Änderungen übernehmen')]) ?> <? endif; ?> - <?= LinkButton::createCancel(_('Abbrechen'), $controller->url_for('/modulteile', $abschnitt_modul->abschnitt->id), ['title' => _('zurück zur Übersicht')]) ?> + <?= LinkButton::createCancel(_('Abbrechen'), $controller->action_url('modulteile', $abschnitt_modul->abschnitt->id), ['title' => _('zurück zur Übersicht')]) ?> </div> </form> <script> diff --git a/app/views/studiengaenge/versionen/modulteile.php b/app/views/studiengaenge/versionen/modulteile.php index 7fac584b738677ce1fbfad31265e3204ab80ff83..211e0512cae6ae195f00e5928ca4745202cb9a67 100644 --- a/app/views/studiengaenge/versionen/modulteile.php +++ b/app/views/studiengaenge/versionen/modulteile.php @@ -11,7 +11,7 @@ <td class="actions"> <? $perm = MvvPerm::get($assignment->abschnitt) ?> <? if ($perm->haveFieldPerm('modulteil_abschnitte')) : ?> - <a data-dialog="" href="<?= $controller->url_for('/modulteil_semester', $assignment->id, $modulteil->id) ?>"> + <a data-dialog="" href="<?= $controller->action_link('modulteil_semester', $assignment->id, $modulteil->id) ?>"> <?= Icon::create('edit', Icon::ROLE_CLICKABLE , ['title' => _('Semesterzuordnung bearbeiten')])->asImg(); ?> </a> <? endif; ?> diff --git a/app/views/studiengaenge/versionen/version.php b/app/views/studiengaenge/versionen/version.php index 674c23a737074e95a58c58a3cd6e62863560357d..4cb0d74549ed4c02b8a25177dcd4c978e05fe054 100644 --- a/app/views/studiengaenge/versionen/version.php +++ b/app/views/studiengaenge/versionen/version.php @@ -2,7 +2,7 @@ <?= $controller->jsUrl() ?> <? $perm = MvvPerm::get($version) ?> -<form class="default" action="<?= $controller->url_for('/version', $stgteil->id, $version->id) ?>" method="post"> +<form class="default" action="<?= $controller->action_link('version', $stgteil->id, $version->id) ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <fieldset class="collapsable"> @@ -94,9 +94,6 @@ <?= MvvI18N::textarea('beschreibung', $version->beschreibung, ['class' => 'add_toolbar ui-resizable wysiwyg', 'id' => 'beschreibung'])->checkPermission($version) ?> </fieldset> - <? $url = $controller->url_for('/dokumente_properties'); ?> - <? $perm_dokumente = $perm->haveFieldPerm('document_assignments', MvvPerm::PERM_CREATE) ?> - <?//= $this->render_partial('shared/form_dokumente', compact('search_dokumente', 'dokumente', 'url', 'perm_dokumente')) ?> <fieldset class="collapsable collapsed"> <legend> <?= _('Dokumente'); ?> diff --git a/app/views/studiengaenge/versionen/versionen.php b/app/views/studiengaenge/versionen/versionen.php index 97680ac206eb26e73dcdf147298bb37ecb66b349..96b3470cc11330f1a1211095e108b46925515982 100644 --- a/app/views/studiengaenge/versionen/versionen.php +++ b/app/views/studiengaenge/versionen/versionen.php @@ -4,7 +4,7 @@ <tr class="header-row"> <td class="toggle-indicator"> <? if ($version->count_abschnitte) : ?> - <a class="mvv-load-in-new-row" href="<?= $controller->url_for('/abschnitte/' . $version->id) ?>"> + <a class="mvv-load-in-new-row" href="<?= $controller->action_link('abschnitte/' . $version->id) ?>"> <? endif; ?> <? $ampel_icon = $GLOBALS['MVV_STGTEILVERSION']['STATUS']['values'][$version->stat]['icon'] ?> <? $ampelstatus = $GLOBALS['MVV_STGTEILVERSION']['STATUS']['values'][$version->stat]['name'] ?> @@ -27,7 +27,7 @@ <? $actionMenu = ActionMenu::get()->setContext($version->getDisplayName()) ?> <? if ($version->stat === 'planung' && MvvPerm::haveFieldPermStat($version)) : ?> <? $actionMenu->addLink( - $controller->url_for('/approve/' . $version->id), + $controller->action_url('approve/' . $version->id), _('Version genehmigen'), Icon::create('accept', Icon::ROLE_CLICKABLE, ['title' => _('Version genehmigen')]), ['data-dialog' => 'title=' . htmlReady($version->getDisplayName()) . '']) @@ -35,7 +35,7 @@ <? endif; ?> <? if ($perm->haveFieldPerm('abschnitte', MvvPerm::PERM_CREATE)) : ?> <? $actionMenu->addLink( - $controller->url_for('/abschnitt', ['version_id' => $version->id]), + $controller->action_url('abschnitt', ['version_id' => $version->id]), _('Studiengangteil-Abschnitt anlegen'), Icon::create('file', Icon::ROLE_CLICKABLE, ['title' => _('Studiengangteil-Abschnitt anlegen')]), ['data-dialog' => true]) @@ -43,7 +43,7 @@ <? endif; ?> <? if ($perm->havePermWrite()) : ?> <? $actionMenu->addLink( - $controller->url_for('/version/' . $version->stgteil_id . '/' . $version->id), + $controller->action_url('version/' . $version->stgteil_id . '/' . $version->id), _('Version bearbeiten'), Icon::create('edit', Icon::ROLE_CLICKABLE, ['title' => _('Version bearbeiten')])) ?> @@ -56,7 +56,7 @@ 'files', Icon::ROLE_CLICKABLE, ['title' => _('Version kopieren'), - 'formaction' => $controller->url_for('/copy_version/' . $version->id), + 'formaction' => $controller->action_url('copy_version/' . $version->id), 'data-confirm' => sprintf( _('Wollen Sie wirklich die Version "%s" des Studiengangteils kopieren?'), htmlReady($version->getDisplayName())) @@ -70,7 +70,7 @@ _('Version löschen'), Icon::create('trash', Icon::ROLE_CLICKABLE, ['title' => _('Version löschen'), - 'formaction' => $controller->url_for('/delete_version/' . $version->id), + 'formaction' => $controller->action_url('delete_version/' . $version->id), 'data-confirm' => sprintf( _('Wollen Sie wirklich die Version "%s" des Studiengangteils löschen?'), htmlReady($version->getDisplayName()))