Bug 32589: Improve headings on result tables for 'Items with no checkouts'

When no filter was selected on the search form, the heading on
the results table showed as NULL. When library or item type were
selected the codes instead of the descriptions showed.

To test:
* Without patch:
* Run the 'items with no checkouts' report with different settings
  for 'By:'. Verify the headings on the tables are not nice.
* Apply patch
* Rerun reports
  * Headings should be "Ungrouped, item type or library descriptions
  * Summary table also shows item type and library descriptions

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  → OK. Would be nice to have decoding also in 'Filtered on' top section
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Katrin Fischer 2023-01-07 01:34:24 +00:00 committed by Tomas Cohen Arazi
parent bb9db8fcfa
commit 37302e71fc
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 25 additions and 6 deletions

View File

@ -1,4 +1,5 @@
[% USE Branches %]
[% USE ItemTypes %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Items with no checkouts &rsaquo; Reports &rsaquo; Koha</title>
[% INCLUDE 'doc-head-close.inc' %]
@ -45,9 +46,16 @@
[% ELSE %]
<p>
[% END %]
[% IF ( loopfilte.sql ) %]<span class="sql">[% END %]
[% loopfilte.crit | html %] = [% loopfilte.filter | html %]
[% IF ( loopfilte.sql ) %]</span>[% END %]
[% IF ( loopfilte.sql ) %]
<span class="sql">
[% loopfilte.crit | html %] = [% loopfilte.filter | html %]
</span>
[% ELSE %]
<span>[% loopfilte.crit | html %] = [% loopfilte.filter | html %]</span>
[% IF ( loopfilte.crit == "by" ) %]
[% group_by = loopfilte.filter %]
[% END %]
[% END %]
</p>
[% END %]
[% END %]
@ -65,7 +73,13 @@
[% FOREACH looptable IN mainloo.looptables %]
<tr>
<td>
<a href="#table[% looptable.coltitle | uri %]">[% looptable.coltitle | html %]</a>
[% IF ( group_by=="itype" ) %]
<a href="#table[% looptable.coltitle | uri %]">[% ItemTypes.GetDescription( looptable.coltitle ) | html %]</a>
[% ELSIF ( group_by=="homebranch" ) %]
<a href="#table[% looptable.coltitle | uri %]">[% Branches.GetName( looptable.coltitle ) | html %]</a>
[% ELSE %]
<a href="#table[% looptable.coltitle | uri %]">[% looptable.coltitle | html %]</a>
[% END %]
</td>
<td>
[% IF ( looptable.looptable_count ) %]
@ -89,8 +103,13 @@
[% FOREACH looptable IN mainloo.looptables %]
<div class="page-section">
<h3>
<a id="table[% looptable.coltitle | html %]"></a>
[% looptable.coltitle | html %]
[% IF ( group_by=="itype" ) %]
<a id="table[% looptable.coltitle | html %]" >[% ItemTypes.GetDescription( looptable.coltitle ) | html %]</a>
[% ELSIF ( group_by=="homebranch" ) %]
<a id="table[% looptable.coltitle | html %]" >[% Branches.GetName( looptable.coltitle ) | html %]</a>
[% ELSE %]
Ungrouped
[% END %]
</h3>
<table>
<tr>