Koha/koha-tmpl/intranet-tmpl/prog/en/includes/recalls.inc
Fridolin Somers b2dc45a47d Bug 19532: (RM follow-up) Fix status finished renamed fulfilled
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-14 22:45:52 -10:00

134 lines
6.6 KiB
HTML

[% USE Branches %]
<div id="recalls">
[% IF recalls.count %]
<table id="recalls-table">
<thead>
<tr>
[% IF checkboxes %]<th class="recall-checkbox nosort">&nbsp;</th>[% END %]
<th class="recall-title anti-the">Title</th>
[% UNLESS specific_patron %]<th class="recall-patron">Requested by</th>[% END %]
<th class="recall-date">Placed on</th>
<th class="recall-expiry">Expires on</th>
<th class="recall-branch">Pickup location</th>
<th class="recall-status">Status</th>
[% UNLESS viewing_old %]<th class="recall-duedate">Due date</th>[% END %]
[% UNLESS viewing_old %]<th class="recall-actions nosort">&nbsp;</th>[% END %]
</tr>
</thead>
<tbody>
[% FOREACH recall IN recalls %]
[% IF recall.old %]<tr class="old">[% ELSE %]<tr>[% END %]
[% IF checkboxes %]
<td class="recall-checkbox">
[% IF recall.old %]
&nbsp;
[% ELSE %]
<input type="checkbox" value="[% recall.recall_id | html %]" name="recall_ids">
[% END %]
</td>
[% END %]
<td class="recall-title">
<b><a class="recall-title" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% recall.biblionumber | html %]">
[% recall.biblio.title | html %]
[% FOREACH s IN recall.biblio.subtitle %]
[% s | html %]
[% END %]
</a></b>
[% IF recall.item %][% recall.item.barcode | html %][% END %]
[% recall.biblio.author | html %]
</td>
[% UNLESS specific_patron %]
<td class="recall-patron">
[% INCLUDE 'patron-title.inc' patron=recall.patron hide_patron_infos_if_needed=1 link_to="circulation_recalls" %]
</td>
[% END %]
<td class="recall-date">
[% recall.recalldate | $KohaDates %]
</td>
<td class="recall-expiry">
[% IF ( recall.expirationdate ) %]
[% recall.expirationdate | $KohaDates %]
[% ELSIF ( !recall.old ) %]
Never expires
[% ELSE %]
-
[% END %]
</td>
<td class="recall-branch">
[% recall.library.branchname | html %]
</td>
<td class="recall-status">
[% IF ( recall.in_transit ) %]
In transit to [% recall.library.branchname | html %]
[% ELSIF ( recall.waiting ) %]
Ready for pickup
[% ELSIF ( recall.expired ) %]
Expired on [% recall.expirationdate | $KohaDates %]
[% ELSIF ( recall.cancelled ) %]
Cancelled on [% recall.cancellationdate | $KohaDates %]
[% ELSIF ( recall.overdue ) %]
Overdue to be returned
[% ELSIF ( recall.fulfilled ) %]
Fulfilled
[% ELSE %]
Requested
[% END %]
</td>
[% UNLESS viewing_old %]
<td class="recall-duedate">
[% IF recall.requested and recall.checkout %]
Due to be returned by [% recall.checkout.date_due | $KohaDates %]
[% ELSIF recall.waiting and RECALL.expirationdate %]
Pick up by [% RECALL.expirationdate | $KohaDates %]
[% ELSE %]
-
[% END %]
</td>
[% END %]
[% UNLESS viewing_old %]
<td class="recall-cancel actions">
[% IF recall.old %]
&nbsp;
[% ELSE %]
<div class="btn-group">
<a class="btn btn-sm dropdown-toggle" data-toggle="dropdown" href="#"> Actions <span class="caret"></span></a>
<ul class="dropdown-menu pull-right">
[% IF ( recall.requested or recall.overdue ) %]
<li><a class="cancel_recall" data-id="[% recall.recall_id | html %]" data-action="cancel"><i class="fa fa-times"></i> Cancel</a></li>
[% IF ( recall.should_be_overdue ) %]
<li><a class="overdue_recall" data-id="[% recall.recall_id | html %]" data-action="overdue"><i class="fa fa-hourglass-end"></i> Mark as overdue</a></li>
[% END %]
[% ELSIF ( recall.waiting ) %]
<li><a class="revert_recall" data-id="[% recall.recall_id | html %]" data-action="revert"><i class="fa fa-undo"></i> Revert waiting</a></li>
<li><a class="expire_recall" data-id="[% recall.recall_id | html %]" data-action="expire"><i class="fa fa-times"></i> Expire</a></li>
[% ELSIF ( recall.in_transit ) %]
<li><a class="transit_recall" data-id="[% recall.recall_id | html %]" data-action="transit"><i class="fa fa-times"></i> Cancel recall and return to: [% Branches.GetName(recall.item.homebranch) | html %]</a></li>
[% END %]
</ul>
</div>
[% END %]
</td>
[% END %]
</tr>
[% END %]
</tbody>
</table>
[% ELSE %]
[% IF patron.borrowernumber %]
<div class="dialog message">Patron has no recalls.</div>
[% ELSE %]
<div class="dialog message">There are no recalls to show.</div>
[% END %]
[% END %]
</div>