Bug 23795 - Convert OpacCredits system preference to news block
Summary: Convert OpacCredits system preference to news block
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Alex Arnaud
URL:
Keywords:
Depends on: 22318 22880
Blocks: 26050
  Show dependency treegraph
 
Reported: 2019-10-10 18:38 UTC by Owen Leonard
Modified: 2021-12-13 21:08 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.03
Circulation function:


Attachments
Bug 23794: Convert opaccredits system preference to news block (8.80 KB, patch)
2020-02-27 15:32 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23795: Convert opaccredits system preference to news block (8.81 KB, patch)
2020-03-24 13:47 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23795: Convert opaccredits system preference to news block (8.87 KB, patch)
2020-03-25 12:10 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 23795: Convert opaccredits system preference to news block (8.91 KB, patch)
2020-06-19 14:59 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23795: Convert opaccredits system preference to news block (8.88 KB, patch)
2020-06-19 15:07 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23795: Convert opaccredits system preference to news block (8.93 KB, patch)
2020-06-19 15:14 UTC, Alex Arnaud
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2019-10-10 18:38:36 UTC
Building on 22318, the OpacCredits system preference should be converted to a Koha news block.
Comment 1 Owen Leonard 2020-02-27 15:32:01 UTC Comment hidden (obsolete)
Comment 2 Bernardo Gonzalez Kriegel 2020-03-22 23:23:33 UTC
Hi Owen,
patch works ok, but:

* Commit message references Bug 23794 instead of 23795 (easy)
* QA tools complains
 FAIL   koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc
   OK     filters
   OK     forbidden patterns
   OK     git manipulation
   OK     js_in_body
   OK     spelling
   OK     tt_valid
   FAIL   valid_template
                koha_news_block: not found
Comment 3 Owen Leonard 2020-03-24 13:47:55 UTC Comment hidden (obsolete)
Comment 4 PTFS Europe Sandboxes 2020-03-25 12:10:46 UTC Comment hidden (obsolete)
Comment 5 Sally 2020-03-25 12:19:43 UTC
I tested this on a sandbox and it works for the English language.  
I couldn't find an option to install alternative languages on the newer sandbox environments.

I attempted to test on Biblibre's sandboxes which allow alternative languages.
I couldn't find a way to add content to the opaccredits and then add the patch to test if the content carries over.
However, I can confirm that the other language drop downs are visible in the news section if the patch is applied.

I've added my sign off, but I understand how important additional languages are.  Another person may want to test on a dev environment to double check?
Comment 6 Alex Arnaud 2020-06-19 14:00:29 UTC
Comment on attachment 101696 [details] [review]
Bug 23795: Convert opaccredits system preference to news block

Review of attachment 101696 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc
@@ +9,1 @@
>  [% UNLESS ( is_popup ) %]

I don't understand why the html_helpers block is added here. I understand even less why it is added twice.
Comment 7 Alex Arnaud 2020-06-19 14:01:45 UTC
This patch needs a very tiny rebase also
Comment 8 Owen Leonard 2020-06-19 14:59:27 UTC Comment hidden (obsolete)
Comment 9 Owen Leonard 2020-06-19 15:07:19 UTC
Created attachment 106103 [details] [review]
Bug 23795: Convert opaccredits system preference to news block

This patch builds on Bug 22318 to move the opaccredits system
preference into the Koha news system, making it possible to have
language- and library-specific content.

To test you should have some content in the opaccredits system
preference. Apply the patch and run the database update process.

 - Go to the OPAC and confirm that the content which was previously in
   the opaccredits system preference now displays correctly where
   it was before.
 - In the staff client, go to Tools -> News and verify that the content
   from opaccredits is now stored in news items. There should be
   one entry for each of the enabled translations in your system, for
   instance 'opaccredits_en', 'opaccredits_fr-FR',
   'opaccredits_cs-CZ'
 - Go to Administration -> System preferences and confirm that the
   opaccredits preference has been removed.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 10 Alex Arnaud 2020-06-19 15:14:55 UTC
Created attachment 106104 [details] [review]
Bug 23795: Convert opaccredits system preference to news block

This patch builds on Bug 22318 to move the opaccredits system
preference into the Koha news system, making it possible to have
language- and library-specific content.

To test you should have some content in the opaccredits system
preference. Apply the patch and run the database update process.

 - Go to the OPAC and confirm that the content which was previously in
   the opaccredits system preference now displays correctly where
   it was before.
 - In the staff client, go to Tools -> News and verify that the content
   from opaccredits is now stored in news items. There should be
   one entry for each of the enabled translations in your system, for
   instance 'opaccredits_en', 'opaccredits_fr-FR',
   'opaccredits_cs-CZ'
 - Go to Administration -> System preferences and confirm that the
   opaccredits preference has been removed.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Comment 11 Jonathan Druart 2020-07-23 09:49:13 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 12 Lucas Gass (lukeg) 2020-07-30 18:12:27 UTC
choosing to backport these HTML -> News enhancements to 20.05.x

backpoted to 20.05.x for 20.05.03
Comment 13 Aleisha Amohia 2020-08-03 23:37:55 UTC
enhancement, not backported to 19.11.x