Project: moodle
Issue MDL-45893: Developing a User Menu
Adding a User Menu, in the bootstrapbase themes; refer to the specification to know what it should contain, and how to implement it. The general approach here is to refactor the existing navbar's capabilities, allowing it to support multiple dropdowns without adversely affecting existing DOM structure (which would necessitate every theme re-targeting its styles). Update 10/06/2014: The user menu is being rendered fine, but the current solution doesn't quite encapsulate everything that'll need to happen with the navbar; in particular, page_heading_menu() stuff isn't handled by this solution as it doesn't really make sense for that stuff to live in a dropdown. Update 24/06/2014: Okay, this turned out to be huge. - The new {{user_menu}} renderable is an extension of the {{custom_menu}} renderable, constructed with references to a user, a course, a page and an array of flags (at present, the only thing that makes sense to set _a priori_ is {{guest}}, a boolean flag). -- Basing the new renderable on the {{custom_menu}} allows for it to be easily displayed in Base-based themes as well. -- A minor bug in {{custom_menu}}'s YUI3 dropdown code was fixed: in brief, the logic was looking for a dropdown attribute on the node that was clicked (e.target) instead of the node that the event was actually wired to (e.currentTarget). - {{custom_menu}} renderables have been extended by way of MDL-46022 and have also gained the ability to assign CSS suffix flags to {{custom_menu_item}}s - which is necessary for us to avoid having to hardcode icons into the renderer PHP. - In order to support multiple collapsible menus, it was necessary to create an entire {{bootstrap_navbar}} renderable which renders the {{body > header}} element and renders out a collection of menus. Bootstrap javascript has been patched to allow for multiple navbar items. - Responsive styles have been provided.
Story points: 100