Browse Source

Bug 29186: (QA follow-up) Correct the check for showing limit menu

The template conditional for showing the limit menu should be changed
to:

[% IF ( unlimited_total > 10 && limit <= 1000 ) %]

- "unlimited_total > 10" so that the "rows per page" button only shows
  if there are more than 10 total results, because 10 is the smallest
  increment the "rows per page" control offers.
- "limit <= 1000" so that the "rows per page" button will show when the
  current result limit is less than or equal to 1000, because 1000 is
  the upper limit to the "rows per page" control.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
21.11.x
Owen Leonard 3 years ago
committed by Jonathan Druart
parent
commit
033ce601a3
  1. 12
      koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt

12
koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt

@ -902,7 +902,7 @@
<p>
<span class="label">Total number of results:</span>
[% unlimited_total | html %]
[% IF unlimited_total > limit %]
[% IF unlimited_total >= limit %]
([% limit | html %] shown)
[% END %].
</p>
@ -1015,12 +1015,12 @@
<input type="hidden" name="limit" id="limit" value="20" />
</form> <!-- /#limitselect -->
[% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) || ( unlimited_total ) > limit %]
[% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) || ( unlimited_total > 10 && limit <= 1000 ) %]
<div id="toolbar" class="btn-toolbar">
[% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) %]
<div class="btn-group">
<button class="btn btn-default btn-sm dropdown-toggle" type="button" id="batch_mod_menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
Batch operations with [% IF unlimited_total > limit %][% limit | html %][% ELSE %][% unlimited_total | html %][% END %] visible records
Batch operations with [% IF unlimited_total >= limit %][% limit | html %][% ELSE %][% unlimited_total | html %][% END %] visible records
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="batch_mod_menu">
@ -1063,7 +1063,7 @@
</div> <!-- /.dropdown -->
[% END # /IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) %]
[% IF ( unlimited_total > limit ) %]
[% IF ( unlimited_total > 10 && limit <= 1000 ) %]
<div class="btn-group">
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
[% IF ( limit ) %]
@ -1088,9 +1088,9 @@
[% END %]
</ul>
</div>
[% END # /IF ( unlimited_total > limit ) %]
[% END # /IF ( unlimited_total > 10 && limit <= 1000 ) %]
</div> <!-- /#toolbar.btn-toolbar -->
[% END # /IF batch operations || ( unlimited_total > limit ) %]
[% END # /IF batch operations || ( unlimited_total > 10 && limit <= 1000 ) %]
<div class="pages">
[% pagination_bar | $raw %]

Loading…
Cancel
Save