[Koha-bugs] [Bug 22318] Extend Koha news feature to include other content areas

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 19 09:29:58 CET 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22318

Josef Moravec <josef.moravec at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #86731|0                           |1
        is obsolete|                            |

--- Comment #12 from Josef Moravec <josef.moravec at gmail.com> ---
Created attachment 86734
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=86734&action=edit
Bug 22318: Example implementation: OpacNavRight system preference

This patch implements a Koha news system replacement of the OpacNavRight
system preference. The changes to koha-news.tt enable the selection of
"OpacNavRight" as a location for the content. opac-main.pl is modified
to ensure that the user's selected language is passed to the template
for use by the KohaNews plugin.

The database update process takes the contents of Koha's OpacNavRight
system preference and adds it to the Koha news system. The OpacNavRight
system preference is then removed from the database.

When the new entry is added to Koha news, the language is set based on
the top selected language in the "opaclanguages" preference. The entry
is added to "All libraries" without an author, title, or expiration
date.

Note that this patch doesn't change the way OPAC news is displayed. I
think it's best to keep existing markup and code for that since it
handles details like branch selection and RSS.

To test, apply the patch and run the database update.

 - In the staff client go to Tools -> News and confirm that there is now
   an entry with the location "OpacNavRight_en" (assuming an "en"
   English interface).
 - Confirm that the previous contents of OpacNavRight were added
   correctly.
 - Go to Administration -> System preferences -> OPAC and verify that
   the OpacNavRight preference has been removed.
 - In the OPAC, confirm that the correct content is displayed in the
   region previously defined in the OpacNavRight system preference.
 - Test that the language and library-specific nature of news items is
   reflected in the behavior of this content area:
   - Define different text based on language and location. Confirm that
     switching translations and logging in to the OPAC both trigger the
     correct display of different content.

Signed-off-by: Michal Denar <black23 at gmail.com>

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

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list