4 [% PROCESS 'i18n.inc' %]
6 [% IF ( HOLDS.count ) %]
7 <div id="opac-user-holds" class="tab-pane" role="tabpanel" aria-labelledby="opac-user-holds-tab">
8 <table id="holdst" class="table table-bordered table-striped">
9 <caption>Holds <span class="count">([% HOLDS.count | html %] total)</span></caption>
10 <!-- HOLDS TABLE ROWS -->
13 <th class="anti-the">Title</th>
14 [% IF ( showpriority ) %]
17 <th class="psort">Placed on</th>
20 [% UNLESS( singleBranchMode) %]
21 <th>Pick up location</th>
23 [% IF ( showpriority ) %]
24 <th class="psort">Priority</th>
27 [% IF SuspendHoldsOpac and ! onlyinfo %]
28 <th class="nosort" >Suspend</th>
31 <th class="nosort">Modify</th>
36 [% SET all_holds_waiting = 1 %]
37 [% FOREACH HOLD IN HOLDS %]
38 [% UNLESS ( HOLD.is_waiting || HOLD.is_in_transit || HOLD.is_in_processing) %]
39 [% SET all_holds_waiting = 0 %]
41 [% IF ( HOLD.is_at_destination ) %]
43 [% ELSIF HOLD.is_in_transit %]
44 <tr class="transfered">
50 [% INCLUDE 'biblio-title.inc' biblio=HOLD.biblio link=> 1 %]
51 [% HOLD.item.enumchron | html %]
54 [% INCLUDE 'biblio-title.inc' biblio=HOLD.biblio %]
55 [% HOLD.item.enumchron | html %]
58 [% HOLD.biblio.author | html %]
59 [% IF HOLD.item_level_hold %]
60 <p class="hint">Item on hold: [% HOLD.item.barcode | html %]</p>
63 <td class="reservedate" data-order="[% HOLD.reservedate | html %]">
64 <span class="tdlabel">Hold date:</span>
65 [% HOLD.reservedate | $KohaDates %]
69 <td class="expirationdate" data-order="[% HOLD.expirationdate | html %]">
70 [% IF ( HOLD.expirationdate ) %]
71 <span class="tdlabel">Expiration:</span>
72 [% HOLD.expirationdate | $KohaDates %]
74 <span class="tdlabel">Expiration:</span>
78 <td class="expirationdate" data-order="0000-00-00">
82 [% UNLESS( singleBranchMode) %]
84 <span class="tdlabel">Pick up location:</span>
85 [% IF Koha.Preference('OPACInTransitHoldPickupLocationChange') && HOLD.is_in_transit %]
86 <form class="form-inline" action="/cgi-bin/koha/opac-modrequest.pl" method="post">
87 <input type="hidden" name="reserve_id" value="[% HOLD.reserve_id | html %]" />
88 <select name="new_pickup_location" class="new_pickup_location" onchange="this.form.submit()">
89 [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { item => HOLD.itemnumber, patron => logged_in_user }, selected => HOLD.branchcode }) %]
93 [% HOLD.branch.branchname | html %]
97 [% IF ( showpriority ) %]
98 <td data-order="[% HOLD.priority | html %]" class="priority">
99 <span class="tdlabel">Priority:</span>
100 [% HOLD.priority | html %]
104 <span class="tdlabel">Status:</span>
105 [% IF ( HOLD.is_waiting ) %]
106 <i class="fa fa-exclamation-circle text-warning" aria-hidden="true"></i>
107 [% IF ( HOLD.is_at_destination ) %]
108 Item waiting at <strong> [% HOLD.branch.branchname | html %]</strong>
109 [% IF ( HOLD.desk_id ) %], [% HOLD.desk.desk_name | html %],[% END %]
110 [% IF ( HOLD.waitingdate ) %]
111 since [% HOLD.waitingdate | $KohaDates %]
112 [% IF HOLD.expirationdate %]
113 until [% HOLD.expirationdate | $KohaDates %]
116 <input type="hidden" name="pickup" value="[% HOLD.branchcode | html %]" />
118 Item in transit to <strong> [% Branches.GetName( HOLD.branchcode ) | html %]</strong> <input type="hidden" name="pickup" value="[% HOLD.branchcode | html %]" />
121 [% IF ( HOLD.is_in_transit ) %]
122 [% SET transfer = HOLD.item.get_transfer %]
123 [% branch_name = BLOCK %]<strong>[% Branches.GetName( transfer.frombranch ) | html %]</strong>[% END %]
124 <span>Item in transit from [% branch_name| $raw %] since</span>
125 [% transfer.datesent | $KohaDates %]
126 [% ELSIF ( HOLD.is_in_processing ) %]
127 <span>Item in processing</span>
128 [% ELSIF ( HOLD.suspend ) %]
129 <span>Suspended</span>[% IF ( HOLD.suspend_until ) %] <span>until</span> [% HOLD.suspend_until | $KohaDates %][% END %]
131 [% IF HOLD.itemtype %]
132 <span>Pending for next available item of item type '[% ItemTypes.GetDescription( HOLD.itemtype ) | html %]'</span>
139 [% IF SuspendHoldsOpac and ! onlyinfo %]
141 [% IF ( HOLD.is_cancelable_from_opac ) %]
142 [% IF HOLD.suspend %]
143 <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
144 <input type="hidden" name="reserve_id" value="[% HOLD.reserve_id | html %]" />
145 <button class="btn btn-link" type="submit" name="submit"><i class="fa fa-play" aria-hidden="true"></i> Resume</button>
148 [% IF AutoResumeSuspendedHolds %]
149 <a class="btn btn-link suspend_hold js-show" href="#" role="button" data-title="[% HOLD.biblio.title | html %] [% FOREACH subtitle IN HOLD.biblio.subtitle.split(' \| ') %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %][% subtitle | html %][% END %]" data-reserve_id="[% HOLD.reserve_id | html %]"><i class="fa fa-pause" aria-hidden="true"></i> Suspend</a>
151 <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
152 <input type="hidden" name="reserve_id" value="[% HOLD.reserve_id | html %]" />
153 <button class="btn btn-link" type="submit" name="submit"><i class="fa fa-pause" aria-hidden="true"></i> Suspend</button>
155 [% END # / IF AutoResumeSuspendedHolds %]
156 [% END # / IF HOLD.suspend %]
157 [% END # / IF ( HOLD.is_cancelable_from_opac )%]
159 [% END # / IF SuspendHoldsOpac %]
162 [% IF ( HOLD.is_cancelable_from_opac ) %]
163 <form id="delete_hold_[% HOLD.reserve_id | html %]" action="/cgi-bin/koha/opac-modrequest.pl" method="post">
164 <input type="hidden" name="biblionumber" value="[% HOLD.biblionumber | html %]" />
165 <input type="hidden" name="reserve_id" value="[% HOLD.reserve_id | html %]" />
166 <button data-title="[% INCLUDE 'biblio-title-head.inc' biblio=HOLD.biblio %]" data-reserve_id="[% HOLD.reserve_id | html %]" type="submit" class="btn btn-sm btn-danger btn-delete-hold"><i class="fa fa-remove" aria-hidden="true"></i> [% tp('Cancel hold button', 'Cancel') | html %]</button>
168 [% ELSIF HOLD.is_waiting && HOLD.cancellation_requestable_from_opac %]
169 <form id="req_cancel_hold_[% HOLD.reserve_id | html %]" action="/cgi-bin/koha/opac-modrequest.pl" method="post">
170 <input type="hidden" name="biblionumber" value="[% HOLD.biblionumber | html %]" />
171 <input type="hidden" name="reserve_id" value="[% HOLD.reserve_id | html %]" />
172 <input type="hidden" name="cancellation_request" value="1" />
173 <button data-title="[% INCLUDE 'biblio-title-head.inc' biblio=HOLD.biblio %]" data-reserve_id="[% HOLD.reserve_id | html %]" type="submit" class="btn btn-sm btn-danger btn-req-delete-hold"><i class="fa fa-remove" aria-hidden="true"></i> [% tp('Cancel hold button', 'Cancel') | html %]</button>
177 [% END # / IF onlyinfo %]
179 [% END # /FOREACH HOLDS %]
183 [% IF SuspendHoldsOpac and ! onlyinfo %]
184 [% UNLESS ( all_holds_waiting ) %]
186 <form class="form-inline" id="suspend_all_holds" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
187 <button type="submit" id="suspend_all_submit" class="btn btn-primary"><i class="fa fa-pause" aria-hidden="true"></i> Suspend all holds</button>
188 <input type="hidden" name="suspend" value="1" />
190 [% IF AutoResumeSuspendedHolds %]
191 <label for="suspend_until"> until </label>
192 <input type="text" name="suspend_until" id="suspend_until" class="flatpickr futuredate" size="10" />
193 <p><a href="#" class="clear-flatpickr" data-fp="suspend_until">Clear date to suspend indefinitely</a></p>
199 <form id="resume_all_holds" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
200 <button type="submit" id="resume_all_submit" class="btn btn-primary"><i class="fa fa-play" aria-hidden="true"></i> Resume all suspended holds</button>
201 <input type="hidden" name="suspend" value="0" />
206 </div> <!-- / #opac-user-holds -->
207 [% END # / #HOLDS.count %]