@@ -, +, @@ item types administration tabs - Edit an item type. - On the edit page you should see tabs under "Choose an icon." - Confirm that the tabs look correct and work correctly. - If you did not previously have any icon selected, the "None" tab should be active. - If you had an icon selected, that icon set's tab should be active. - Confirm that if you specify a remote image (e.g.https://via.placeholder.com/50/FF0000/FFFFFF.png) the tab is correctly shown after you save and re-edit. - Confirm that changing icons works correctly and that the selected icon's tab is always active when you return to the edit view. --- .../prog/en/includes/admin-icon-selection.inc | 74 ++++++++++++++++++ .../en/modules/admin/authorised_values.tt | 78 +------------------ .../prog/en/modules/admin/itemtypes.tt | 78 +------------------ 3 files changed, 79 insertions(+), 151 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/admin-icon-selection.inc --- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-icon-selection.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-icon-selection.inc @@ -0,0 +1,74 @@ +[% WRAPPER tabs id= "icons" %] +
Choose an icon:
+ [% WRAPPER tabs_nav %] + [% WRAPPER tab_item tabname="none" %] + None + [% END %] + [% FOREACH imageset IN imagesets %] + [% IF ( imageset.imagesetactive ) %] + [% SET bt_active = 1 %] + [% ELSE %] + [% SET bt_active = 0 %] + [% END %] + [% WRAPPER tab_item tabname= imageset.imagesetname bt_active= bt_active %] [% imageset.imagesetname | html %] [% END %] + [% END %] + [% IF itemtype.image_location('intranet').match('^http') %] + [% SET bt_active = 1 %] + [% ELSE %] + [% SET bt_active = 0 %] + [% END %] + [% WRAPPER tab_item tabname= "remote" bt_active= bt_active %] Remote image [% END %] + [% END %] + + [% WRAPPER tab_panels %] + [% WRAPPER tab_panel tabname="none" %] +
+ +
+ [% END %] + [% FOREACH imageset IN imagesets %] + [% IF ( imageset.imagesetactive ) %] + [% SET bt_active = 1 %] + [% ELSE %] + [% SET bt_active = 0 %] + [% END %] + [% WRAPPER tab_panel tabname=imageset.imagesetname bt_active= bt_active %] +
+ [% FOREACH image IN imageset.images %] + + [% END #/ FOREACH image %] +
+ [% END # /tab_panel %] + [% END # /FOREACH imageset %] + [% SET image_location = itemtype.image_location('intranet') %] + [% IF image_location.match('^http') %] + [% SET bt_active = 1 %] + [% ELSE %] + [% SET bt_active = 0 %] + [% END %] + [% WRAPPER tab_panel tabname="remote" %] + + [% IF image_location.match('^http') %] + + + [% IF itemtype.imageurl %] + + [% END %] + [% ELSE %] + + + [% END %] + [% END %] + [% END # /tab_panels %] +[% END # /tabs#icons %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt @@ -175,82 +175,8 @@ -
-
Choose an icon:
- -
-
-
- -
-
- - [% FOREACH imageset IN imagesets %] - [% IF ( imageset.imagesetactive ) %] -
- [% ELSE %] -
- [% END %] -
- [% FOREACH image IN imageset.images %] - - [% END # /FOREACH image %] -
-
- [% END # /FOREACH imageset %] - - [% IF av.imageurl.match('^http') %] -
- [% ELSE %] -
- [% END %] - - [% IF av.imageurl.match('^http') %] - - - - [% ELSE %] - - - [% END %] -
-
-
+ [% INCLUDE 'admin-icon-selection.inc' %] + [% END # /IF action_add_category %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt @@ -237,83 +237,11 @@ Item types › Administration › Koha [% END %] - [% UNLESS Koha.Preference('noItemTypeImages') && Koha.Preference('OpacNoItemTypeImages') %] -
-
Choose an icon:
- -
-
-
- -
-
- - [% FOREACH imageset IN imagesets %] - [% IF ( imageset.imagesetactive ) %] -
- [% ELSE %] -
- [% END %] -
- [% FOREACH image IN imageset.images %] - - [% END #/ FOREACH image %] -
-
- [% END #/FOREACH imageset %] - [% SET image_location = itemtype.image_location('intranet') %] - [% IF image_location.match('^http') %] -
- [% ELSE %] -
- [% END %] - - [% IF image_location.match('^http') %] - - - [% IF itemtype.imageurl %] - - [% END %] - [% ELSE %] - - - [% END %] -
-
-
+ [% UNLESS Koha.Preference('noItemTypeImages') && Koha.Preference('OpacNoItemTypeImages') %] + [% INCLUDE 'admin-icon-selection.inc' %] [% END %] +
  1. --