Description
Matt Blenkinsop
2023-01-25 11:55:32 UTC
Created attachment 145731 [details] [review] Bug 32721: Add branch specific userjs and usercss This patch allows for branch specific userJS and userCSS to be added through the libraries table. This works in conjunction with the global UserJS and UserCSS functionality and allows for multiple OPACs with different css and js options. Test plan: 1) Add to apache conf (/etc/apache2/sites-available/kohadev.conf) SetEnv OPAC_BRANCH_DEFAULT "FFL" RequestHeader add X-Koha-SetEnv "OPAC_BRANCH_DEFAULT FFL" 2) In the container, run restart_all 3) Navigate to the OPACUserJS and OPACUserCSS system preferences and add the following: OPACUserJS - console.log('Hello from global sysprefs');, OPACUserCSS - 'body { background-color: black; }' 4) Refresh the OPAC and the background should be black and the message should be logged to the console in developer tools 5) Navigate to Administration > Libraries 6) On the Fairfield branch (if this does not exist you will need to create a branch with a code matching the code that you added to the apache conf file), click edit 7) At the bottom there should be two fields to add userjs and usercss, complete with Codemirror syntax checking 8) In userjs add console.log('Hello from branch level'); and in usercss add 'body { background-color: blue; } then save 9) Return to the OPAC and refresh 10) If you are logged out of the OPAC it should now be logging both the message from global and from the branch level and the background should be blue (if not you will need to log out) 11) Log back into the OPAC using a user that DOES NOT have a default branch matching the branch you added to the Apache conf 12) The OPAC should now revert to only showing the global message in the console with a black background Sponsored-by: PTFS Europe Created attachment 145732 [details] [review] Bug 32721: Database update to add userjs and usercss to branches table This patch adds the columns for userjs and usercss to the branches table Test plan as per previous commit Created attachment 145733 [details] [review] Bug 32721: DBIC Schema This commit adds the DBIC Schema for the database change Created attachment 145734 [details] [review] Bug 32721: Add unit tests Unit tests to test two new functions: GetBranchSpecificJS and GetBranchSpecificCSS Test plan: 1) In the shell run prove -t t/db_dependent/Template/Plugin/Branches.t Created attachment 145735 [details] [review] Bug 32721: Tidy up - duplicate fetching of userjs and css Currently UserJS and UserCSS is injected into the template as a parameter through Auth.pm but is then fetched using Koha.Preference() in the template. This patch tidies this up by removing the parameters from Auth.pm Test plan as per first commit This appears to work well, but there are a few issues raised by the QA tool which need to be addressed. Created attachment 145754 [details] [review] Bug 32721: (QA follow up) - fix QA issues This patches addresses issues raised by the QA tests. Created attachment 145759 [details] [review] Bug 32721: (QA follow up) - fix QA issues This patches addresses issues raised by the QA tests. It also adds a missed import of the Branches file in the document head Im confused by this step: 10) If you are logged out of the OPAC it should now be logging both the message from global and from the branch level and the background should be blue (if not you will need to log out) If I log out of the OPAC I should be seeing the branch level JS/CSS? Hi Lucas, if you are logged in then your user will have a default branch - you should see the UserJs and CSS for that patron branch which may be different to the branch that you set in your Apache config. For example if you set the OPAC as having a default code of FPL and you are logged into the OPAC with a patron that has a branch code of CPL, you will see the settings for CPL and not FPL as the patron will override the default. Therefore you would need to log out to see your UserJS and CSS changes for the FPL branch. You can also set specific UserJS and CSS for the CPL branch and that will appear when you are logged in as a CPL user. Hope that makes sense! Created attachment 146159 [details] [review] Bug 32721: Add branch specific userjs and usercss This patch allows for branch specific userJS and userCSS to be added through the libraries table. This works in conjunction with the global UserJS and UserCSS functionality and allows for multiple OPACs with different css and js options. Test plan: 1) Add to apache conf (/etc/apache2/sites-available/kohadev.conf) SetEnv OPAC_BRANCH_DEFAULT "FFL" RequestHeader add X-Koha-SetEnv "OPAC_BRANCH_DEFAULT FFL" 2) In the container, run restart_all 3) Navigate to the OPACUserJS and OPACUserCSS system preferences and add the following: OPACUserJS - console.log('Hello from global sysprefs');, OPACUserCSS - 'body { background-color: black; }' 4) Refresh the OPAC and the background should be black and the message should be logged to the console in developer tools 5) Navigate to Administration > Libraries 6) On the Fairfield branch (if this does not exist you will need to create a branch with a code matching the code that you added to the apache conf file), click edit 7) At the bottom there should be two fields to add userjs and usercss, complete with Codemirror syntax checking 8) In userjs add console.log('Hello from branch level'); and in usercss add 'body { background-color: blue; } then save 9) Return to the OPAC and refresh 10) If you are logged out of the OPAC it should now be logging both the message from global and from the branch level and the background should be blue (if not you will need to log out) 11) Log back into the OPAC using a user that DOES NOT have a default branch matching the branch you added to the Apache conf 12) The OPAC should now revert to only showing the global message in the console with a black background Sponsored-by: PTFS Europe Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 146160 [details] [review] Bug 32721: Database update to add userjs and usercss to branches table This patch adds the columns for userjs and usercss to the branches table Test plan as per previous commit Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 146161 [details] [review] Bug 32721: DBIC Schema This commit adds the DBIC Schema for the database change Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 146162 [details] [review] Bug 32721: Add unit tests Unit tests to test two new functions: GetBranchSpecificJS and GetBranchSpecificCSS Test plan: 1) In the shell run prove -t t/db_dependent/Template/Plugin/Branches.t Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 146163 [details] [review] Bug 32721: Tidy up - duplicate fetching of userjs and css Currently UserJS and UserCSS is injected into the template as a parameter through Auth.pm but is then fetched using Koha.Preference() in the template. This patch tidies this up by removing the parameters from Auth.pm Test plan as per first commit Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 146164 [details] [review] Bug 32721: (QA follow up) - fix QA issues This patches addresses issues raised by the QA tests. It also adds a missed import of the Branches file in the document head Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> QA comments: 1. There are still a couple of ref to tinymce in the template 2. Not blocker but it would be nice to see the codemirror code centralised in an include file to avoid code duplication 3. You didn't modify all the occurrences of OPACUserCSS in template, is that on purpose? koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt:[% IF ( Koha.Preference('OPACUserCSS') ) %]<style>[% Koha.Preference('OPACUserCSS') | $raw %]</style>[% END %] koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt:[% IF ( Koha.Preference('OPACUserCSS') ) %]<style>[% Koha.Preference('OPACUserCSS') | $raw %]</style>[% END %] koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt:[% IF ( Koha.Preference('OPACUserCSS') ) %]<style>[% Koha.Preference('OPACUserCSS') | $raw %]</style>[% END %] I don't know if it's relevant, just asking. 4. There is one more QA failure FAIL installer/data/mysql/atomicupdate/bug_32721-add_branch_level_js.pl FAIL file permissions File must have the exec flag Created attachment 147373 [details] [review] Bug 32721: (QA follow-up) Add missing imports Missing imports added in three template files Exec flag added to atomic update file Tinymce imports removed A new bug will be created to move codemirror into an inc file at latest version Test plan as before I got a conflict on the "Tidy up" patch that I managed to fix, but then another one: error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt). Created attachment 149860 [details] [review] Bug 32721: Add branch specific userjs and usercss This patch allows for branch specific userJS and userCSS to be added through the libraries table. This works in conjunction with the global UserJS and UserCSS functionality and allows for multiple OPACs with different css and js options. Test plan: 1) Add to apache conf (/etc/apache2/sites-available/kohadev.conf) SetEnv OPAC_BRANCH_DEFAULT "FFL" RequestHeader add X-Koha-SetEnv "OPAC_BRANCH_DEFAULT FFL" 2) In the container, run restart_all 3) Navigate to the OPACUserJS and OPACUserCSS system preferences and add the following: OPACUserJS - console.log('Hello from global sysprefs');, OPACUserCSS - 'body { background-color: black; }' 4) Refresh the OPAC and the background should be black and the message should be logged to the console in developer tools 5) Navigate to Administration > Libraries 6) On the Fairfield branch (if this does not exist you will need to create a branch with a code matching the code that you added to the apache conf file), click edit 7) At the bottom there should be two fields to add userjs and usercss, complete with Codemirror syntax checking 8) In userjs add console.log('Hello from branch level'); and in usercss add 'body { background-color: blue; } then save 9) Return to the OPAC and refresh 10) If you are logged out of the OPAC it should now be logging both the message from global and from the branch level and the background should be blue (if not you will need to log out) 11) Log back into the OPAC using a user that DOES NOT have a default branch matching the branch you added to the Apache conf 12) The OPAC should now revert to only showing the global message in the console with a black background Sponsored-by: PTFS Europe Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 149861 [details] [review] Bug 32721: Database update to add userjs and usercss to branches table This patch adds the columns for userjs and usercss to the branches table Test plan as per previous commit Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 149862 [details] [review] Bug 32721: DBIC Schema This commit adds the DBIC Schema for the database change Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 149863 [details] [review] Bug 32721: Add unit tests Unit tests to test two new functions: GetBranchSpecificJS and GetBranchSpecificCSS Test plan: 1) In the shell run prove -t t/db_dependent/Template/Plugin/Branches.t Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 149864 [details] [review] Bug 32721: Tidy up - duplicate fetching of userjs and css Currently UserJS and UserCSS is injected into the template as a parameter through Auth.pm but is then fetched using Koha.Preference() in the template. This patch tidies this up by removing the parameters from Auth.pm Test plan as per first commit Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 149865 [details] [review] Bug 32721: (QA follow up) - fix QA issues This patches addresses issues raised by the QA tests. It also adds a missed import of the Branches file in the document head Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 149866 [details] [review] Bug 32721: (QA follow-up) Add missing imports Missing imports added in three template files Exec flag added to atomic update file Tinymce imports removed A new bug will be created to move codemirror into an inc file at latest version Test plan as before Rebased - resetting to Signed off as previous status Created attachment 150713 [details] [review] Bug 32721: Highlight the branch specific option from the global syspref Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 150724 [details] [review] Bug 32721: Add branch specific userjs and usercss This patch allows for branch specific userJS and userCSS to be added through the libraries table. This works in conjunction with the global UserJS and UserCSS functionality and allows for multiple OPACs with different css and js options. Test plan: 1) Add to apache conf (/etc/apache2/sites-available/kohadev.conf) SetEnv OPAC_BRANCH_DEFAULT "FFL" RequestHeader add X-Koha-SetEnv "OPAC_BRANCH_DEFAULT FFL" 2) In the container, run restart_all 3) Navigate to the OPACUserJS and OPACUserCSS system preferences and add the following: OPACUserJS - console.log('Hello from global sysprefs');, OPACUserCSS - 'body { background-color: black; }' 4) Refresh the OPAC and the background should be black and the message should be logged to the console in developer tools 5) Navigate to Administration > Libraries 6) On the Fairfield branch (if this does not exist you will need to create a branch with a code matching the code that you added to the apache conf file), click edit 7) At the bottom there should be two fields to add userjs and usercss, complete with Codemirror syntax checking 8) In userjs add console.log('Hello from branch level'); and in usercss add 'body { background-color: blue; } then save 9) Return to the OPAC and refresh 10) If you are logged out of the OPAC it should now be logging both the message from global and from the branch level and the background should be blue (if not you will need to log out) 11) Log back into the OPAC using a user that DOES NOT have a default branch matching the branch you added to the Apache conf 12) The OPAC should now revert to only showing the global message in the console with a black background Sponsored-by: PTFS Europe Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 150725 [details] [review] Bug 32721: Database update to add userjs and usercss to branches table This patch adds the columns for userjs and usercss to the branches table Test plan as per previous commit Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 150726 [details] [review] Bug 32721: DBIC Schema This commit adds the DBIC Schema for the database change Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 150727 [details] [review] Bug 32721: Add unit tests Unit tests to test two new functions: GetBranchSpecificJS and GetBranchSpecificCSS Test plan: 1) In the shell run prove -t t/db_dependent/Template/Plugin/Branches.t Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 150728 [details] [review] Bug 32721: Tidy up - duplicate fetching of userjs and css Currently UserJS and UserCSS is injected into the template as a parameter through Auth.pm but is then fetched using Koha.Preference() in the template. This patch tidies this up by removing the parameters from Auth.pm Test plan as per first commit Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 150729 [details] [review] Bug 32721: (QA follow up) - fix QA issues This patches addresses issues raised by the QA tests. It also adds a missed import of the Branches file in the document head Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 150730 [details] [review] Bug 32721: (QA follow-up) Add missing imports Missing imports added in three template files Exec flag added to atomic update file Tinymce imports removed A new bug will be created to move codemirror into an inc file at latest version Test plan as before Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 150731 [details] [review] Bug 32721: Highlight the branch specific option from the global syspref Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 150732 [details] [review] Bug 32721: (QA follow-up) Add exec flag to DB update and expand tests Added tests for case of no branch specific settings and when no branch passed Signed-off-by: Nick Clemens <nick@bywatersolutions.com> One question: You add the fields to the api, do we want them? They feel like they may be somewhat Koha specific, not needed for outside connections? One more question: should these be 'opacuserjs' and 'opacusercss' in the case of implementing the same feature in the staff client? Comment on attachment 150728 [details] [review] Bug 32721: Tidy up - duplicate fetching of userjs and css Review of attachment 150728 [details] [review]: ----------------------------------------------------------------- ::: C4/Auth.pm @@ +1364,5 @@ > + OpacCloud => C4::Context->preference("OpacCloud"), > + OpacTopissue => C4::Context->preference("OpacTopissue"), > + OpacAuthorities => C4::Context->preference("OpacAuthorities"), > + OpacBrowser => C4::Context->preference("OpacBrowser"), > + TagsEnabled => C4::Context->preference("TagsEnabled"), Were these deliberately added.. they feel like a rebase mistake to me? (In reply to Nick Clemens from comment #38) > One question: You add the fields to the api, do we want them? They feel like > they may be somewhat Koha specific, not needed for outside connections? Hmm, I agree.. we perhaps don't need to add them in.. instead we could map them to undef to drop them in API responses (In reply to Nick Clemens from comment #39) > One more question: should these be 'opacuserjs' and 'opacusercss' in the > case of implementing the same feature in the staff client? You're probably right there too Created attachment 150754 [details] [review] Bug 32721: (QA follow-up) Add exec flag to DB update and expand tests Added tests for case of no branch specific settings and when no branch passed Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 150755 [details] [review] Bug 32721: (QA follow-up) Drop fields from API response Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 150756 [details] [review] Bug 32721: (QA follow-up) Rename fields to opac* This patch updates the field names to reflect that they're OPAC related. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 150757 [details] [review] Bug 32721: DBIC Schema update Update after field change Created attachment 150758 [details] [review] Bug 32721: (QA follow-up) Fix rebase errors We let some superflous template params creep back in during a rebase somewhere. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Matt's on leave at the minute, so I took care of the thoughts raised by Nick.. They all made sense to me. Back to PQA Thanks Martin and Nick! +1 for UserCSS but I'm thinking that we might want to start killing off UserJS... Please, rebase ASAP. - Squash the patches as appropriate. - Leave the DBIC schema update as a single/separate commit we can drop if it doesn't apply due to later changes Created attachment 156157 [details] [review] Bug 32721: Add branch specific userjs and usercss This patch allows for branch specific userJS and userCSS to be added through the libraries table. This works in conjunction with the global UserJS and UserCSS functionality and allows for multiple OPACs with different css and js options. Test plan: 1) Add to apache conf (/etc/apache2/sites-available/kohadev.conf) SetEnv OPAC_BRANCH_DEFAULT "FFL" RequestHeader add X-Koha-SetEnv "OPAC_BRANCH_DEFAULT FFL" 2) In the container, run restart_all 3) Navigate to the OPACUserJS and OPACUserCSS system preferences and add the following: OPACUserJS - console.log('Hello from global sysprefs');, OPACUserCSS - 'body { background-color: black; }' 4) Refresh the OPAC and the background should be black and the message should be logged to the console in developer tools 5) Navigate to Administration > Libraries 6) On the Fairfield branch (if this does not exist you will need to create a branch with a code matching the code that you added to the apache conf file), click edit 7) At the bottom there should be two fields to add userjs and usercss, complete with Codemirror syntax checking 8) In userjs add console.log('Hello from branch level'); and in usercss add 'body { background-color: blue; } then save 9) Return to the OPAC and refresh 10) If you are logged out of the OPAC it should now be logging both the message from global and from the branch level and the background should be blue (if not you will need to log out) 11) Log back into the OPAC using a user that DOES NOT have a default branch matching the branch you added to the Apache conf 12) The OPAC should now revert to only showing the global message in the console with a black background Sponsored-by: PTFS Europe Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 156158 [details] [review] Bug 32721: Database update to add userjs and usercss to branches table This patch adds the columns for userjs and usercss to the branches table Test plan as per previous commit Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 156159 [details] [review] Bug 32721: DBIC Schema This commit adds the DBIC Schema for the database change Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Bug 32721: DBIC Schema update Update after field change Created attachment 156160 [details] [review] Bug 32721: Add unit tests Unit tests to test two new functions: GetBranchSpecificJS and GetBranchSpecificCSS Test plan: 1) In the shell run prove -t t/db_dependent/Template/Plugin/Branches.t Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 156161 [details] [review] Bug 32721: (QA follow up) - fix QA issues This patches addresses issues raised by the QA tests. It also adds a missed import of the Branches file in the document head Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Bug 32721: (QA follow-up) Add missing imports Missing imports added in three template files Exec flag added to atomic update file Tinymce imports removed A new bug will be created to move codemirror into an inc file at latest version Test plan as before Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Bug 32721: Tidy up - duplicate fetching of userjs and css Currently UserJS and UserCSS is injected into the template as a parameter through Auth.pm but is then fetched using Koha.Preference() in the template. This patch tidies this up by removing the parameters from Auth.pm Test plan as per first commit Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 156162 [details] [review] Bug 32721: Highlight the branch specific option from the global syspref Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 156163 [details] [review] Bug 32721: (QA follow-up) Add exec flag to DB update and expand tests Added tests for case of no branch specific settings and when no branch passed Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 156164 [details] [review] Bug 32721: (QA follow-up) Drop fields from API response Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Bug 32721: (QA follow-up) Rename fields to opac* This patch updates the field names to reflect that they're OPAC related. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Bug 32721: (QA follow-up) Fix rebase errors We let some superflous template params creep back in during a rebase somewhere. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Rebased DBIC left in a separate commit and patches squashed where appropriate *** Bug 20320 has been marked as a duplicate of this bug. *** The last follow-up contains this change which doesn't seem correct: +++ b/C4/Auth.pm @@ -1372,14 +1372,6 @@ sub checkauth { OpacFavicon => C4::Context->preference("OpacFavicon"), opacreadinghistory => C4::Context->preference("opacreadinghistory"), opaclanguagesdisplay => C4::Context->preference("opaclanguagesdisplay"), - opacbookbag => "" . C4::Context->preference("opacbookbag"), - OpacCloud => C4::Context->preference("OpacCloud"), - OpacTopissue => C4::Context->preference("OpacTopissue"), - OpacAuthorities => C4::Context->preference("OpacAuthorities"), - OpacBrowser => C4::Context->preference("OpacBrowser"), - TagsEnabled => C4::Context->preference("TagsEnabled"), - OPACUserJS => C4::Context->preference("OPACUserJS"), - OPACUserCSS => C4::Context->preference("OPACUserCSS"), intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), intranetstylesheet => C4::Context->preference("intranetstylesheet"), IntranetNav => C4::Context->preference("IntranetNav"), I still think we should've implemented bug 26129, and use it for this cases. But I abandoned it so I won't block this. Created attachment 157335 [details] [review] Bug 32721: (QA follow-up) Drop fields from API response Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Bug 32721: (QA follow-up) Rename fields to opac* This patch updates the field names to reflect that they're OPAC related. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Bug 32721: (QA follow-up) Fix rebase errors We let some superflous template params creep back in during a rebase somewhere. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Just fixed that commit to only remove OPACUserJS and OPACUserCSS - should be good to go now Pushed to master for 23.11. Nice work everyone, thanks! Enhancement not pushed to 23.05.x I add a release note, feel free to modify BTW : It would be nice to add library option to plugin hook adding JS and CSS, right ? Hook added by Bug 20181 Currently one can use, for OPAC, selector "body.branch-LIBRARY" From the GUI it's not obvious that the new options are for the OPAC - was this intentional? (In reply to Nick Clemens from comment #39) > One more question: should these be 'opacuserjs' and 'opacusercss' in the > case of implementing the same feature in the staff client? It was not changed/updated in the end, I filed: Bug 35530 - Can't tell if UserCSS and UserJS in ibraries are for staff interface or OPAC |