Skip to content
Snippets Groups Projects
Commit 9d5de236 authored by Kathrin Osswald's avatar Kathrin Osswald
Browse files

Replaced the settings icon with a edit profile button on the profile page.

parent 7078ba57
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ Changes
### Unreleased
* 2017-11-09 - Replaced the settings icon with a edit profile button on the profile page.
* 2017-11-07 - Updated travis.yml to use newer node version for fixing TravisCI error.
* 2017-10-17 - Minor change in SCSS to fit the borders of the current section in the periods format into the section.
......
......@@ -317,6 +317,10 @@ Course Design:
Improved font sizes and weights on category overview page for better readability.
### User profile page
* Replaced the the user settings icon with a button to edit the profile. The menu items shown in this setting are not related to the user profile in the closer sense, they are related to the user's system preferences. So we decided to replace this with the only profile related function. Furthermore, the user preferences can be accessed any time over the user's menu in the fixed to top navigation bar.
How this theme works
-------------------
......
......@@ -160,6 +160,12 @@ class core_renderer extends \theme_boost\output\core_renderer {
/* ORIGINAL START.
$html .= html_writer::div($this->context_header_settings_menu(), 'pull-xs-right context-header-settings-menu');
ORIGINAL END. */
// MODIFICATION START:
// To get the same structure as on the Dashboard, we need to add the page heading buttons here for the profile page.
if ($PAGE->pagelayout == 'mypublic') {
$html .= html_writer::div($this->page_heading_button(), 'breadcrumb-button pull-xs-right');
}
// MODIFICATION END.
$html .= html_writer::start_div('pull-xs-left');
$html .= $this->context_header();
$html .= html_writer::end_div();
......@@ -167,13 +173,27 @@ class core_renderer extends \theme_boost\output\core_renderer {
if (empty($PAGE->layout_options['nonavbar'])) {
$html .= html_writer::start_div('clearfix w-100 pull-xs-left', array('id' => 'page-navbar'));
$html .= html_writer::tag('div', $this->navbar(), array('class' => 'breadcrumb-nav'));
// MODIFICATION START: Add the course context menu to the course page.
if (get_config('theme_boost_campus', 'showsettingsincourse') == 'yes') {
// MODIFICATION START: Add the course context menu to the course page, but not on the profile page.
if (get_config('theme_boost_campus', 'showsettingsincourse') == 'yes'
&& $PAGE->pagelayout != 'mypublic') {
$html .= html_writer::div($this->context_header_settings_menu(),
'pull-xs-right context-header-settings-menu m-l-1');
}
// MODIFICATION END.
// MODIFICATION START: Instead of the settings icon, add a button to edit the profile.
if ($PAGE->pagelayout == 'mypublic') {
$html .= html_writer::start_div('breadcrumb-button breadcrumb-button pull-xs-right');
$url = new moodle_url('/user/editadvanced.php', array('id' => $USER->id, 'course' => $COURSE->id,
'returnto' => 'profile'));
$html .= $this->single_button($url, get_string('editmyprofile', 'core'));
$html .= html_writer::end_div();
}
// Do not show the page heading buttons on the profile page at this place.
// Display them only on other pages.
if ($PAGE->pagelayout != 'mypublic') {
$html .= html_writer::div($pageheadingbutton, 'breadcrumb-button pull-xs-right');
}
// MODIFICATION END.
$html .= html_writer::end_div();
} else if ($pageheadingbutton) {
$html .= html_writer::div($pageheadingbutton, 'breadcrumb-button nonavbar pull-xs-right');
......
......@@ -630,6 +630,26 @@ blockquote::before {
}
/*------------------------------------
Profile Page
-------------------------------------*/
#page-user-profile {
/* Hide the "Edit profile" link, because we added a breadcrumb button in the page header. */
.editprofile {
display: none;
}
}
/* Hide the "Reset page to default" button in non editing mode. */
#page-user-profile .breadcrumb-button:first-of-type .singlebutton:first-of-type {
display: none;
}
/* Only show the "Reset page to default" button in editing mode. */
#page-user-profile.editing .breadcrumb-button:first-of-type .singlebutton:first-of-type {
display: initial;
}
/*------------------------------------
Page Footer
-------------------------------------*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment