Skip to content

Commit

Permalink
MDL-72091 Navigation: Update navigation to match designs
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocolate-lightning committed Oct 11, 2021
1 parent 70073fd commit dba47e8
Show file tree
Hide file tree
Showing 39 changed files with 411 additions and 196 deletions.
33 changes: 16 additions & 17 deletions admin/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@
\core\hub\registration::registration_reminder('/admin/search.php');

admin_externalpage_setup('search', '', array('query' => $query)); // now hidden page
$PAGE->set_heading(get_string('administrationsite')); // Has to be after setup since it has its' own heading set_heading.

if ($hassiteconfig) {
$data = [
'action' => new moodle_url('/admin/search.php'),
'btnclass' => 'btn-primary',
'inputname' => 'query',
'searchstring' => get_string('search'),
'query' => $query,
'extraclasses' => 'd-flex justify-content-end'
];
$PAGE->add_header_action($OUTPUT->render_from_template('core/search_input', $data));
}

$adminroot = admin_get_root(); // need all settings here
$adminroot->search = $query; // So we can reference it in search boxes later in this invocation
Expand Down Expand Up @@ -59,8 +72,6 @@
echo $adminrenderer->warn_if_not_registered();
}

echo $OUTPUT->heading(get_string('administrationsite'));

if ($errormsg !== '') {
echo $OUTPUT->notification($errormsg);

Expand All @@ -70,22 +81,10 @@

$showsettingslinks = true;

if ($hassiteconfig) {
$data = [
'action' => new moodle_url('/admin/search.php'),
'btnclass' => 'btn-primary',
'inputname' => 'query',
'searchstring' => get_string('search'),
'query' => $query,
'extraclasses' => 'd-flex justify-content-center'
];
echo $OUTPUT->render_from_template('core/search_input', $data);

if ($query && $hassiteconfig) {
echo '<hr>';
if ($query) {
echo admin_search_settings_html($query);
$showsettingslinks = false;
}
echo admin_search_settings_html($query);
$showsettingslinks = false;
}

if ($showsettingslinks) {
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/behat/tests/behat/keyboard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Feature: Verify that keyboard steps work as expected
| username | email | firstname | lastname |
| saffronr | saffron.rutledge@example.com | Saffron | Rutledge |
And I log in as "saffronr"
And I click on "Saffron Rutledge" "button" in the ".usermenu" "css_element"
And I click on "User menu" "button" in the ".usermenu" "css_element"
When I press the up key
Then the focused element is "Log out" "link"

Expand Down
6 changes: 3 additions & 3 deletions admin/tool/usertours/tests/behat/tour_accessibility.feature
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ Feature: Apply accessibility to a tour
When I press tab
Then the focused element is ".usermenu" "css_element"
When I press tab
Then the focused element is "Admin User" "link_or_button" in the ".usermenu" "css_element"
Then the focused element is "User menu" "button" in the ".usermenu" "css_element"
When I press tab
And I press tab
Then the focused element is ".close" "css_element" in the "User menu" "dialogue"
# Press shift-tab twice should lead us back to "Admin user" link.
# Press shift-tab twice should lead us back to the user menu button.
When I press shift tab
And I press shift tab
Then the focused element is "Admin User" "link_or_button" in the ".usermenu" "css_element"
Then the focused element is "User menu" "button" in the ".usermenu" "css_element"

@javascript
Scenario: Aria tags should not exist
Expand Down
1 change: 1 addition & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
$editing = $PAGE->user_is_editing();
$PAGE->set_title($SITE->fullname);
$PAGE->set_heading($SITE->fullname);
$PAGE->has_secondary_navigation_setter(false);
$courserenderer = $PAGE->get_renderer('core', 'course');
echo $OUTPUT->header();

Expand Down
2 changes: 1 addition & 1 deletion lib/amd/build/menu_navigation.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/amd/build/menu_navigation.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/amd/build/moremenu.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dba47e8

Please sign in to comment.