Building on 22318, the OpacMaintenanceNotice system preference should be converted to a Koha news block.
Reconsidered this: Since it's tied to the OpacMaintenance system preference it's probably better to leave it be.
Hm, not sure - but I think the need for multi-lingual is valid for this one as well. When you need to turn the catalog off, it's good to let everyone know :)
Created attachment 157205 [details] [review] Bug 23798: Convert OpacMaintenanceNotice system preference to additional contents This patch moves the OpacMaintenanceNotice system preference into HTML customizations, making it possible to have language-specific content. The patch modifies the OPAC maintenance page template so that the language selection menu can be shown correctly according to the OpacLangSelectorMode preference. To test you should have some content in the OpacMaintenanceNotice system preference before applying the patch. Apply the patch and run the database update process. - In the staff client, go to Tools -> HTML customizations and verify that the content from OpacMaintenanceNotice is now stored there. - The HTML customization entry form should offer OpacMaintenanceNotice as a choice under "Display location." - Update and reinstall active translations (for instance fr-FR): - perl misc/translator/translate update fr-FR - perl misc/translator/translate install fr-FR - Enable the translation if necessary under Administration -> System preferences -> language. - Enable the "opaclanguagesdisplay" preference if necessary. - Enable the "OpacMaintenance" system preference. - Edit the OpacMaintenanceNotice HTML customization and add unique content to the "fr-FR" tab. - Try to view any page in the OPAC. You should see the content you added to the OpacMaintenanceNotice HTML customization. - Switch to your updated translation. The page should redisplay with your translated content. - Go to Administration -> System preferences and search for "OpacMaintenanceNotice." The search should return no results.
Created attachment 157472 [details] [review] Bug 23798: Convert OpacMaintenanceNotice system preference to additional contents This patch moves the OpacMaintenanceNotice system preference into HTML customizations, making it possible to have language-specific content. The patch modifies the OPAC maintenance page template so that the language selection menu can be shown correctly according to the OpacLangSelectorMode preference. To test you should have some content in the OpacMaintenanceNotice system preference before applying the patch. Apply the patch and run the database update process. - In the staff client, go to Tools -> HTML customizations and verify that the content from OpacMaintenanceNotice is now stored there. - The HTML customization entry form should offer OpacMaintenanceNotice as a choice under "Display location." - Update and reinstall active translations (for instance fr-FR): - perl misc/translator/translate update fr-FR - perl misc/translator/translate install fr-FR - Enable the translation if necessary under Administration -> System preferences -> language. - Enable the "opaclanguagesdisplay" preference if necessary. - Enable the "OpacMaintenance" system preference. - Edit the OpacMaintenanceNotice HTML customization and add unique content to the "fr-FR" tab. - Try to view any page in the OPAC. You should see the content you added to the OpacMaintenanceNotice HTML customization. - Switch to your updated translation. The page should redisplay with your translated content. - Go to Administration -> System preferences and search for "OpacMaintenanceNotice." The search should return no results.
Created attachment 157584 [details] [review] Bug 23798: Convert OpacMaintenanceNotice system preference to additional contents This patch moves the OpacMaintenanceNotice system preference into HTML customizations, making it possible to have language-specific content. The patch modifies the OPAC maintenance page template so that the language selection menu can be shown correctly according to the OpacLangSelectorMode preference. To test you should have some content in the OpacMaintenanceNotice system preference before applying the patch. Apply the patch and run the database update process. - In the staff client, go to Tools -> HTML customizations and verify that the content from OpacMaintenanceNotice is now stored there. - The HTML customization entry form should offer OpacMaintenanceNotice as a choice under "Display location." - Update and reinstall active translations (for instance fr-FR): - perl misc/translator/translate update fr-FR - perl misc/translator/translate install fr-FR - Enable the translation if necessary under Administration -> System preferences -> language. - Enable the "opaclanguagesdisplay" preference if necessary. - Enable the "OpacMaintenance" system preference. - Edit the OpacMaintenanceNotice HTML customization and add unique content to the "fr-FR" tab. - Try to view any page in the OPAC. You should see the content you added to the OpacMaintenanceNotice HTML customization. - Switch to your updated translation. The page should redisplay with your translated content. - Go to Administration -> System preferences and search for "OpacMaintenanceNotice." The search should return no results. Signed-off-by: David Nind <david@davidnind.com>
Created attachment 157822 [details] [review] Bug 23798: (follow-up) Add entry to HTML customization help include
Created attachment 157905 [details] [review] Bug 23798: Convert OpacMaintenanceNotice system preference to additional contents This patch moves the OpacMaintenanceNotice system preference into HTML customizations, making it possible to have language-specific content. The patch modifies the OPAC maintenance page template so that the language selection menu can be shown correctly according to the OpacLangSelectorMode preference. To test you should have some content in the OpacMaintenanceNotice system preference before applying the patch. Apply the patch and run the database update process. - In the staff client, go to Tools -> HTML customizations and verify that the content from OpacMaintenanceNotice is now stored there. - The HTML customization entry form should offer OpacMaintenanceNotice as a choice under "Display location." - Update and reinstall active translations (for instance fr-FR): - perl misc/translator/translate update fr-FR - perl misc/translator/translate install fr-FR - Enable the translation if necessary under Administration -> System preferences -> language. - Enable the "opaclanguagesdisplay" preference if necessary. - Enable the "OpacMaintenance" system preference. - Edit the OpacMaintenanceNotice HTML customization and add unique content to the "fr-FR" tab. - Try to view any page in the OPAC. You should see the content you added to the OpacMaintenanceNotice HTML customization. - Switch to your updated translation. The page should redisplay with your translated content. - Go to Administration -> System preferences and search for "OpacMaintenanceNotice." The search should return no results. Signed-off-by: David Nind <david@davidnind.com>
Created attachment 157906 [details] [review] Bug 23798: (follow-up) Add entry to HTML customization help include
I revised the patch so that the database update would work after Bug 31383. I should have added a follow-up but I was rebasing anyway. QA please feel free to set back to "needs signoff."
Created attachment 158308 [details] [review] Bug 23798: Convert OpacMaintenanceNotice system preference to additional contents This patch moves the OpacMaintenanceNotice system preference into HTML customizations, making it possible to have language-specific content. The patch modifies the OPAC maintenance page template so that the language selection menu can be shown correctly according to the OpacLangSelectorMode preference. To test you should have some content in the OpacMaintenanceNotice system preference before applying the patch. Apply the patch and run the database update process. - In the staff client, go to Tools -> HTML customizations and verify that the content from OpacMaintenanceNotice is now stored there. - The HTML customization entry form should offer OpacMaintenanceNotice as a choice under "Display location." - Update and reinstall active translations (for instance fr-FR): - perl misc/translator/translate update fr-FR - perl misc/translator/translate install fr-FR - Enable the translation if necessary under Administration -> System preferences -> language. - Enable the "opaclanguagesdisplay" preference if necessary. - Enable the "OpacMaintenance" system preference. - Edit the OpacMaintenanceNotice HTML customization and add unique content to the "fr-FR" tab. - Try to view any page in the OPAC. You should see the content you added to the OpacMaintenanceNotice HTML customization. - Switch to your updated translation. The page should redisplay with your translated content. - Go to Administration -> System preferences and search for "OpacMaintenanceNotice." The search should return no results. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 158309 [details] [review] Bug 23798: (follow-up) Add entry to HTML customization help include Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This explodes if `OpacMaintenanceNotice` is not empty. Known cause: DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bug-23798-move-OpacMaintenanceNotice-to-additional-contents.pl [14:03:46]: Bug 23798 - Convert OpacMaintenanceNotice system preference to additional contents ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Unknown column 'title' in 'field list' at /kohadevbox/koha/C4/Installer.pm line 741
Created attachment 158667 [details] [review] Bug 23798: (follow-up) Revise database update following Bug 31383
> Bug 23798: (follow-up) Revise database update following Bug 31383 This follow-up makes the same change to the database update that I did for the other similar patches, but I understand if anyone wants this to go through QA again.
(In reply to Owen Leonard from comment #14) > > Bug 23798: (follow-up) Revise database update following Bug 31383 > > This follow-up makes the same change to the database update that I did for > the other similar patches, but I understand if anyone wants this to go > through QA again. All good, I test it again before pushing anyway.
Created attachment 158669 [details] [review] Bug 23798: Atomic update fixes This patch makes the atomic update remove the syspref even if it wasn't previously set. It also tweaks the printed information to comform with current practices. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed to master for 23.11. Nice work everyone, thanks!
Enhancement not pushed to 23.05.x