Bugzilla – Attachment 88190 Details for
Bug 22649
Add item type to item search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22649: Add itemtype to item search results and CSV file
Bug-22649-Add-itemtype-to-item-search-results-and-.patch (text/plain), 6.79 KB, created by
Josef Moravec
on 2019-04-17 12:35:26 UTC
(
hide
)
Description:
Bug 22649: Add itemtype to item search results and CSV file
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2019-04-17 12:35:26 UTC
Size:
6.79 KB
patch
obsolete
>From 02f04e6976c7e9d8de3fa946f11e298490e62765 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Sat, 6 Apr 2019 12:42:39 +0000 >Subject: [PATCH] Bug 22649: Add itemtype to item search results and CSV file > >The itemtype can be searched for in the item search form, but >it is not displayed in the result list. >This patch adds the itemtype to the display and the CSV export >file. > >To test: >- Try different item searches >- Verify that the itemtype now shows in the result list >- Export to CSV >- Verify that the itemtype shows there correctly as well > >Signed-off-by: Axel Amghar <axel.amghar@gmail.com> > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > catalogue/itemsearch.pl | 2 +- > .../prog/en/includes/catalogue/itemsearch_item.csv.inc | 3 ++- > .../prog/en/includes/catalogue/itemsearch_item.json.inc | 2 ++ > .../prog/en/includes/csv_headers/catalogue/itemsearch.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt | 7 +++++++ > 5 files changed, 13 insertions(+), 3 deletions(-) > >diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl >index ab833db3e2..ed6abc9a9d 100755 >--- a/catalogue/itemsearch.pl >+++ b/catalogue/itemsearch.pl >@@ -63,7 +63,7 @@ if (defined $format and $format eq 'json') { > push @f, $columns[$i]; > push @c, 'and'; > >- if ( grep /^$columns[$i]$/, qw( ccode homebranch holdingbranch location notforloan ) ) { >+ if ( grep /^$columns[$i]$/, qw( ccode homebranch holdingbranch location itype notforloan ) ) { > push @q, "$word"; > push @op, '='; > } else { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc >index e0be3537a1..93379a9fd2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc >@@ -1,5 +1,6 @@ > [%- USE Branches -%] > [%- USE Koha -%] >+[%- USE ItemTypes -%] > [%- SET biblio = item.biblio -%] > [%- SET biblioitem = item.biblioitem -%] >-"[% biblio.title | html %] [% IF ( Koha.Preference( 'marcflavour' ) == 'UNIMARC' && biblio.author ) %]by [% END %][% biblio.author | html %]", "[% (biblioitem.publicationyear || biblio.copyrightdate) | html %]", "[% biblioitem.publishercode | html %]", "[% biblioitem.collectiontitle | html %]", "[% item.barcode | html %]", "[% item.itemcallnumber | html %]", "[% Branches.GetName(item.homebranch) | html %]", "[% Branches.GetName(item.holdingbranch) | html %]", "[% item.location | html %]", "[% item.stocknumber | html %]", "[% item.status | html %]", "[% (item.issues || 0) | html %]" >+"[% biblio.title | html %] [% IF ( Koha.Preference( 'marcflavour' ) == 'UNIMARC' && biblio.author ) %]by [% END %][% biblio.author | html %]", "[% (biblioitem.publicationyear || biblio.copyrightdate) | html %]", "[% biblioitem.publishercode | html %]", "[% biblioitem.collectiontitle | html %]", "[% item.barcode | html %]", "[% item.itemcallnumber | html %]", "[% Branches.GetName(item.homebranch) | html %]", "[% Branches.GetName(item.holdingbranch) | html %]", "[% item.location | html %]", "[% ItemTypes.GetDescription(item.itype) | html %]", "[% item.stocknumber | html %]", "[% item.status | html %]", "[% (item.issues || 0) | html %]" >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc >index 45b43f647b..0207f6b9ab 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc >@@ -1,5 +1,6 @@ > [%- USE Branches -%] > [%- USE Koha -%] >+[%- USE ItemTypes -%] > [% USE AuthorisedValues %] > [%- biblio = item.biblio -%] > [%- biblioitem = item.biblioitem -%] >@@ -17,6 +18,7 @@ > "[% Branches.GetName(item.homebranch) | html %]", > "[% Branches.GetName(item.holdingbranch) | html %]", > "[% item.location | html %]", >+ "[% ItemTypes.GetDescription(item.itype) | html %]", > "[% item.stocknumber | html %]", > "[% item.status | html %]", > "[% (item.issues || 0) | html %]", >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt >index 8add507eec..8659836ba6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt >@@ -1 +1 @@ >-[%- BLOCK -%]Title, Publication date, Publisher, Collection, Barcode, Call number, Home library, Current location, Shelving location, Inventory number, Status, Checkouts[%- END -%] >+[%- BLOCK -%]Title, Publication date, Publisher, Collection, Barcode, Call number, Home library, Current location, Shelving location, Itemtype, Inventory number, Status, Checkouts[%- END -%] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >index c7c3668257..a3309fecd9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >@@ -269,6 +269,7 @@ > + ' <th id="items_homebranch">' + _("Home library") + '</th>' > + ' <th id="items_holdingbranch">' + _("Current location") + '</th>' > + ' <th id="items_location">' + _("Shelving location") + '</th>' >+ + ' <th id="items_itype">' + _("Itemtype") + '</th>' > + ' <th id="item_inventoryno">' + _("Inventory number") + '</th>' > + ' <th id="items_status">' + _("Status") + '</th>' > + ' <th id="items_checkouts">' + _("Checkouts") + '</th>' >@@ -370,6 +371,7 @@ > { 'sName': 'homebranch' }, > { 'sName': 'holdingbranch' }, > { 'sName': 'location' }, >+ { 'sName': 'itype'}, > { 'sName': 'stocknumber' }, > { 'sName': 'notforloan' }, > { 'sName': 'issues' }, >@@ -396,6 +398,11 @@ > [% ELSE %] > null, > [% END %] >+ [% IF itemtypes.size %] >+ { 'type': 'select', 'values': [% INCLUDE escape_html_value_label elts => itemtypes %] }, >+ [% ELSE %] >+ null, >+ [% END %] > { 'type': 'text' }, > [% IF notforloans.size %] > { 'type': 'select', 'values': [% INCLUDE escape_html_value_label elts => notforloans %] }, >-- >2.11.0
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 22649
:
87474
|
87514
|
87724
| 88190