Bladeren bron

Bug 26032: (follow-up) show 'is new' filter only if items.new_status is used

Also adds a class 'item-new-status' to this filter to be able to hidde
even if items.new_status used.

Addition to test plan:
1) Apply on a database without Koha to MARC mapping on items.new_status
2) Check you dont see the 'is new' filter in items search form
3) Apply on a database with Koha to MARC mapping on items.new_status
4) Check you see class 'form-field item-new-status'

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
20.11.x
Fridolin Somers 4 jaren geleden
gecommit door Jonathan Druart
bovenliggende
commit
0833724afe
  1. 4
      catalogue/itemsearch.pl
  2. 6
      koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt

4
catalogue/itemsearch.pl

@ -102,6 +102,10 @@ my $itemlost_values = $mss->count ? GetAuthorisedValues($mss->next->authorised_v
$mss = Koha::MarcSubfieldStructures->search({ frameworkcode => '', kohafield => 'items.withdrawn', authorised_value => [ -and => {'!=' => undef }, {'!=' => ''}] });
my $withdrawn_values = $mss->count ? GetAuthorisedValues($mss->next->authorised_value) : [];
if ( Koha::MarcSubfieldStructures->search( { frameworkcode => '', kohafield => 'items.new_status' } )->count ) {
$template->param( has_new_status => 1 );
}
if (scalar keys %params > 0) {
# Parameters given, it's a search

6
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt

@ -90,7 +90,7 @@
[% END %]
[% BLOCK form_field_radio_yes_no %]
<div class="form-field">
<div class="form-field [% divclass | html %]">
<label class="form-field-label">[% INCLUDE form_label label=name %]:</label>
<input type="radio" name="[% name | html %]" id="[% name | html %]_indifferent" value="" checked="checked"/>
<label for="[% name | html %]_indifferent">Ignore</label>
@ -195,7 +195,9 @@
<span class="hint">(inclusive)</span>
</div>
[% INCLUDE form_field_radio_yes_no name="damaged" %]
[% INCLUDE form_field_radio_yes_no name="new_status" %]
[% IF ( has_new_status ) %]
[% INCLUDE form_field_radio_yes_no name="new_status" divclass='item-new-status' %]
[% END %]
<div class="form-field">
<label class="form-field-label" for="issues_op">Checkout count:</label>
<select id="issues_op" name="issues_op">

Laden…
Annuleren
Opslaan