Since we remove cookies after logout now, the language cookie
might not be there yet. It is friendlier to add the template
language fallback here now too before switching to 'default' in
the Additional contents (AC)-context.
Note: The cookie will not be removed when you added it to the list
in koha-conf.xml.
Note2: This only pertains to the use of opac-page with code param.
Test plan:
[1] Create a CMS page with AC. Add two languages (say en, nl-NL).
Add different text to default and both languages.
[2] Remove the KohaOPACLanguage cookie from your browser (via
dev console).
[3] Without this patch, copy the Current language URL from the AC
overview page. (Note that the Default URL always refers you to
'default'.)
[4] Go to that page with the selected (Current..) URL. Observe that
you still see the 'default' text.
[5] Remove the cookie again if it might be there already.
[6] With this patch, observe that you get the language of the
interface now on the CMS page using the same URL.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Pascal <pascal.uphaus@gwdg.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Test plan:
Add a CMS page with two languages for it.
Look at the code column in the DB.
Try opac/opac-page.pl?code=[CODE]&lang=[LANG]. Test leaving lang
empty and passing various languages.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: I squashed the lang => language patch
To test:
1. Take note of what your logged in library is
2. Add a new page that can be viewed on the OPAC and staff interface.
Limit the library to a different library, not your logged in library
3. Use a News item to create a hyperlink to your new page on the OPAC
and staff interface.
4. Confirm that a page error shows if you try to view the new page.
5. Edit the new page and set the library to All libraries.
6. Try to go to the new page again and confirm it shows.
7. Log out and log back into the staff interface as a staff user that
isn't a superlibrarian
8. Confirm you can view the new page as this user
Sponsored-by: Horowhenua Libraries Trust
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This page utilises the Additional Contents feature to add custom pages
to the staff client and the OPAC in the user's desired language.
To test:
1. Apply patch and restart services
2. In the staff client, go to Tools, then go to the new 'Pages' page
3. Add a new page to display on both the staff client and OPAC.
4. Confirm the URLs in the Page URL column work as expected.
5. Confirm that any pages made for the staff client only do not show in
the OPAC, and that any pages made for the OPAC only do not show in the
staff client.
6. Confirm that pages do not show on the OPAC main page where news items
show. Confirm news items show on the OPAC main page as expected.
Sponsored-by: Chartered Accountants Australia and New Zealand
Signed-off-by: Thibault Kero <thibault.keromnes@univ-paris8.fr>
Signed-off-by: Lisette Scheer <lisettePalouse+Koha@gmail.com>
Signed-off-by: Lisette Scheer <lisettePalouse+Koha@gmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>