From 10585d2cb5d9e99d4c62d510065c26f222e04848 Mon Sep 17 00:00:00 2001 From: Solene Desvaux Date: Fri, 8 Jul 2022 13:45:24 +0200 Subject: [PATCH] Bug 30952: script searchbar --- .../prog/en/includes/acquisitions-search.inc | 86 +-- .../prog/en/includes/adv-search.inc | 82 +-- .../prog/en/includes/authorities-search.inc | 90 +-- .../prog/en/includes/budgets-admin-search.inc | 78 +-- .../prog/en/includes/cat-search.inc | 38 +- .../prog/en/includes/cataloging-search.inc | 41 +- .../prog/en/includes/checkin-search.inc | 83 +-- .../prog/en/includes/circ-search.inc | 75 +-- .../prog/en/includes/cities-admin-search.inc | 75 +-- .../en/includes/contracts-admin-search.inc | 75 +-- .../en/includes/currencies-admin-search.inc | 75 +-- .../prog/en/includes/desks-admin-search.inc | 75 +-- .../prog/en/includes/home-search.inc | 78 +-- .../prog/en/includes/letters-search.inc | 75 +-- .../prog/en/includes/patron-search-header.inc | 88 +-- .../prog/en/includes/patrons-admin-search.inc | 75 +-- .../prog/en/includes/prefs-admin-search.inc | 78 +-- .../prog/en/includes/searchbaruse.inc | 72 +++ .../prog/en/includes/serials-search.inc | 74 +-- .../prog/en/includes/subscriptions-search.inc | 26 +- .../en/includes/suggestions-add-search.inc | 75 +-- .../prog/en/includes/z3950-admin-search.inc | 75 +-- .../prog/en/modules/admin/didyoumean.tt | 106 ++-- .../prog/en/modules/circ/circulation.tt | 184 ++++-- .../prog/en/modules/reserve/request.tt | 598 +++++++++--------- .../tools/batch_record_modification.tt | 87 +-- 26 files changed, 661 insertions(+), 1903 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/searchbaruse.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc index 58a74deda0..38b94ea751 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc @@ -13,11 +13,11 @@ - - [+] + + [+] - @@ -32,83 +32,7 @@ Vendor search Orders search - + - - - - - - +[% INCLUDE 'searchbaruse.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/adv-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/adv-search.inc index 19401337b2..a3ce22f1a7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/adv-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/adv-search.inc @@ -40,85 +40,7 @@ Renew Search patrons - - - - - - - - + +[% INCLUDE 'searchbaruse.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc index 57cda07ccf..75ac30c94f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc @@ -4,7 +4,7 @@
- [% IF ( orderby == 'HeadingAsc' ) %] [% ELSE %] @@ -22,7 +22,7 @@ [% END %] -

+

+ -

+

+ -

+

+ -

+

- - + + +

+ [% END %] [% INCLUDE 'catalogue-search-box.inc' %] - - + - - - +[% INCLUDE 'searchbaruse.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkin-search.inc index 3aad22ff79..f43fc88724 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkin-search.inc @@ -8,7 +8,7 @@ [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] @@ -25,85 +25,8 @@ Renew Search catalog - + - - - - +[% INCLUDE 'searchbaruse.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc index e20271f8ab..959e68810a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc @@ -36,78 +36,5 @@ - - +[% INCLUDE 'searchbaruse.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-search.inc index 0f371302fa..58407ca786 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-search.inc @@ -22,78 +22,5 @@ - - +[% INCLUDE 'searchbaruse.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/contracts-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/contracts-admin-search.inc index d3b8bf80b0..68b297d578 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/contracts-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/contracts-admin-search.inc @@ -23,78 +23,5 @@ - - +[% INCLUDE 'searchbaruse.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/currencies-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/currencies-admin-search.inc index 3ec15b8d26..addbf32ae2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/currencies-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/currencies-admin-search.inc @@ -23,78 +23,5 @@ - - +[% INCLUDE 'searchbaruse.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/desks-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/desks-admin-search.inc index 07c4ebb701..6725936e01 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/desks-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/desks-admin-search.inc @@ -23,78 +23,5 @@ - - +[% INCLUDE 'searchbaruse.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc index 79dc3cd26a..78f2fa9630 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc @@ -46,83 +46,9 @@ Search patrons Search catalog - + - - - +[% INCLUDE 'searchbaruse.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/letters-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/letters-search.inc index 8e9dffa580..ee703341f6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/letters-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/letters-search.inc @@ -23,78 +23,5 @@ - - +[% INCLUDE 'searchbaruse.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc index a36f469db1..e590e1f092 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc @@ -17,7 +17,7 @@ -
  • [% END %] Search patrons - Check out + Check out Check in Renew Search catalog - - - - +[% INCLUDE 'searchbaruse.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patrons-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patrons-admin-search.inc index 8b891a0d1c..93fbf34363 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patrons-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patrons-admin-search.inc @@ -23,78 +23,5 @@ - - +[% INCLUDE 'searchbaruse.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc index d2d3a7c4fc..e94e11d8e0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc @@ -24,81 +24,7 @@ Check out Search the catalog - + - - - +[% INCLUDE 'searchbaruse.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/searchbaruse.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/searchbaruse.inc new file mode 100644 index 0000000000..5faf1f30e6 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/searchbaruse.inc @@ -0,0 +1,72 @@ + \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc index 7efbeeab0f..8f24f8a9e1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc @@ -33,77 +33,5 @@ - - +[% INCLUDE 'searchbaruse.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/subscriptions-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/subscriptions-search.inc index 13e83a90a2..41d81f066f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/subscriptions-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/subscriptions-search.inc @@ -1,39 +1,39 @@ [% PROCESS 'html_helpers.inc' %]
    -
    +
    - - +[% INCLUDE 'searchbaruse.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt index 81c3e0d8bf..0d48c25b8b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt @@ -1,47 +1,35 @@ [% USE raw %] [% USE Asset %] [% SET footerjs = 1 %] -[% formulaire = BLOCK %] - [% INCLUDE 'prefs-admin-search.inc' %] -[% END %] - [% BLOCK pluginlist %]
    - [% FOREACH plugin IN plugins %] -
    -
    - [% IF plugin.enabled %] - - [% ELSE %] - - [% END %] - - -
    - -
    - [% SWITCH plugin.name %] - [% CASE 'AuthorityFile' %] - Suggest authorities which are relevant to the term the user searched for. - [% CASE 'ExplodedTerms' %] - Suggest that patrons expand their searches to include broader/narrower/related terms. - [% CASE 'LibrisSpellcheck' %] - Use the LIBRIS spellcheck API. - [% END %] -
    +[% FOREACH plugin IN plugins %] +
    +
    + [% IF plugin.enabled %][% ELSE %][% END %] +
    +
    + [% SWITCH plugin.name %] + [% CASE 'AuthorityFile' %] + Suggest authorities which are relevant to the term the user searched for. + [% CASE 'ExplodedTerms' %] + Suggest that patrons expand their searches to include broader/narrower/related terms. + [% CASE 'LibrisSpellcheck' %] + Use the LIBRIS spellcheck API. + [% END %]
    - [% END %] +
    +[% END %]
    [% END %] - [% INCLUDE 'doc-head-open.inc' %] Did you mean? › Administration › Koha [% INCLUDE 'doc-head-close.inc' %] - -[% INCLUDE 'header.inc' form=formulaire %] +[% INCLUDE 'header.inc' %] +[% INCLUDE 'prefs-admin-search.inc' %]
    @@ -72,34 +52,27 @@
    -

    Did you mean?

    - - - -
    - Please put the 'Did you mean?' plugins in order by significance, from - most significant to least significant, and check the box to enable those - plugins that you want to use. -
    +

    Did you mean?

    + +
    + Please put the 'Did you mean?' plugins in order by significance, from + most significant to least significant, and check the box to enable those + plugins that you want to use. +
    + +
    + OPAC + [% PROCESS pluginlist plugins=OPACpluginlist type='opac' %] +
    +
    Cancel
    + -
    -
    -

    OPAC

    - [% PROCESS pluginlist plugins=OPACpluginlist type='opac' %] - - Cancel -
    -
    @@ -108,7 +81,7 @@ [% INCLUDE 'admin-menu.inc' %]
    -
    + [% MACRO jsinclude BLOCK %] [% Asset.js("js/admin-menu.js") | $raw %] @@ -158,5 +131,4 @@ } [% END %] - [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index ccb9bb3834..f433448406 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -10,9 +10,6 @@ [% USE Price %] [% USE AuthorisedValues %] [% SET footerjs = 1 %] -[% formulaire = BLOCK %] - [% INCLUDE 'circ-search.inc' %] -[% END %] [% INCLUDE 'doc-head-open.inc' %] [% Asset.css("lib/jquery/plugins/rowGroup/stylesheets/rowGroup.dataTables.min.css") | $raw %] [% SET destination = "circ" %] @@ -27,7 +24,8 @@ - [% INCLUDE 'header.inc' form=formulaire %] + [% INCLUDE 'header.inc' %] + [% INCLUDE 'circ-search.inc' %] [% ELSE %]