Created attachment 94271 [details] screenshot Test plan: 1) Log in to Staff UI with superlibrarian permissions 2) Go to System Preferences /cgi-bin/koha/admin/preferences.pl 3) Next to each preference, there should now be a bookmark icon 4) The bookmark icon links to a search for the exact preference name 5) The link can be bookmarked for quick reference to the specific preference
Created attachment 94272 [details] [review] Bug 23823: Allow system preferences to be bookmarked Test plan: 1) Log in to Staff UI with superlibrarian permissions 2) Go to System Preferences /cgi-bin/koha/admin/preferences.pl 3) Next to each preference, there should now be a bookmark icon 4) The bookmark icon links to a search for the exact preference name 5) The link can be bookmarked for quick reference to the specific preference
Don't forget to change the status to 'Needs Signoff' once you have attached your patches for testing. You should also change the Assignee to yourself, once you have decided to work on something. Thx for the contribution! :)
Created attachment 94361 [details] [review] Bug 23823: Allow system preferences to be bookmarked Test plan: 1) Log in to Staff UI with superlibrarian permissions 2) Go to System Preferences /cgi-bin/koha/admin/preferences.pl 3) Next to each preference, there should now be a bookmark icon 4) The bookmark icon links to a search for the exact preference name 5) The link can be bookmarked for quick reference to the specific preference Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 94362 [details] [review] Bug 23823: (follow-up) Get rid of some tabs in favor of spaces In the paragraph touched by this patch, there were some whitespace issues. This patch does some tab to space replacement and reindentation to make the code more readable. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Hi Ivan, Welcome to the team, it's great to have another new contributor. I'm afraid the QA scripts throw up a minor error: FAIL koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt FAIL filters wrong_html_filter at line 59 ( <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=[% NAME.name | html %]">) It's should be simple enough to fix, you just need to replace the `| html` with `| uri` as the template variable is being used inside a url string here. A quick followup with that change as it's own little patch would be perfect and then I can pass qa on this set. Many thanks, Martin
Secondary thought, I wonder if it might be 'nicer' to link to the preference in context (rather than individually displayed as a search result) using anchors instead? Something along the lines of giving the `code` block an id of the preference code and then constructing the link following something like `/cgi-bin/koha/admin/preferences.pl?tab=accounting/#pref_code`.
(In reply to Martin Renvoize from comment #6) > Secondary thought, I wonder if it might be 'nicer' to link to the preference > in context (rather than individually displayed as a search result) using > anchors instead? > > Something along the lines of giving the `code` block an id of the preference > code and then constructing the link following something like > `/cgi-bin/koha/admin/preferences.pl?tab=accounting/#pref_code`. Sorry for missing the filter - missed it when I fixed some tabs over spaces. I feel this is a pragmatic solution that we could still extend later on.
Tbh, I also like the 'without context' approach here. you could modify the bookmark to make a more general search if you wanted some more to show. But it would make link in documentation etc. very clear and easy to follow without having to locate the right pref again on a page, where it might show at the top, or the middle, depending on length of the page.
Created attachment 94366 [details] [review] Bug 23823: (follow-up) Get rid of some tabs in favor of spaces In the paragraph touched by this patch, there were some whitespace issues. This patch does some tab to space replacement and reindentation to make the code more readable. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Ivan Masár <helix84@centrum.sk>
Thank you for review. When I was originally looking for a way to bookmark sysprefs, I thought I will just bookmark the anchor like Martin suggested. There were no anchors, so I looked some more and found the search/filter, which worked for me. Now that I've been using it for a while I like it more for the same reason Katrin mentioned - if I know exactly what I'm looking for, I don't need to potentially look for it wherever it may land on screen. That said, I see two ways to improve the current situation: 1) Since this is substring search, not exact search, bookmarking GoogleOpenIDConnect will also show GoogleOpenIDConnectAutoRegister and a few others. My intent was to link to one exact syspref. Is there a parameter to specify exact search? 2) If context is what's desired, we may add a bookmark icon for section anchors (e.g. anchor "Google OpenID Connect" on the Administration tab).
Also, I just noticed there's systempreferences.pl (vs preferences.pl). Is this newer, older or something else entirely? (asking just in case I'm making changes to code to be deprecated)
One of them is used for local prefs that are not reflected in the YAML files and for that not searchable.
See tab "Local use"
It's just come to my attention that bug 23388 is attempting to do something similar to this already... just trying to work out how they sit in context.
Created attachment 94367 [details] [review] Bug 23823: (follow-up) minor visual fix Do not allow a line break between the bookmark icon and syspref name.
@Martin: I see that bug 23388 provides the previously mentioned alternate solution via anchor links. Nice to see that I'm not the only one who had the same need (I haven't seen the other bug before).
I've posted a work-in-progress patch to Bug 23388. If anyone is interested in testing I'd love to get some feedback.
Created attachment 111625 [details] [review] Bug 23823: (follow-up) minor visual fix Do not allow a line break between the bookmark icon and syspref name. Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Created attachment 111626 [details] [review] Bug 23823: Allow system preferences to be bookmarked Test plan: 1) Log in to Staff UI with superlibrarian permissions 2) Go to System Preferences /cgi-bin/koha/admin/preferences.pl 3) Next to each preference, there should now be a bookmark icon 4) The bookmark icon links to a search for the exact preference name 5) The link can be bookmarked for quick reference to the specific preference Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Created attachment 111627 [details] [review] Bug 23823: (follow-up) Get rid of some tabs in favor of spaces In the paragraph touched by this patch, there were some whitespace issues. This patch does some tab to space replacement and reindentation to make the code more readable. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Ivan Masár <helix84@centrum.sk> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Created attachment 111628 [details] [review] Bug 23823: (follow-up) minor visual fix Do not allow a line break between the bookmark icon and syspref name. Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Sorry for the first bad sign off, forgot to check the number of attachments... Hope it won't be a problem for QA.
Owen, can you take a look here and let me know if you approve? It works for me, but I think maybe it has the same issues you didn't like on 23388
(In reply to Nick Clemens from comment #23) > It works for > me, but I think maybe it has the same issues you didn't like on 23388 No, the issues I had with how Bug 23388 was working aren't relevant to this patch. I think this one works well.
Created attachment 111864 [details] [review] Bug 23823: Allow system preferences to be bookmarked Test plan: 1) Log in to Staff UI with superlibrarian permissions 2) Go to System Preferences /cgi-bin/koha/admin/preferences.pl 3) Next to each preference, there should now be a bookmark icon 4) The bookmark icon links to a search for the exact preference name 5) The link can be bookmarked for quick reference to the specific preference Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 111865 [details] [review] Bug 23823: (follow-up) Get rid of some tabs in favor of spaces In the paragraph touched by this patch, there were some whitespace issues. This patch does some tab to space replacement and reindentation to make the code more readable. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Ivan Masár <helix84@centrum.sk> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 111866 [details] [review] Bug 23823: (follow-up) minor visual fix Do not allow a line break between the bookmark icon and syspref name. Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 111867 [details] [review] Bug 23823: (QA follow-up) Fix filter in link Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
*** Bug 23388 has been marked as a duplicate of this bug. ***
This looks very useful. Great to see a Koha patch from you, Ivan! For those that don't know, Ivan (helix84) has been contributing to DSpace for quite a few years now. Hopefully we'll see more patches :D.
Pushed to master for 20.11, thanks to everybody involved!
Congratulations for your first patch pushed, Ivan!
enhancement will not be backported to 20.05.x