forked from hedyorg/hedy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove 'menu' parameter (hedyorg#1356)
All calls to `render_template()` used to include a `menu=` parameter, to render the entries of the main menu (in every language). It was an annoying requirement to pass in the menu everywhere, and unnecessary because the menu could just be a global variable in the template. Add a template global `main_menu_entries()` which returns the same as what `render_main_menu()` used to do. Instead, `menu` is now a boolean that controls whether or not the menu should be rendered at all, and the default is `True` so in most cases you don't need to pass anything: you only need to pass `menu=False` in cases where you don't want the menu rendered, which is only for embedded frames like for the quiz. Relates to hedyorg#1179. Co-authored-by: Felienne <[email protected]>
- Loading branch information
Showing
7 changed files
with
59 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.