Bug 7374: Add remote image option for authorized values
authorOwen Leonard <oleonard@myacpl.org>
Thu, 13 Jan 2022 12:33:34 +0000 (12:33 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 11 Feb 2022 00:44:23 +0000 (14:44 -1000)
commit499c7a0a8d35b060c7e320b17d46b4e6ab991e14
treec6fd76688218ffea4c95b385ac25fce2295adc5d
parent715e3323e143186fc261da01c2ab909ec5d6d095
Bug 7374: Add remote image option for authorized values

This patch adds the option of using a remote image for an authorized
value, just as you can with item types.

To test, apply the patch and go to Administration -> Authorized values.

- Click "CCODE" to view the collection authorized values.
- Edit a collection code.
- In the form, under "Choose an icon," there should now be a "Remote
  image" tab.
- Enter a remote image url, e.g. https://via.placeholder.com/50/FF0000/FFFFFF.png
- Click "Save."
- After the page redirects to the list of collection codes you should
  see your image in the table next to the code you edited.
- Test that you can still edit a collection to set "No image" or to
  use one of the local image sets.
- Test that remote images can also be added when adding a new
  collection.

- Make sure "ccode" is in the "AdvancedSearchTypes" sytem preference.
- Go to the catalog's advanced search page and click the "Collection"
  tab.
- You should see your collection image in the list of collections.
- Perform the same check in the OPAC.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
JD amended patch: fix indentation

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
admin/authorised_values.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt