From ab3d2e4673ffc73201dcafd24fc46718c6f85cab Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 16 Dec 2021 15:13:20 +1300 Subject: [PATCH] Bug 17748: (follow-up) Remove availability column MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Items can now only be filtered by 'Checked out' or 'not' rather than looking at damaged/itemlost/withdrawn/notforloan status. Removed availability column as Checked out items are made clear by the due date column. Signed-off-by: Christian Stelzenmüller Signed-off-by: Jonathan Druart Signed-off-by: Fridolin Somers --- C4/Items.pm | 2 +- .../prog/en/includes/catalogue/itemsearch_item.csv.inc | 2 -- .../prog/en/includes/catalogue/itemsearch_item.json.inc | 1 - .../prog/en/includes/csv_headers/catalogue/itemsearch.tt | 2 -- .../intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt | 5 ----- 5 files changed, 1 insertion(+), 11 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 15f735edb5..a61fe9d0d2 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1468,7 +1468,7 @@ sub SearchItems { if ( $params->{sortby} eq 'availability' ) { my $sortorder = (uc($params->{sortorder}) eq 'ASC') ? 'ASC' : 'DESC'; - $query .= qq{ ORDER BY onloan $sortorder, damaged $sortorder, withdrawn $sortorder, notforloan $sortorder, itemlost $sortorder }; + $query .= qq{ ORDER BY onloan $sortorder }; } else { my $sortby = (0 < grep {$params->{sortby} eq $_} @columns) ? $params->{sortby} : 'itemnumber'; 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 705e2716a2..7835b1aa21 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 @@ -37,6 +37,4 @@ [%- 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 %][% 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 e0b28ee2ab..a89bbe1d3c 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 @@ -29,7 +29,6 @@ "[% 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 %][% END %]", "[% FILTER escape_quotes ~%] 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 2902fc5df2..238253ff74 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 @@ -32,7 +32,5 @@ [%- delimiter | $raw -%] "Checkouts" [%- delimiter | $raw -%] -"Availability" -[%- delimiter | $raw -%] "Due date" [%- 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 42e94c5e0c..27521c1635 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -210,8 +210,6 @@ - -
@@ -336,7 +334,6 @@ + ' ' + _("Lost status") + '' + ' ' + _("Withdrawn status") + '' + ' ' + _("Checkouts") + '' - + ' ' + _("Availability") + '' + ' ' + _("Due date") + '' + ' ' + ' ' @@ -494,7 +491,6 @@ { 'sName': 'itemlost' }, { 'sName': 'withdrawn' }, { 'sName': 'issues' }, - { 'sName': 'availability' }, { 'sName': 'date_due' }, { 'sName': 'actions', 'bSortable': false } ], @@ -544,7 +540,6 @@ [% END %] { 'type': 'text' }, { 'type': 'text' }, - { 'type': 'text' }, null ] }); -- 2.39.5