Bug 18718

Summary: Language selector in staff header menu similar to OPAC
Product: Koha Reporter: Marc Véron <veron>
Component: Staff interfaceAssignee: Marc Véron <veron>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, gmcharlt, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 18718: Language selector in staff header menu similar to OPAC
Bug 18718: Language selector in staff header menu similar to OPAC
[SIGNED-OFF] Bug 18718: Language selector in staff header menu similar to OPAC
Bug 18718: Language selector in staff header menu similar to OPAC

Description Marc Véron 2017-06-02 08:30:28 UTC
The OPAC has the possibility to display a language selector in both header and/or footer, configured by syspref OpacLangSelectorMode. Implement the same for the staff client.
- System preference StaffLangSelectorMode, defaulting to: 'only footer'
- Language menu in header (at the left of "Help") that appears if syspref is set to 'Top' or 'Both'
Comment 1 Marc Véron 2017-06-02 10:23:11 UTC
Created attachment 63936 [details] [review]
Bug 18718: Language selector in staff header menu similar to OPAC

This patch adds a language selector menu to the top menu of staff client
similar to the OPAC.
Display of language selectors at top, bottom or both can be configured
with system preference StaffLangSelectorModer. It defaults to bottom.

To test:
- Apply patch
- Udate database
- Restart plack and memchached
- Go to staff client, verify that language selector displays at
  the bottom of the page (as before)
- Go to system preferences, verify that there is a new preference
  StaffLanguageSelectorMode (name similar to the sypref ror OPAC), and
  that it is set to 'footer'
- Change mode for top, both and footer and verify, go to staff client
  and verify for each that the language selector displays as appropriate
Comment 2 Owen Leonard 2017-06-02 12:53:44 UTC
This looks good, but I suggest one small change. Add a "dropdown-menu-right" class so that the menu doesn't disappear off the right side of the browser window with some installed languages with long labels like "English United Kingdom"

<ul aria-labelledby="langmenu" role="menu" class="dropdown-menu dropdown-menu-right">
Comment 3 Marc Véron 2017-06-02 13:11:20 UTC
Created attachment 63938 [details] [review]
Bug 18718: Language selector in staff header menu similar to OPAC

This patch adds a language selector menu to the top menu of staff client
similar to the OPAC.
Display of language selectors at top, bottom or both can be configured
with system preference StaffLangSelectorModer. It defaults to bottom.

To test:
- Apply patch
- Udate database
- Restart plack and memchached
- Go to staff client, verify that language selector displays at
  the bottom of the page (as before)
- Go to system preferences, verify that there is a new preference
  StaffLanguageSelectorMode (name similar to the sypref ror OPAC), and
  that it is set to 'footer'
- Change mode for top, both and footer and verify, go to staff client
  and verify for each that the language selector displays as appropriate

(Amended for comment #2  2017-06-02 mv)
Comment 4 Marc Véron 2017-06-02 13:13:32 UTC
(In reply to Owen Leonard from comment #2)
> This looks good, but I suggest one small change. Add a "dropdown-menu-right"
> class so that the menu doesn't disappear off the right side of the browser
> window with some installed languages with long labels like "English United
> Kingdom"
> 
> <ul aria-labelledby="langmenu" role="menu" class="dropdown-menu
> dropdown-menu-right">

Thanks for the hint, Owen. I amended the patch, switching back to NSO.
Comment 5 Josef Moravec 2017-06-06 04:31:11 UTC
Created attachment 64019 [details] [review]
[SIGNED-OFF] Bug 18718: Language selector in staff header menu similar to OPAC

This patch adds a language selector menu to the top menu of staff client
similar to the OPAC.
Display of language selectors at top, bottom or both can be configured
with system preference StaffLangSelectorModer. It defaults to bottom.

To test:
- Apply patch
- Udate database
- Restart plack and memchached
- Go to staff client, verify that language selector displays at
  the bottom of the page (as before)
- Go to system preferences, verify that there is a new preference
  StaffLanguageSelectorMode (name similar to the sypref ror OPAC), and
  that it is set to 'footer'
- Change mode for top, both and footer and verify, go to staff client
  and verify for each that the language selector displays as appropriate

(Amended for comment #2  2017-06-02 mv)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 6 Marcel de Rooy 2017-09-01 07:03:31 UTC
QA: Looking here now
Comment 7 Marcel de Rooy 2017-09-01 07:20:13 UTC
Created attachment 66689 [details] [review]
Bug 18718: Language selector in staff header menu similar to OPAC

This patch adds a language selector menu to the top menu of staff client
similar to the OPAC.
Display of language selectors at top, bottom or both can be configured
with system preference StaffLangSelectorModer. It defaults to bottom.

To test:
- Apply patch
- Udate database
- Restart plack and memchached
- Go to staff client, verify that language selector displays at
  the bottom of the page (as before)
- Go to system preferences, verify that there is a new preference
  StaffLanguageSelectorMode (name similar to the sypref ror OPAC), and
  that it is set to 'footer'
- Change mode for top, both and footer and verify, go to staff client
  and verify for each that the language selector displays as appropriate

(Amended for comment #2  2017-06-02 mv)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Jonathan Druart 2017-09-01 16:06:09 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 9 Fridolin Somers 2017-09-29 13:58:53 UTC
Enhancement not pushed to 17.05.x