Bug 34012: Use template wrapper for tabs: Recalls awaiting pickup

This patch updates the recalls awaiting pickup template so that it uses
the new WRAPPER directive to build tabbed navigation.

Note: this patch includes indentation changes, so check the diff
accordingly.

To test you must have UseRecalls enabled. Apply the patch and go to
Circulation -> Recalls awaiting pickup.

Both the "Recalls waiting" and "Recalls waiting over X days" tabs should
look correct and work correctly.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 309148160b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4e2b346b07)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
This commit is contained in:
Owen Leonard 2023-06-14 17:09:48 +00:00 committed by Pedro Amorim
parent 75a1c7966d
commit 28354b300f

View file

@ -35,19 +35,14 @@
[% IF Koha.Preference('UseRecalls') %]
<div id="results" class="toptabs">
[% WRAPPER tabs id= "results" %]
[% WRAPPER tabs_nav %]
[% WRAPPER tab_item tabname= "recallswaiting" bt_active= 1 %] <span>Recalls waiting: [% recalls.count | html %]</span> [% END %]
[% WRAPPER tab_item tabname= "recallsover" %] <span>Recalls waiting over [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days: [% over.count | html %]</span> [% END %]
[% END # /WRAPPER tabs_nav %]
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active">
<a href="#recallswaiting" aria-controls="recallswaiting" role="tab" data-toggle="tab">Recalls waiting: [% recalls.count | html %]</a>
</li>
<li role="presentation">
<a href="#recallsover" aria-controls="recallsover" role="tab" data-toggle="tab">Recalls waiting over [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days: [% over.count | html %]</a>
</li>
</ul>
<div class="tab-content">
<div id="recallswaiting" role="tabpanel" class="tab-pane active">
[% WRAPPER tab_panels %]
[% WRAPPER tab_panel tabname="recallswaiting" bt_active= 1 %]
[% IF ( recalls ) %]
<table id="recallswaiting-table">
<thead><tr>
@ -92,8 +87,8 @@
[% ELSE %]
<div class="dialog message">There are no recalls to show.</div>
[% END %]
</div> <!-- recallswaiting -->
[% END # /tab_panel# %]
[% WRAPPER tab_panel tabname="recallsover" %]
<div id="recallsover" role="tabpanel" class="tab-pane">
[% IF ( over.size ) %]
[% IF ( Koha.Preference('RecallsMaxPickUpDelay') ) %]<p>Recalls listed here have been awaiting pickup for more than [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days.</p>[% END %]
@ -137,8 +132,9 @@
<div class="dialog message">There are no recalls to show.</div>
[% END %]
</div> <!-- recallsover -->
</div> <!-- /.tab-content -->
</div> <!-- results-->
[% END # /tab_panel# %]
[% END # /WRAPPER tab_panels %]
[% END # /WRAPPER tabs %]
[% ELSE %]
<div class="dialog message">Recalls have not been enabled. Enable the <a href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">UseRecalls</a> system preference to use recalls.</div>