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 commit309148160b
) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> (cherry picked from commit4e2b346b07
) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
This commit is contained in:
parent
75a1c7966d
commit
28354b300f
1 changed files with 99 additions and 103 deletions
|
@ -35,110 +35,106 @@
|
||||||
|
|
||||||
[% IF Koha.Preference('UseRecalls') %]
|
[% 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">
|
[% WRAPPER tab_panels %]
|
||||||
<li role="presentation" class="active">
|
[% WRAPPER tab_panel tabname="recallswaiting" bt_active= 1 %]
|
||||||
<a href="#recallswaiting" aria-controls="recallswaiting" role="tab" data-toggle="tab">Recalls waiting: [% recalls.count | html %]</a>
|
[% IF ( recalls ) %]
|
||||||
</li>
|
<table id="recallswaiting-table">
|
||||||
<li role="presentation">
|
<thead><tr>
|
||||||
<a href="#recallsover" aria-controls="recallsover" role="tab" data-toggle="tab">Recalls waiting over [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days: [% over.count | html %]</a>
|
<th class="recall-waitingdate title-string">Available since</th>
|
||||||
</li>
|
<th class="recall-title anti-the">Title</th>
|
||||||
</ul>
|
<th class="recall-patron">Requested by</th>
|
||||||
|
<th class="recall-library">Pickup location</th>
|
||||||
<div class="tab-content">
|
<th class="recall-action nosort"> </th>
|
||||||
<div id="recallswaiting" role="tabpanel" class="tab-pane active">
|
</tr></thead>
|
||||||
[% IF ( recalls ) %]
|
<tbody>
|
||||||
<table id="recallswaiting-table">
|
[% FOREACH recall IN recalls %]<tr>
|
||||||
<thead><tr>
|
<td class="recall-waitingdate">[% recall.waiting_date | $KohaDates %]</td>
|
||||||
<th class="recall-waitingdate title-string">Available since</th>
|
<td class="recall-title">
|
||||||
<th class="recall-title anti-the">Title</th>
|
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% recall.biblio_id | uri %]">
|
||||||
<th class="recall-patron">Requested by</th>
|
[% recall.biblio.title | html %]
|
||||||
<th class="recall-library">Pickup location</th>
|
[% FOREACH s IN recall.biblio.subtitle %]
|
||||||
<th class="recall-action nosort"> </th>
|
[% s | html %]
|
||||||
</tr></thead>
|
[% END %]
|
||||||
<tbody>
|
</a>
|
||||||
[% FOREACH recall IN recalls %]<tr>
|
[% recall.biblio.author | html %]
|
||||||
<td class="recall-waitingdate">[% recall.waiting_date | $KohaDates %]</td>
|
<br><i>Barcode: [% recall.item.barcode | html %]</i>
|
||||||
<td class="recall-title">
|
</td>
|
||||||
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% recall.biblio_id | uri %]">
|
<td class="recall-patron">
|
||||||
[% recall.biblio.title | html %]
|
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.patron_id | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %]</a>
|
||||||
[% FOREACH s IN recall.biblio.subtitle %]
|
[% IF ( recall.patron.phone ) %]<br />[% recall.patron.phone | html %][% END %]
|
||||||
[% s | html %]
|
[% IF ( recall.patron.email ) %]<br /><a href="mailto:[% recall.patron.email | uri %]?subject=Recall waiting: [% recall.biblio.title | uri %]">[% recall.patron.email | html %]</a>[% END %]
|
||||||
[% END %]
|
</td>
|
||||||
</a>
|
<td class="recall-library">[% recall.library.branchname | html %]</td>
|
||||||
[% recall.biblio.author | html %]
|
<td class="recall-action actions">
|
||||||
<br><i>Barcode: [% recall.item.barcode | html %]</i>
|
<form action="/cgi-bin/koha/recalls/recalls_waiting.pl" method="post">
|
||||||
</td>
|
<input type="hidden" name="recall_id" value="[% recall.id | html %]">
|
||||||
<td class="recall-patron">
|
<input type="hidden" name="op" value="modify">
|
||||||
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.patron_id | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %]</a>
|
<fieldset class="action">
|
||||||
[% IF ( recall.patron.phone ) %]<br />[% recall.patron.phone | html %][% END %]
|
<button type="submit" name="revert" value="revert" class="btn btn-default btn-sm revert_recall"><i class="fa fa-undo"></i> Revert waiting status</button>
|
||||||
[% IF ( recall.patron.email ) %]<br /><a href="mailto:[% recall.patron.email | uri %]?subject=Recall waiting: [% recall.biblio.title | uri %]">[% recall.patron.email | html %]</a>[% END %]
|
<button type="submit" name="expire" value="expire" class="btn btn-default btn-sm expire_recall"><i class="fa fa-undo"></i> Expire recall</button>
|
||||||
</td>
|
</fieldset>
|
||||||
<td class="recall-library">[% recall.library.branchname | html %]</td>
|
</form>
|
||||||
<td class="recall-action actions">
|
</td>
|
||||||
<form action="/cgi-bin/koha/recalls/recalls_waiting.pl" method="post">
|
</tr>[% END %]
|
||||||
<input type="hidden" name="recall_id" value="[% recall.id | html %]">
|
</tbody>
|
||||||
<input type="hidden" name="op" value="modify">
|
</table>
|
||||||
<fieldset class="action">
|
[% ELSE %]
|
||||||
<button type="submit" name="revert" value="revert" class="btn btn-default btn-sm revert_recall"><i class="fa fa-undo"></i> Revert waiting status</button>
|
<div class="dialog message">There are no recalls to show.</div>
|
||||||
<button type="submit" name="expire" value="expire" class="btn btn-default btn-sm expire_recall"><i class="fa fa-undo"></i> Expire recall</button>
|
[% END %]
|
||||||
</fieldset>
|
[% END # /tab_panel# %]
|
||||||
</form>
|
[% WRAPPER tab_panel tabname="recallsover" %]
|
||||||
</td>
|
<div id="recallsover" role="tabpanel" class="tab-pane">
|
||||||
</tr>[% END %]
|
[% IF ( over.size ) %]
|
||||||
</tbody>
|
[% IF ( Koha.Preference('RecallsMaxPickUpDelay') ) %]<p>Recalls listed here have been awaiting pickup for more than [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days.</p>[% END %]
|
||||||
</table>
|
<table id="recallsover-table">
|
||||||
[% ELSE %]
|
<thead><tr>
|
||||||
<div class="dialog message">There are no recalls to show.</div>
|
<th class="recall-waitingdate title-string">Available since</th>
|
||||||
[% END %]
|
<th class="recall-title anti-the">Title</th>
|
||||||
</div> <!-- recallswaiting -->
|
<th class="recall-patron">Requested by</th>
|
||||||
|
<th class="recall-library">Pickup location</th>
|
||||||
<div id="recallsover" role="tabpanel" class="tab-pane">
|
<th class="recall-action nosort"> </th>
|
||||||
[% IF ( over.size ) %]
|
</tr></thead>
|
||||||
[% IF ( Koha.Preference('RecallsMaxPickUpDelay') ) %]<p>Recalls listed here have been awaiting pickup for more than [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days.</p>[% END %]
|
<tbody>
|
||||||
<table id="recallsover-table">
|
[% FOREACH recall IN over %]<tr>
|
||||||
<thead><tr>
|
<td class="recall-waitingdate">[% recall.waiting_date | $KohaDates %]</td>
|
||||||
<th class="recall-waitingdate title-string">Available since</th>
|
<td class="recall-title">
|
||||||
<th class="recall-title anti-the">Title</th>
|
[% INCLUDE 'biblio-title.inc' biblio=recall.biblio link = 1 %]
|
||||||
<th class="recall-patron">Requested by</th>
|
[% IF recall.biblio.author %] by [% recall.biblio.author | html %][% END %]
|
||||||
<th class="recall-library">Pickup location</th>
|
[% recall.item.enumchron | html %]
|
||||||
<th class="recall-action nosort"> </th>
|
[% IF ( recall.item.barcode ) %]<br><em>Barcode: [% recall.item.barcode | html %]</em>[% END %]
|
||||||
</tr></thead>
|
</td>
|
||||||
<tbody>
|
<td class="recall-patron">
|
||||||
[% FOREACH recall IN over %]<tr>
|
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.patron_id | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %]</a>
|
||||||
<td class="recall-waitingdate">[% recall.waiting_date | $KohaDates %]</td>
|
[% IF ( recall.patron.phone ) %]<br />[% recall.patron.phone | html %][% END %]
|
||||||
<td class="recall-title">
|
[% IF ( recall.patron.email ) %]<br /><a href="mailto:[% recall.patron.email | uri %]?subject=Recall waiting: [% recall.biblio.title | uri %]">[% recall.patron.email | html %]</a>[% END %]
|
||||||
[% INCLUDE 'biblio-title.inc' biblio=recall.biblio link = 1 %]
|
</td>
|
||||||
[% IF recall.biblio.author %] by [% recall.biblio.author | html %][% END %]
|
<td class="recall-library">[% recall.library.branchname | html %]</td>
|
||||||
[% recall.item.enumchron | html %]
|
<td class="recall-action actions">
|
||||||
[% IF ( recall.item.barcode ) %]<br><em>Barcode: [% recall.item.barcode | html %]</em>[% END %]
|
<form action="/cgi-bin/koha/recalls/recalls_waiting.pl" method="post">
|
||||||
</td>
|
<input type="hidden" name="recall_id" value="[% recall.id | html %]">
|
||||||
<td class="recall-patron">
|
<input type="hidden" name="op" value="modify">
|
||||||
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.patron_id | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %]</a>
|
<fieldset class="action">
|
||||||
[% IF ( recall.patron.phone ) %]<br />[% recall.patron.phone | html %][% END %]
|
<button type="submit" name="revert" value="revert" class="btn btn-default btn-sm revert_recall"><i class="fa fa-undo"></i> Revert waiting status</button>
|
||||||
[% IF ( recall.patron.email ) %]<br /><a href="mailto:[% recall.patron.email | uri %]?subject=Recall waiting: [% recall.biblio.title | uri %]">[% recall.patron.email | html %]</a>[% END %]
|
<button type="submit" name="expire" value="expire" class="btn btn-default btn-sm expire_recall"><i class="fa fa-undo"></i> Expire recall</button>
|
||||||
</td>
|
</fieldset>
|
||||||
<td class="recall-library">[% recall.library.branchname | html %]</td>
|
</form>
|
||||||
<td class="recall-action actions">
|
</td>
|
||||||
<form action="/cgi-bin/koha/recalls/recalls_waiting.pl" method="post">
|
</tr>[% END %]
|
||||||
<input type="hidden" name="recall_id" value="[% recall.id | html %]">
|
</tbody>
|
||||||
<input type="hidden" name="op" value="modify">
|
</table>
|
||||||
<fieldset class="action">
|
[% ELSE %]
|
||||||
<button type="submit" name="revert" value="revert" class="btn btn-default btn-sm revert_recall"><i class="fa fa-undo"></i> Revert waiting status</button>
|
<div class="dialog message">There are no recalls to show.</div>
|
||||||
<button type="submit" name="expire" value="expire" class="btn btn-default btn-sm expire_recall"><i class="fa fa-undo"></i> Expire recall</button>
|
[% END %]
|
||||||
</fieldset>
|
</div> <!-- recallsover -->
|
||||||
</form>
|
[% END # /tab_panel# %]
|
||||||
</td>
|
[% END # /WRAPPER tab_panels %]
|
||||||
</tr>[% END %]
|
[% END # /WRAPPER tabs %]
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
[% ELSE %]
|
|
||||||
<div class="dialog message">There are no recalls to show.</div>
|
|
||||||
[% END %]
|
|
||||||
</div> <!-- recallsover -->
|
|
||||||
</div> <!-- /.tab-content -->
|
|
||||||
</div> <!-- results-->
|
|
||||||
|
|
||||||
[% ELSE %]
|
[% 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>
|
<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>
|
||||||
|
|
Loading…
Reference in a new issue