Bugzilla – Attachment 164524 Details for
Bug 36509
Add option to search authority records by ID
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[WIP] Bug 36509: Add Search ID tab to authorities search on staff interface
WIP-Bug-36509-Add-Search-ID-tab-to-authorities-sea.patch (text/plain), 5.31 KB, created by
Aleisha Amohia
on 2024-04-08 23:16:48 UTC
(
hide
)
Description:
[WIP] Bug 36509: Add Search ID tab to authorities search on staff interface
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2024-04-08 23:16:48 UTC
Size:
5.31 KB
patch
obsolete
>From 84e7b10ef047e15edfab473f09762dd169fa6de3 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleisha@catalyst.net.nz> >Date: Thu, 4 Apr 2024 01:56:39 +0000 >Subject: [PATCH] [WIP] Bug 36509: Add Search ID tab to authorities search on > staff interface > >--- > C4/AuthoritiesMarc.pm | 3 ++ > .../Elasticsearch/QueryBuilder.pm | 3 +- > .../prog/en/includes/authorities-search.inc | 28 +++++++++++++++++++ > .../prog/en/includes/authorities_js.inc | 2 ++ > 4 files changed, 35 insertions(+), 1 deletion(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index 70c5903dc49..5599a046c5d 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -165,6 +165,9 @@ sub SearchAuthorities { > elsif ( @$tags[$i] eq "thesaurus" ) { > $attr = " \@attr 1=Subject-heading-thesaurus "; > } >+ elsif ( @$tags[$i] eq "local-number" ) { >+ $attr = " \@attr 1=Local-Number "; >+ } > elsif ( @$tags[$i] eq "all" ) { > $attr = " \@attr 1=Any "; > } >diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >index 35ab4b7f91d..1752078453f 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -513,7 +513,7 @@ Arguments: > =item marclist > > An arrayref containing where the particular term should be searched for. >-Options are: mainmainentry, mainentry, match, match-heading, see-from, and >+Options are: mainmainentry, mainentry, match, match-heading, see-from, local-number, and > thesaurus. If left blank, any field is used. > > =item and_or >@@ -562,6 +562,7 @@ our $koha_to_index_name = { > thesaurus => 'subject-heading-thesaurus', > 'thesaurus-conventions' => 'subject-heading-thesaurus-conventions', > any => '', >+ 'local-number' => 'local-number', > all => '' > }; > >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 87fd69c7c51..4ebb14fbe06 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc >@@ -153,6 +153,31 @@ > </form> > [% END # /tab_panel %] > >+ [% WRAPPER tab_panel tabname="search_id" %] >+ <form action="/cgi-bin/koha/authorities/authorities-home.pl" method="get"> >+ <input type="hidden" name="op" value="do_search" /> >+ <input type="hidden" name="type" value="intranet" /> >+ <input type="hidden" name="marclist" value="local-number" /> >+ >+ <div class="form-title"> >+ <label class="control-label" for="value_search_id"><span class="control-text">Search ID<span> <i class="fa fa-fw fa-solid fa-hashtag" aria-hidden="true"></i></label> >+ </div> >+ >+ <div class="form-content"> >+ <input id="value_search_id" class="form-control head-searchbox" type="text" name="value" value="[% value | html %]" placeholder="Search ID (001)" /> >+ <button type="button" class="form-extra-content-toggle" title="More options"><i class="form-extra-content-icon fa-solid fa-sliders" aria-hidden="true"></i></button> >+ </div> >+ >+ <button type="submit" aria-label="Search"><i class="fa fa-arrow-right"></i></button> >+ >+ <div class="form-extra-content"> >+ [% INCLUDE authtype %] >+ [% INCLUDE operator %] >+ [% INCLUDE orderby %] >+ </div> >+ </form> >+ [% END # /tab_panel %] >+ > [% WRAPPER tab_panel tabname="entire_record" %] > <form action="/cgi-bin/koha/authorities/authorities-home.pl" method="get"> > <input type="hidden" name="op" value="do_search" /> >@@ -191,6 +216,9 @@ > [% WRAPPER tab_item tabname= "matchheading_search" %] > <i class="fa fa-fw fa-align-center" aria-hidden="true"></i> <span class="tab-title">All headings</span> > [% END %] >+ [% WRAPPER tab_item tabname= "search_id" %] >+ <i class="fa fa-fw fa-solid fa-hashtag" aria-hidden="true"></i> <span class="tab-title">Search ID</span> >+ [% END %] > [% WRAPPER tab_item tabname= "entire_record" %] > <i class="fa-solid fa-fw fa-folder-open" aria-hidden="true"></i> <span class="tab-title">Entire record</span> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc >index 9b2ca85c9bc..dab9de52b19 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc >@@ -71,6 +71,8 @@ $(document).ready(function () { > $("#header_search a[href='#main_heading']").tab("show"); > } else if ('match' == searchType) { > $("#header_search a[href='#matchheading_search']").tab("show"); >+ } else if ('local-number' == searchType) { >+ $("#header_search a[href='#search_id']").tab("show"); > } else if ('all' == searchType) { > $("#header_search a[href='#entire_record']").tab("show"); > } >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36509
:
164524
|
164576
|
167184