From 80d7fbcbabcb07b7d02365963ed5eecfab65df91 Mon Sep 17 00:00:00 2001 From: nina martinez Date: Wed, 26 Mar 2025 11:58:10 +0100 Subject: [PATCH] Bug 34556: Add an Accessibility Statement Page This patch adds an Accessibility Statement page. To include this page, we propose adding a link in the Koha footer and using the HTML customization tools. This link will appear when you add content in the new HTML customization location: 'OpacAccessibility'. The page title and the link will use the title written in the HTML customizations or 'Accessibility' if none is provided. If there are multiple HTML customizations added for the location 'OpacAccessibility', the first one added will be used for the title by default. If you want a different title than the first one created, you must specify the "Appear in position" field in each 'OpacAccessibility' location and set it to '1' for the one you want to use for the title and link. If you add more than one content entry for this location, they will appear in succession on the page, similar to the title, with the first created or last edited appearing first by default. You can change this order by numbering the positions ("Appear in position" field). Test Plan: 1. Apply the patch. 2. Open the staff interface. 3. Click on 'Tools.' 4. Click on 'HTML Customizations.' 5. Click on 'New entry.' 6. Choose the location 'OpacAccessibility' and 'All libraries'. 7. Add a title (if desired), content and a publication date. 8. Open the OPAC interface. 9. Click on the link in the footer (the name should match the title you provided or 'Accessibility'). 10. Verify that the content you added in the HTML customizations appears. 11. Go back to the Staff interface 12. Add another content entry for the same location (with a title and content) but choose a specific library. 13. Set the "Appear in position" to 1 for the new entry. 14. Edit the first entry to set its position to 2. 15. Return to the OPAC interface logged in to a specific library Patron (same library you choose for the second entry) and verify that the link title matches the second title you wrote. 16. Verify that both content appear on the Accessibility page. 17. Go back to the staff interface and add content to the location : 'OpacNav' 18. Edit the second entry to set an expiration date for yesterday. 19. Return to the Opac and check that on the Accessibility page, the OpacNav content appears like the other pages on the left and the content of the second entry doesn't appear. 20. Return to the staff interface and delete all the HTML customizations for the 'OpacAccessibility' location. 21. Return to the OPAC interface. 22. Check that there is no link in the footer. Signed-off-by: PhilipOrr --- .../en/includes/html-customization-help.inc | 2 + .../en/modules/tools/additional-contents.tt | 2 +- .../en/includes/.html_helpers.inc.swp | Bin 0 -> 16384 bytes .../bootstrap/en/includes/opac-bottom.inc | 8 +++ .../en/modules/opac-accessibility.tt | 56 ++++++++++++++++++ opac/opac-accessibility.pl | 45 ++++++++++++++ 6 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/.html_helpers.inc.swp create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-accessibility.tt create mode 100644 opac/opac-accessibility.pl diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc index bc0bfabe7c..a0aeb29e6a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc @@ -16,6 +16,8 @@
Include this content in its own section on the main page of the staff interface
+
Show this content in the Accessibility page in the OPAC.
+
Include this content in the footer of all pages in the OPAC.
Replace the search box at the top of OPAC pages with this content.
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt index 75e1a5215b..32d7b2c7eb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt @@ -532,7 +532,7 @@ [% END %] [% END %] [% ELSE %] - [% SET opac_available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'OpacMaintenanceNotice', 'OPACResultsSidebar', 'OpacSuppressionMessage', 'SCOMainUserBlock', 'SelfCheckInMainUserBlock', 'SelfCheckHelpMessage', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'PatronSelfRegistrationAdditionalInstructions', 'ILLModuleCopyrightClearance' ] %] + [% SET opac_available_options = ['OpacAccessibility' ,'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'OpacMaintenanceNotice', 'OPACResultsSidebar', 'OpacSuppressionMessage', 'SCOMainUserBlock', 'SelfCheckInMainUserBlock', 'SelfCheckHelpMessage', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'PatronSelfRegistrationAdditionalInstructions', 'ILLModuleCopyrightClearance' ] %] [% FOREACH l IN opac_available_options.sort %] [% IF l == location %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/.html_helpers.inc.swp b/koha-tmpl/opac-tmpl/bootstrap/en/includes/.html_helpers.inc.swp new file mode 100644 index 0000000000000000000000000000000000000000..082082bc3a5f90a97a210d5fca54874b60999481 GIT binary patch literal 16384 zcmeHNU1%It6u!3p)Y|%sPlDV|Op{7?H;Gkh-HmS2v<*pM%Py$qt#!EHkr7 z(?1nj@TsLr9~4Cd5fwp15Pi2V3i_moSnvnwLj}bLu}}J)xihn~v)MF>Ed{v)-_Fea zIp^H(-kmw;+$nV(9Nf9L+4> z<0Mt*JXg=rMaG}2S~;hx>Ef#7IKJn*S~X|bIn&myTG{Y&6@SiBD~44yTrZ2#tJxy! zB?FRyRt#)rkMwkRQEi*Dh2MAYfmRJ=xnw{xAQ_MhNCqSWk^#wpWI!_TKV-nKu4m6< zTGZ{w_nbifc?4 zl(wmM?rSAmn=|-vUUN;}epsz)wqYqOYMj^NOSB#s*^M@F2{l6L#K0tXYOV@ds#)fR zSZJatbsnA=SYdBSY3w_=hj)@#RBTICwYEufO-=O-%g}wJTu`Pp%QKW@?}Yu9Y0s*< zrFmXKv9xEz|Q;Iz1KbmeAQ~0nJ0cY|cmWeWx0T?xoe$WDU>f&{kMXa#G7G5M*M$ zQHSMnoYN;gFhN<9bWDL*jF1*H>4hU|Bg6SrK<44#`g;6e#-`eZs_U&TrHa&Lv)Su0 zC}J=wt^kNl-tM&Cl&S_b;t_exCN80>Q4OABf-g^{N2-Po zC|$g+>EE=*BUIHlIyyNqiGMDiEcV3<{=h_W@4y-bH+O?7JT5ZH*B0IS71L8oCf+=b zN&c{^g2E%2fev~#MFne6GC0wr-q8h?iuGulrV7P{@8=W0}0W-UeX{~1Y2Tfz4 zV;e6Nc!%kg${qj3u>HmH{uLRv8msVCuP&^L-?ib?YGQJUNvwj#MUcEBiWANO-O|z6 zMU;u(B^pQ7Nq+y&4OF>)EIhs`iYI z4;1_Nahng02t5%+;UAF1C;ha*7MK#at@ZK1nWUDn@nmr%DH=g|kMbH^)?VHv++_3- z?izjit&)5-7;EUcC07laCcNQLVXA~m^YBXHRr7hxs=?DnH!E9mHCwOfPB}3P!Q4bu zVQ>{skdRSljFhJw*j4G`_4p>bTCIL83@aOTCVt2O*cHv9MYCv`7^-U;f$NJ(L9Q5$ zr%pSrnr<;RKH5JpF@dK|_fDHWrSBlw6#ow(?*0j&_OfypK<^ffggbLz#{M* z&;wjXtbY;s3OED20L%k5;2^LAxPL;-9IyyH46FmbLHz##Pz81Z+knfV zJwK97@{kNj1|$QL0m*=5Kr$d1kPJu$R?YwgH1%Dgyrq?ps6~7b1WY(5qdT+}^>GBd zE1wHWqQI{q<0ImdOt9Z1`eCc7Q|Z^-G7s}SkYDo*m!d8u4rs$v4B{N@j)ch(HHhLU z8=~mwFS@$|nxv9Nlx$jh6pfZsyJowalRcwj#r|Pu#o*;o^z7?{ "OpacAccessibility", lang => lang, library => logged_in_user.branchcode || default_branch ) %] [% SET opaccredits = AdditionalContents.get( location => "opaccredits", lang => lang, library => logged_in_user.branchcode || default_branch ) %] [% PROCESS 'html_helpers.inc' %] [% IF Koha.Preference( 'CookieConsent' ) %] @@ -47,6 +48,13 @@ [% END %] + + [% IF ( OpacAccessibility ) %] + + [% END %] + [% IF OpacKohaUrl %]