Bugzilla – Attachment 116353 Details for
Bug 17748
Show due date in item search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17748: [WIP] Not ready for testing
Bug-17748-WIP-Not-ready-for-testing.patch (text/plain), 7.04 KB, created by
Aleisha Amohia
on 2021-02-05 03:02:30 UTC
(
hide
)
Description:
Bug 17748: [WIP] Not ready for testing
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2021-02-05 03:02:30 UTC
Size:
7.04 KB
patch
obsolete
>From 9995be1068aecfe30ce56e352da523c2c0ac0e82 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Fri, 5 Feb 2021 16:01:54 +1300 >Subject: [PATCH] Bug 17748: [WIP] Not ready for testing > >--- > catalogue/itemsearch.pl | 4 ++-- > .../en/includes/catalogue/itemsearch_item.csv.inc | 5 +++++ > .../en/includes/catalogue/itemsearch_item.json.inc | 3 +++ > .../prog/en/modules/catalogue/itemsearch.tt | 20 ++++++++++++++++++++ > 4 files changed, 30 insertions(+), 2 deletions(-) > >diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl >index f5f66fe349..de9988a116 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 { $_ eq $columns[$i] } qw( ccode homebranch holdingbranch location itype notforloan itemlost ) ) { >+ if ( grep { $_ eq $columns[$i] } qw( ccode homebranch holdingbranch location itype notforloan itemlost onloan ) ) { > push @q, "$word"; > push @op, '='; > } else { >@@ -114,7 +114,7 @@ if (scalar keys %params > 0) { > filters => [], > }; > >- foreach my $p (qw(homebranch holdingbranch location itype ccode issues datelastborrowed notforloan itemlost withdrawn)) { >+ foreach my $p (qw(homebranch holdingbranch location itype ccode issues datelastborrowed notforloan itemlost withdrawn onloan)) { > if (my @q = $cgi->multi_param($p)) { > if ($q[0] ne '') { > my $f = { >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 739c145cb5..4a343c6f2e 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,6 +1,7 @@ > [%- USE raw -%] > [%- USE Branches -%] > [%- USE Koha -%] >+[%- USE KohaDates -%] > [%- USE ItemTypes -%] > [%- USE AuthorisedValues -%] > [%- SET biblio = item.biblio -%] >@@ -35,3 +36,7 @@ > "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) || "" | replace('"', '""') | $raw %]" > [%- delimiter | $raw -%] > "[% (item.issues || 0) | $raw %]" >+[%- delimiter | $raw -%] >+"[% IF item.onloan %]Checked out[% ELSIF item.withdrawn || item.damaged || item.notforloan || item.itemlost %]Not available[% ELSE %]Available[% END %]" >+[%- delimiter | $raw -%] >+"[% IF item.checkout %][% item.checkout.date_due | $KohaDates | $raw %][% ELSE %][% END %]" >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 1933950c07..06aa97d529 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 KohaDates -%] > [%- USE To -%] > [%- USE ItemTypes -%] > [%- USE AuthorisedValues -%] >@@ -28,6 +29,8 @@ > "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) || "" | html %]", > "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) || "" | html %]", > "[% (item.issues || 0) | html %]", >+ "[% IF item.onloan %]Checked out[% ELSIF item.withdrawn || item.damaged || item.notforloan || item.itemlost %]Not available[% ELSE %]Available[% END %]", >+ "[% IF item.checkout %][% item.checkout.date_due | $KohaDates | html %][% ELSE %]Not checked out[% END %]", > "[% FILTER escape_quotes ~%] > <div class="btn-group dropup"><button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-pencil"></i> Edit <span class="caret"></span> </button> <ul class="dropdown-menu pull-right"> <li><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]">Edit item</a></li> <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% item.biblionumber | html %]">Edit record</a></li> </ul> </div> > [%~ 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 919fad3188..e5c00b1cf9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >@@ -30,6 +30,7 @@ > [%- CASE 'itemlost' %]<span>Lost</span> > [%- CASE 'withdrawn' %]<span>Withdrawn</span> > [%- CASE 'new_status' %]<span>Is new</span> >+ [%- CASE 'onloan' %]<span>Checked out</span> > [%- END -%] > [%- END -%] > >@@ -138,6 +139,17 @@ > [% loc.label = loc.lib %] > [% END %] > >+[% onloan = [ >+ { >+ value = '0', >+ label = 'Available', >+ }, >+ { >+ value = '1', >+ label = 'Checked out', >+ } >+] %] >+ > [%# Page starts here %] > > [% SET footerjs = 1 %] >@@ -160,6 +172,7 @@ > > <div id="item-search-block"> > <h1>Item search</h1> >+ > <p><a href="/cgi-bin/koha/catalogue/search.pl">Go to advanced search</a></p> > <form action="/cgi-bin/koha/catalogue/itemsearch.pl" method="get" id="itemsearchform"> > <div id="toolbar" class="btn-toolbar"> >@@ -190,6 +203,7 @@ > [% IF withdrawns.size %] > [% INCLUDE form_field_select name="withdrawn" options = withdrawns empty_option = "All statuses" %] > [% END %] >+ [% INCLUDE form_field_select name="onloan" options = onloan empty_option = "All statuses" %] > </fieldset> > <fieldset> > [% INCLUDE form_field_select_text %] >@@ -313,6 +327,8 @@ > + ' <th id="items_itemlost">' + _("Lost status") + '</th>' > + ' <th id="items_widthdrawn">' + _("Withdrawn status") + '</th>' > + ' <th id="items_checkouts">' + _("Checkouts") + '</th>' >+ + ' <th id="items_availability">' + _("Availability") + '</th>' >+ + ' <th id="items_duedate">' + _("Due date") + '</th>' > + ' <th id=""></th>' > + ' </tr>' > var table = '' >@@ -469,6 +485,8 @@ > { 'sName': 'itemlost' }, > { 'sName': 'withdrawn' }, > { 'sName': 'issues' }, >+ { 'sName': 'availability' }, >+ { 'sName': 'duedate' }, > { 'sName': 'actions', 'bSortable': false } > ], > "sPaginationType": "full_numbers" >@@ -515,6 +533,8 @@ > null, > [% END %] > { 'type': 'text' }, >+ { 'type': 'text' }, >+ { 'type': 'text' }, > null > ] > }); >-- >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 17748
:
116353
|
119341
|
128332
|
128333
|
128582
|
128583
|
128584
|
128591
|
128638
|
128645
|
128646
|
128647
|
129623
|
129624
|
129625
|
130154
|
130845
|
130846
|
130847
|
130848
|
130849
|
131051
|
132016
|
132201