Building on 22318, the OpacSuppressionMessage system preference should be converted to an HTML customization option.
Created attachment 156406 [details] [review] Bug 34894: Convert OpacSuppressionMessage system preference to HTML customization This patch moves the OpacSuppressionMessage system preference into HTML customizations, making it possible to have language- and library-specific content. To test you should have some content in the OpacSuppressionMessage system preference before applying the patch. Apply the patch and run the database update process. - In the staff interface, locate a bibliographic record and open it for editing. - Under tab 9, tag 942, change subfield n, "Suppress in OPAC", to "Yes" and save the record. - Go to the OPAC and try to navigate directly to the bibliographic detail page for that record: /cgi-bin/koha/opac-detail.pl?biblionumber=X - You should be redirectd to the "Blocked" page. Under the message "You are not authorized to view this record" you should see the content which was previously in the OpacSuppressionMessage system preference. - In the staff client, go to Tools -> HTML customizations and verify that the content from OpacSuppressionMessage is now stored there. - The HTML customization entry form should offer OpacSuppressionMessage 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. - Edit the OpacSuppressionMessage HTML customization and add unique content to the "fr-FR" tab. - Go to the OPAC and switch to your updated translation. Try to view the suppressed record again and confirm that the content you added for your translation shows up correctly. - Go to Administration -> System preferences and confirm that the OpacSuppressionMessage preference has been removed.
Created attachment 156408 [details] [review] Bug 34894: Convert OpacSuppressionMessage system preference to HTML customization This patch moves the OpacSuppressionMessage system preference into HTML customizations, making it possible to have language- and library-specific content. To test you should have some content in the OpacSuppressionMessage system preference before applying the patch. Apply the patch and run the database update process. - In the staff interface, locate a bibliographic record and open it for editing. - Under tab 9, tag 942, change subfield n, "Suppress in OPAC", to "Yes" and save the record. - Go to the OPAC and try to navigate directly to the bibliographic detail page for that record: /cgi-bin/koha/opac-detail.pl?biblionumber=X - You should be redirectd to the "Blocked" page. Under the message "You are not authorized to view this record" you should see the content which was previously in the OpacSuppressionMessage system preference. - In the staff client, go to Tools -> HTML customizations and verify that the content from OpacSuppressionMessage is now stored there. - The HTML customization entry form should offer OpacSuppressionMessage 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. - Edit the OpacSuppressionMessage HTML customization and add unique content to the "fr-FR" tab. - Go to the OPAC and switch to your updated translation. Try to view the suppressed record again and confirm that the content you added for your translation shows up correctly. - Go to Administration -> System preferences and search for "OpacSuppression." The description of these preferences should show an updated message about using HTML customizations to create OpacSuppressionMessage content.
Created attachment 157473 [details] [review] Bug 34894: Convert OpacSuppressionMessage system preference to HTML customization This patch moves the OpacSuppressionMessage system preference into HTML customizations, making it possible to have language- and library-specific content. To test you should have some content in the OpacSuppressionMessage system preference before applying the patch. Apply the patch and run the database update process. - In the staff interface, locate a bibliographic record and open it for editing. - Under tab 9, tag 942, change subfield n, "Suppress in OPAC", to "Yes" and save the record. - Go to the OPAC and try to navigate directly to the bibliographic detail page for that record: /cgi-bin/koha/opac-detail.pl?biblionumber=X - You should be redirectd to the "Blocked" page. Under the message "You are not authorized to view this record" you should see the content which was previously in the OpacSuppressionMessage system preference. - In the staff client, go to Tools -> HTML customizations and verify that the content from OpacSuppressionMessage is now stored there. - The HTML customization entry form should offer OpacSuppressionMessage 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. - Edit the OpacSuppressionMessage HTML customization and add unique content to the "fr-FR" tab. - Go to the OPAC and switch to your updated translation. Try to view the suppressed record again and confirm that the content you added for your translation shows up correctly. - Go to Administration -> System preferences and search for "OpacSuppression." The description of these preferences should show an updated message about using HTML customizations to create OpacSuppressionMessage content.
I'm getting an error when running the database update: kohadev-koha@kohadevbox:koha(bz34894)$ updatedatabase DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bug-34894-move-OpacSuppressionMessage-to-additional-contents.pl [21:23:45]: Bug 34894 - Move OpacSuppressionMessage 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
Something to do with Bug 31383?
I tried again after the follow-ups to bug 31383. The database update runs if there is no previous content. However, if I add some content, apply the patch, then run the database update I get the same error: kohadev-koha@kohadevbox:koha(bz34894)$ updatedatabase DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bug-34894-move-OpacSuppressionMessage-to-additional-contents.pl [20:32:14]: Bug 34894 - Move OpacSuppressionMessage 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 157804 [details] [review] Bug 34894: Convert OpacSuppressionMessage system preference to HTML customization This patch moves the OpacSuppressionMessage system preference into HTML customizations, making it possible to have language- and library-specific content. To test you should have some content in the OpacSuppressionMessage system preference before applying the patch. Apply the patch and run the database update process. - In the staff interface, locate a bibliographic record and open it for editing. - Under tab 9, tag 942, change subfield n, "Suppress in OPAC", to "Yes" and save the record. - Go to the OPAC and try to navigate directly to the bibliographic detail page for that record: /cgi-bin/koha/opac-detail.pl?biblionumber=X - You should be redirectd to the "Blocked" page. Under the message "You are not authorized to view this record" you should see the content which was previously in the OpacSuppressionMessage system preference. - In the staff client, go to Tools -> HTML customizations and verify that the content from OpacSuppressionMessage is now stored there. - The HTML customization entry form should offer OpacSuppressionMessage 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. - Edit the OpacSuppressionMessage HTML customization and add unique content to the "fr-FR" tab. - Go to the OPAC and switch to your updated translation. Try to view the suppressed record again and confirm that the content you added for your translation shows up correctly. - Go to Administration -> System preferences and search for "OpacSuppression." The description of these preferences should show an updated message about using HTML customizations to create OpacSuppressionMessage content.
Created attachment 157829 [details] [review] Bug 34894: Convert OpacSuppressionMessage system preference to HTML customization This patch moves the OpacSuppressionMessage system preference into HTML customizations, making it possible to have language- and library-specific content. To test you should have some content in the OpacSuppressionMessage system preference before applying the patch. Apply the patch and run the database update process. - In the staff interface, locate a bibliographic record and open it for editing. - Under tab 9, tag 942, change subfield n, "Suppress in OPAC", to "Yes" and save the record. - Go to the OPAC and try to navigate directly to the bibliographic detail page for that record: /cgi-bin/koha/opac-detail.pl?biblionumber=X - You should be redirectd to the "Blocked" page. Under the message "You are not authorized to view this record" you should see the content which was previously in the OpacSuppressionMessage system preference. - In the staff client, go to Tools -> HTML customizations and verify that the content from OpacSuppressionMessage is now stored there. - The HTML customization entry form should offer OpacSuppressionMessage 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. - Edit the OpacSuppressionMessage HTML customization and add unique content to the "fr-FR" tab. - Go to the OPAC and switch to your updated translation. Try to view the suppressed record again and confirm that the content you added for your translation shows up correctly. - Go to Administration -> System preferences and search for "OpacSuppression." The description of these preferences should show an updated message about using HTML customizations to create OpacSuppressionMessage content.
Created attachment 157830 [details] [review] Bug 34894: (follow-up) Add entry to HTML customization help include
Created attachment 157916 [details] [review] Bug 34894: Convert OpacSuppressionMessage system preference to HTML customization This patch moves the OpacSuppressionMessage system preference into HTML customizations, making it possible to have language- and library-specific content. To test you should have some content in the OpacSuppressionMessage system preference before applying the patch. Apply the patch and run the database update process. - In the staff interface, locate a bibliographic record and open it for editing. - Under tab 9, tag 942, change subfield n, "Suppress in OPAC", to "Yes" and save the record. - Go to the OPAC and try to navigate directly to the bibliographic detail page for that record: /cgi-bin/koha/opac-detail.pl?biblionumber=X - You should be redirectd to the "Blocked" page. Under the message "You are not authorized to view this record" you should see the content which was previously in the OpacSuppressionMessage system preference. - In the staff client, go to Tools -> HTML customizations and verify that the content from OpacSuppressionMessage is now stored there. - The HTML customization entry form should offer OpacSuppressionMessage 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. - Edit the OpacSuppressionMessage HTML customization and add unique content to the "fr-FR" tab. - Go to the OPAC and switch to your updated translation. Try to view the suppressed record again and confirm that the content you added for your translation shows up correctly. - Go to Administration -> System preferences and search for "OpacSuppression." The description of these preferences should show an updated message about using HTML customizations to create OpacSuppressionMessage content.
Created attachment 157917 [details] [review] Bug 34894: (follow-up) Add entry to HTML customization help include
Created attachment 157958 [details] [review] Bug 34894: Convert OpacSuppressionMessage system preference to HTML customization This patch moves the OpacSuppressionMessage system preference into HTML customizations, making it possible to have language- and library-specific content. To test you should have some content in the OpacSuppressionMessage system preference before applying the patch. Apply the patch and run the database update process. - In the staff interface, locate a bibliographic record and open it for editing. - Under tab 9, tag 942, change subfield n, "Suppress in OPAC", to "Yes" and save the record. - Go to the OPAC and try to navigate directly to the bibliographic detail page for that record: /cgi-bin/koha/opac-detail.pl?biblionumber=X - You should be redirectd to the "Blocked" page. Under the message "You are not authorized to view this record" you should see the content which was previously in the OpacSuppressionMessage system preference. - In the staff client, go to Tools -> HTML customizations and verify that the content from OpacSuppressionMessage is now stored there. - The HTML customization entry form should offer OpacSuppressionMessage 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. - Edit the OpacSuppressionMessage HTML customization and add unique content to the "fr-FR" tab. - Go to the OPAC and switch to your updated translation. Try to view the suppressed record again and confirm that the content you added for your translation shows up correctly. - Go to Administration -> System preferences and search for "OpacSuppression." The description of these preferences should show an updated message about using HTML customizations to create OpacSuppressionMessage content. Signed-off-by: David Nind <david@davidnind.com>
Created attachment 157959 [details] [review] Bug 34894: (follow-up) Add entry to HTML customization help include Signed-off-by: David Nind <david@davidnind.com>
Created attachment 157960 [details] [review] Bug 34894: (follow-up) Fix id for HTML customization help Signed-off-by: David Nind <david@davidnind.com>
Created attachment 158450 [details] [review] Bug 34894: Convert OpacSuppressionMessage system preference to HTML customization This patch moves the OpacSuppressionMessage system preference into HTML customizations, making it possible to have language- and library-specific content. To test you should have some content in the OpacSuppressionMessage system preference before applying the patch. Apply the patch and run the database update process. - In the staff interface, locate a bibliographic record and open it for editing. - Under tab 9, tag 942, change subfield n, "Suppress in OPAC", to "Yes" and save the record. - Go to the OPAC and try to navigate directly to the bibliographic detail page for that record: /cgi-bin/koha/opac-detail.pl?biblionumber=X - You should be redirectd to the "Blocked" page. Under the message "You are not authorized to view this record" you should see the content which was previously in the OpacSuppressionMessage system preference. - In the staff client, go to Tools -> HTML customizations and verify that the content from OpacSuppressionMessage is now stored there. - The HTML customization entry form should offer OpacSuppressionMessage 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. - Edit the OpacSuppressionMessage HTML customization and add unique content to the "fr-FR" tab. - Go to the OPAC and switch to your updated translation. Try to view the suppressed record again and confirm that the content you added for your translation shows up correctly. - Go to Administration -> System preferences and search for "OpacSuppression." The description of these preferences should show an updated message about using HTML customizations to create OpacSuppressionMessage content. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 158451 [details] [review] Bug 34894: (follow-up) Add entry to HTML customization help include Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 158452 [details] [review] Bug 34894: (follow-up) Fix id for HTML customization help Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Hi. Just a note for QA: I'm tweaking the atomic update for all this bugs. I do it inline on the DBRev commit. As-is, it is leaving the syspref around on the DB if it is not set to a value, as the if condition is false when there's no syspref, but also when the value is NULL or ''.
Pushed to master for 23.11. Nice work everyone, thanks!
Enhancement not pushed to 23.05.x