Bug 30288 - Provide links to OPACUserJS and OPACUserCSS from News/HTML customizations
Summary: Provide links to OPACUserJS and OPACUserCSS from News/HTML customizations
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Aleisha Amohia
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-14 03:58 UTC by Aleisha Amohia
Modified: 2022-12-12 21:23 UTC (History)
4 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00


Attachments
Bug 30288: Provide links to OPACUserJS and OPACUserCSS in tools (1.72 KB, patch)
2022-03-14 04:21 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 30288: Provide links to OPACUserJS and OPACUserCSS in tools (5.52 KB, patch)
2022-03-14 23:15 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 30288: Provide links to OPACUserJS and OPACUserCSS in tools (1.84 KB, patch)
2022-03-15 10:54 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30288: (follow-up) Add permissions check (1.59 KB, patch)
2022-03-15 10:54 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30288: (follow-up) Add permissions check (1.66 KB, patch)
2022-03-16 04:01 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 30288: Provide links to OPACUserJS and OPACUserCSS in tools (2.21 KB, patch)
2022-04-15 09:54 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30288: (follow-up) Use CSS for separator pipes (1.58 KB, patch)
2022-04-21 02:10 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 28786: Don't set auth_method to NULL in ->anonymize (1.49 KB, patch)
2022-04-21 21:26 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 30288: (follow-up) Use CSS for separator pipes (1.63 KB, patch)
2022-04-21 21:26 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 30288: (follow-up) Use CSS for separator pipes (1.69 KB, patch)
2022-04-25 13:33 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2022-03-14 03:58:42 UTC
We find ourselves using the OPACUserJS and OPACUserCSS system preferences quite often in conjunction with the News tool and HTML Customisation tool. It would be great if they were easy to access while making changes in these tools.
Comment 1 Aleisha Amohia 2022-03-14 04:21:29 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2022-03-14 18:09:56 UTC
I think the links should be wrapped in a permissions check.

My preference, I think, would be for the links to be smaller text links alongside the "See: News" links, but that's just a suggestion. My reasoning is that *usually* the buttons are reserved for "actions" not navigation.
Comment 3 Aleisha Amohia 2022-03-14 23:15:09 UTC
Created attachment 131698 [details] [review]
Bug 30288: Provide links to OPACUserJS and OPACUserCSS in tools

This patch provides easy access to the OPACUserJS and OPACUserCSS system
preferences in the Additional Contents (News and HTML customisations)
sections. These links can be enabled or disabled with the new system preference OPACEnhancementPreferencesLinks.

To test:

1. Apply the patch and update the database to apply the new system preference.
2. In the staff client, go to Tools -> Additional Contents (either News or HTML customisations). Notice there is a link "See News" or "See HTML customisations".
3. Go to Koha Administration -> system preferences -> Tools tab, find the OPACEnhancementPreferencesLinks system preference. Confirm it is disabled by default. Enable it (set to 'provide').
4. Go back to Tools -> Additional contents. Confirm there are now links to "See OPACUserCSS" and "See OPACUserJS".

Sponsored-by: Catalyst IT
Comment 4 Owen Leonard 2022-03-15 10:54:05 UTC
Created attachment 131704 [details] [review]
Bug 30288: Provide links to OPACUserJS and OPACUserCSS in tools

This patch provides easy access to the OPACUserJS and OPACUserCSS
system  preferences in the Additional Contents (News and HTML
customisations) sections.

To test:

1. In the staff client, go to Tools -> News. Notice there is a button to
   add a New entry. Confirm this button is also there when you go to
   Tools -> HTML customisations.
2. Apply the patch and refresh the page.
3. Confirm there are now two new buttons to take you to OPACUserJS and
   OPACUserCSS. Confirm these buttons take you to the correct system
   preference.

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Owen Leonard 2022-03-15 10:54:11 UTC
Created attachment 131705 [details] [review]
Bug 30288: (follow-up) Add permissions check

This follow-up wraps the system preference links in a check for
"parameters_manage_sysprefs" permission so that the links don't display
to those without permission to access system preferences.
Comment 6 Owen Leonard 2022-03-15 10:59:00 UTC
(In reply to Aleisha Amohia from comment #3)
> These links can be enabled or disabled with the new system
> preference OPACEnhancementPreferencesLinks.

I'm sorry for creating confusion Aleisha, I wasn't asking for a system preference. I've restored your original patch and added a follow-up. Please take a look and see if you agree.
Comment 7 Aleisha Amohia 2022-03-16 04:01:05 UTC
Created attachment 131765 [details] [review]
Bug 30288: (follow-up) Add permissions check

This follow-up wraps the system preference links in a check for
"parameters_manage_sysprefs" permission so that the links don't display
to those without permission to access system preferences.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 8 Marcel de Rooy 2022-04-15 09:54:38 UTC
Created attachment 133355 [details] [review]
Bug 30288: Provide links to OPACUserJS and OPACUserCSS in tools

This patch provides easy access to the OPACUserJS and OPACUserCSS
system  preferences in the Additional Contents (News and HTML
customisations) sections.

To test:

1. In the staff client, go to Tools -> News. Notice there is a button to
   add a New entry. Confirm this button is also there when you go to
   Tools -> HTML customisations.
2. Apply the patch and refresh the page.
3. Confirm there are now two new buttons to take you to OPACUserJS and
   OPACUserCSS. Confirm these buttons take you to the correct system
   preference.

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Bug 30288: (follow-up) Add permissions check

This follow-up wraps the system preference links in a check for
"parameters_manage_sysprefs" permission so that the links don't display
to those without permission to access system preferences.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Fridolin Somers 2022-04-21 01:19:16 UTC
Ah this patch adds pipes as separator.

Please use CSS for this, like in #moresearches :

https://git.koha-community.org/Koha-community/Koha/src/commit/833c9efee0c0e01a0223318b578efa77272ed958/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss#L377
Comment 10 Aleisha Amohia 2022-04-21 02:10:08 UTC
Created attachment 133510 [details] [review]
Bug 30288: (follow-up) Use CSS for separator pipes
Comment 11 Lucas Gass 2022-04-21 21:26:52 UTC
Created attachment 133612 [details] [review]
Bug 28786: Don't set auth_method to NULL in ->anonymize

DBI Exception: DBD::mysql::st execute failed: Column 'auth_method' cannot be null

caught by t/db_dependent/Koha/Patrons.t

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 12 Lucas Gass 2022-04-21 21:26:56 UTC
Created attachment 133613 [details] [review]
Bug 30288: (follow-up) Use CSS for separator pipes

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 13 Katrin Fischer 2022-04-25 13:31:51 UTC
It appears like the first patch was already pushed, so only the follow-up is needed now:

https://git.koha-community.org/Koha-community/Koha/commit/aa1def3180f8bc2b0d08b0ac2e57bed29e47d27a
Comment 14 Katrin Fischer 2022-04-25 13:33:10 UTC
Created attachment 133783 [details] [review]
Bug 30288: (follow-up) Use CSS for separator pipes

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 15 Fridolin Somers 2022-04-25 19:39:57 UTC
(In reply to Katrin Fischer from comment #13)
> It appears like the first patch was already pushed, so only the follow-up is
> needed now:
> 
> https://git.koha-community.org/Koha-community/Koha/commit/
> aa1def3180f8bc2b0d08b0ac2e57bed29e47d27a

Oups sorry for that.

I've pushed follow-up and will update status.

Very nice btw ;)
Comment 16 Fridolin Somers 2022-04-25 20:01:43 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄