Summary: | Move top language menu to include and streamline logic | ||
---|---|---|---|
Product: | Koha | Reporter: | Marc Véron <veron> |
Component: | OPAC | Assignee: | Marc Véron <veron> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | chris.kirby, jonathan.druart, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | |||
Bug Blocks: | 14776 | ||
Attachments: |
Bug 15039 - Move top language menu to include and streamline logic
Bug 15039 - Move top language menu to include and streamline logic Bug 15039 - Move top language menu to include and streamline logic |
Description
Marc Véron
2015-10-20 15:01:42 UTC
Created attachment 43651 [details] [review] Bug 15039 - Move top language menu to include and streamline logic The language menu in koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc is used at other places as well (see Bug 14776). This patch moves it to a file masthead-langmenu.inc to make it re-usable. Additionally it streamlines the logic (not all combinations of Opac sysprefs that should display the menu did so). To test: - Apply patch - Verify, that the language menu displays / does not display with combinations of: - opaclanguagedisplay (Allow) - opaclanguages ( > 1 language selected) - OpacLangSelectorMode (top or both) - Verify that sysprefs opacuserlogin and EnableOpacSearchHistory do not interfere with the lenguage menu (before, at least one of them had to be on to display the menu) - Verify that language switching works as before. Created attachment 43653 [details] [review] Bug 15039 - Move top language menu to include and streamline logic The language menu in koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc is used at other places as well (see Bug 14776). This patch moves it to a file masthead-langmenu.inc to make it re-usable. Additionally it streamlines the logic (not all combinations of Opac sysprefs that should display the menu did so). To test: - Apply patch - Verify, that the language menu displays / does not display with combinations of: - opaclanguagedisplay (Allow) - opaclanguages ( > 1 language selected) - OpacLangSelectorMode (top or both) - Verify that sysprefs opacuserlogin and EnableOpacSearchHistory do not interfere with the lenguage menu (before, at least one of them had to be on to display the menu) - Verify that language switching works as before. Marc, why didn't you use the include into includes/opac-bottom.inc? (I didn't check line by line if it was the same piece of code) (In reply to Jonathan Druart from comment #3) > Marc, why didn't you use the include into includes/opac-bottom.inc? (I > didn't check line by line if it was the same piece of code) Jonathan, because the language switcher in the bottomline is different to the language switcher in the header. Comment on attachment 43653 [details] [review] Bug 15039 - Move top language menu to include and streamline logic Signed off on patch. Applied patch - Verified, that the language menu displays / does not display with combinations of: - opaclanguagedisplay (Allow) - opaclanguages ( > 1 language selected) - OpacLangSelectorMode (top or both) - Verified that sysprefs opacuserlogin and EnableOpacSearchHistory did not interfere: with the lenguage menu (before, at least one of them had to be on to display the menu) - Verified that language switching works as before. Created attachment 43742 [details] [review] Bug 15039 - Move top language menu to include and streamline logic The language menu in koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc is used at other places as well (see Bug 14776). This patch moves it to a file masthead-langmenu.inc to make it re-usable. Additionally it streamlines the logic (not all combinations of Opac sysprefs that should display the menu did so). To test: - Apply patch - Verify, that the language menu displays / does not display with combinations of: - opaclanguagedisplay (Allow) - opaclanguages ( > 1 language selected) - OpacLangSelectorMode (top or both) - Verify that sysprefs opacuserlogin and EnableOpacSearchHistory do not interfere with the lenguage menu (before, at least one of them had to be on to display the menu) - Verify that language switching works as before. Signed-off-by: Chris Kirby <christopherlawrencekirby@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Patch pushed to master. Thanks Marc! |