From 492481d14ea0108bffcae33de9f3547f507c188a Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 14 May 2021 15:04:38 +0000 Subject: [PATCH] Bug 28356: Consolidate catalogue search box code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit To test: 1 - Apply patch 2 - Confirm searchign the catalog works from: Administration->Budgets Cataloging Circulation->Check in Administration->Cities and towns Acquisitions->{Vendor}->Contracts Administration->Currencies Administration->Circulation desks (requires UseCirculationDesks preference) Home Tools->Notices and slips Patrons Adminstration Serials Acquisitions->Suggestions Administration->Z39.50/SRU servers Signed-off-by: hakam Signed-off-by: Joonas Kylmälä Signed-off-by: Jonathan Druart --- .../prog/en/includes/budgets-admin-search.inc | 64 +++++++++---------- .../prog/en/includes/cat-search.inc | 15 +---- .../prog/en/includes/cataloging-search.inc | 14 +--- .../prog/en/includes/catalogue-search-box.inc | 12 ++++ .../prog/en/includes/checkin-search.inc | 15 +---- .../prog/en/includes/circ-search.inc | 15 +---- .../prog/en/includes/cities-admin-search.inc | 14 +--- .../en/includes/contracts-admin-search.inc | 15 +---- .../en/includes/currencies-admin-search.inc | 14 +--- .../prog/en/includes/desks-admin-search.inc | 14 +--- .../prog/en/includes/home-search.inc | 11 +--- .../prog/en/includes/letters-search.inc | 14 +--- .../prog/en/includes/patron-search.inc | 14 +--- .../prog/en/includes/prefs-admin-search.inc | 15 +---- .../prog/en/includes/serials-search.inc | 15 +---- .../en/includes/suggestions-add-search.inc | 15 +---- .../prog/en/includes/z3950-admin-search.inc | 15 +---- 17 files changed, 57 insertions(+), 234 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc index 894f844a1b..fd188ddbe8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc @@ -3,43 +3,39 @@

[% LibraryName | html %]

- -[% INCLUDE 'patron-search-box.inc' %] + [% INCLUDE 'patron-search-box.inc' %] + [% INCLUDE 'catalogue-search-box.inc' %] - [% IF ( CAN_user_catalogue ) %] - [% END %] -
+ [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] +
  • Check out
  • + [% END %] + [% IF ( CAN_user_catalogue ) %] +
  • Search the catalog
  • + [% END %] + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc index cdafcfe01f..39409999f2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc @@ -23,20 +23,7 @@ [% END %] -[% IF ( CAN_user_catalogue ) %] - -[% END %] +[% INCLUDE 'catalogue-search-box.inc' %]
      [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
    • Check out
    • [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-search.inc index 20c7d9d2c3..a68e36abd4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-search.inc @@ -29,19 +29,7 @@ [% END %] - - + [% INCLUDE 'catalogue-search-box.inc' %]
      • Cataloging search
      • diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc new file mode 100644 index 0000000000..134bf93de8 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc @@ -0,0 +1,12 @@ +[% IF ( CAN_user_catalogue ) %] + +[% END %] 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 ef3a232e78..9d81f7abf2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkin-search.inc @@ -14,20 +14,7 @@ [% END %] -[% IF ( CAN_user_catalogue ) %] - -[% END %] +[% INCLUDE 'catalogue-search-box.inc' %]
          [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
        • Check out
        • [% END %] [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
        • Renew
        • [% END %] 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 8892c0d264..de45b257d7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc @@ -4,6 +4,7 @@ [% INCLUDE 'patron-search-box.inc' %] + [% INCLUDE 'catalogue-search-box.inc' %] - [% IF ( CAN_user_catalogue ) %] - [% END %]
          • Search cities
          • [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
          • Check out
          • [% END %] 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 d6060cea7d..710346c2a2 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 @@ -12,20 +12,7 @@ [% INCLUDE 'patron-search-box.inc' %] - - [% IF ( CAN_user_catalogue ) %] - [% END %] + [% INCLUDE 'catalogue-search-box.inc' %]
            • Search contracts
            • 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 70e00c92b2..bc0028354c 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 @@ -10,19 +10,7 @@ [% INCLUDE 'patron-search-box.inc' %] - [% IF ( CAN_user_catalogue ) %] - [% END %] + [% INCLUDE 'catalogue-search-box.inc' %]
              • Search currencies
              • [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
              • Check out
              • [% END %] 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 5b67592d68..19799eb5ca 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 @@ -11,20 +11,8 @@ [% INCLUDE 'patron-search-box.inc' %] + [% INCLUDE 'catalogue-search-box.inc' %] - [% IF ( CAN_user_catalogue ) %] - [% END %]
                • Search desks
                • [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
                • Check out
                • [% END %] 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 eb397b8b5a..d102c4a729 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc @@ -30,16 +30,7 @@ [% END %] -[% IF ( CAN_user_catalogue ) %] -[% END %] - +[% INCLUDE 'catalogue-search-box.inc' %]
                    [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
                  • Check out
                  • [% END %] [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
                  • Check in
                  • [% END %] 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 3f60b68533..db27659511 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/letters-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/letters-search.inc @@ -10,19 +10,7 @@ [% INCLUDE 'patron-search-box.inc' %] - [% IF ( CAN_user_catalogue ) %] - [% END %] + [% INCLUDE 'catalogue-search-box.inc' %]
                    • Search notices
                    • [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
                    • Check out
                    • [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc index b8aee067d9..1aa4695213 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -97,19 +97,7 @@ [% END %] - [% IF ( CAN_user_catalogue ) %] - [% END %] + [% INCLUDE 'catalogue-search-box.inc' %]
                      • Search patrons
                      • 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 996f7cacad..4aa9da5bcb 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 @@ -12,20 +12,7 @@ [% INCLUDE 'patron-search-box.inc' %] - [% IF ( CAN_user_catalogue ) %] - - [% END %] + [% INCLUDE 'catalogue-search-box.inc' %]
                        • Search system preferences
                        • [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
                        • Check out
                        • [% END %] 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 ee25012e20..64f6fdb46a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc @@ -19,20 +19,7 @@ [% INCLUDE 'patron-search-box.inc' %] - [% IF ( CAN_user_catalogue ) %] - - [% END %] + [% INCLUDE 'catalogue-search-box.inc' %]
                          • Search subscriptions
                          • [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
                          • Check out
                          • [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/suggestions-add-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/suggestions-add-search.inc index 12b3fab3a5..a76245128f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/suggestions-add-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/suggestions-add-search.inc @@ -14,21 +14,8 @@ [% INCLUDE 'patron-search-box.inc' %] + [% INCLUDE 'catalogue-search-box.inc' %] - [% IF ( CAN_user_catalogue ) %] - - [% END %]
                            • Search suggestions
                            • [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
                            • Check out
                            • [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/z3950-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/z3950-admin-search.inc index 51f77ee0b3..80223345fd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/z3950-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/z3950-admin-search.inc @@ -11,21 +11,8 @@ [% INCLUDE 'patron-search-box.inc' %] + [% INCLUDE 'catalogue-search-box.inc' %] - [% IF ( CAN_user_catalogue ) %] - - [% END %]