Skip to content
Snippets Groups Projects
Commit b8b0e683 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

allow open global section and jump to last configured item

Closes #1013 and #1014

Merge request studip/studip!586
parent ce49732a
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,12 @@ class Admin_ConfigurationController extends AuthenticatedController
}
$this->setupSidebar($this->range_type);
// Preserve section parameter
// This *must* be after the sidebar has been defined
if (!Request::isPost() && Request::submitted('section')) {
URLHelper::addLinkParam('section', Request::option('section'));
}
}
/**
......@@ -61,7 +67,7 @@ class Admin_ConfigurationController extends AuthenticatedController
// set variables for view
$this->only_section = $section;
$this->open_section = $open_section ?: $section;
$this->open_section = $open_section ?? $section;
$this->needle = $needle;
$this->sections = ConfigurationModel::getConfig($section, $needle);
......@@ -97,7 +103,7 @@ class Admin_ConfigurationController extends AuthenticatedController
htmlReady($field)
));
$this->relocate('admin/configuration/configuration/' . $section);
$this->relocate("admin/configuration/configuration/{$section}#field-{$field}");
return;
}
}
......
<tr>
<tr id="field-<?= htmlReady($field) ?>">
<td>
<a data-dialog href="<?= $controller->link_for($linkchunk, compact('field')) ?>">
<?= htmlReady($field) ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment