From 49dcdc4395f6b58b3975790cd4173667c4511df5 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Mon, 4 Sep 2023 16:03:32 +0000 Subject: [PATCH] Bug 34707: Apply *-search.inc abstraction to cities PROOF OF CONCEPT I've applied this idea to cities to start discussion around this. --- .../prog/en/modules/admin/cities.tt | 65 ++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt index c5b756a125..e07f227040 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt @@ -25,7 +25,70 @@ [% WRAPPER 'header.inc' %] - [% INCLUDE 'cities-admin-search.inc' %] +[% header_search_tabs = [ + { + id => 'city_search', + is_active => 1, + is_allowed => 1, + label => 'Search cities', #TODO:translate + icon => 'fa-building', + form_action => undef, + form_id => undef, + form_method => 'POST', + inputs => [ + { + id => 'city_name_filter', + name => 'city_name_filter', + type => 'text', + value => city_name_filter, + placeholder => 'City search', + class => 'head-searchbox form-control', + } + ] + }, + { + id => 'circ_search', + is_active => 0, + is_allowed => CAN_user_circulate_circulate_remaining_permissions, + label => 'Check out', #TODO:translate + icon => 'fa-upload', + form_action => '/cgi-bin/koha/circ/circulation.pl', + form_id => 'patronsearch', + form_method => 'POST', + inputs => [ + { + id => 'findborrower', + name => 'findborrower', + type => 'text', + value => undef, + placeholder => 'Enter patron card number or partial name', + class => 'head-searchbox form-control', + }, + ] + }, + { + id => 'catalog_search', + is_active => 0, + is_allowed => CAN_user_catalogue, + label => 'Search catalog', #TODO:translate + icon => 'fa-search', + form_action => '/cgi-bin/koha/catalogue/search.pl', + form_id => 'cat-search-block', + form_method => 'GET', + inputs => [ + { + id => 'search-form', + name => 'q', + type => 'text', + value => undef, + placeholder => 'Enter search keywords', + class => 'head-searchbox form-control', + } + ] + } +]; +%] +[% INCLUDE 'common/header-search-tabs.inc' header_search_tabs => header_search_tabs %] [% END %] [% WRAPPER 'sub-header.inc' %] -- 2.30.2