Bug 23795

Summary: Convert OpacCredits system preference to news block
Product: Koha Reporter: Owen Leonard <oleonard>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: Pushed to stable --- QA Contact: Alex Arnaud <alex.arnaud>
Severity: enhancement    
Priority: P5 - low CC: aleisha, alex.arnaud, bgkriegel, lucas, sally.healey, testopia
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Who signed the patch off: Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.03
Bug Depends on: 22880, 22318    
Bug Blocks: 26050    
Attachments: Bug 23794: Convert opaccredits system preference to news block
Bug 23795: Convert opaccredits system preference to news block
Bug 23795: Convert opaccredits system preference to news block
Bug 23795: Convert opaccredits system preference to news block
Bug 23795: Convert opaccredits system preference to news block
Bug 23795: Convert opaccredits system preference to news block

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 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