4 [% PROCESS 'i18n.inc' %]
6 [% IF ( HOLDS.count ) %]
7 <div id="opac-user-holds">
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 ) %]
15 <th class="title-string">Placed on</th>
17 <th class="psort title-string">Placed on</th>
19 <th class="title-string">Expires 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 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% HOLD.biblionumber | html %]">
51 [% INCLUDE 'biblio-title.inc' biblio=HOLD.biblio %]
52 [% HOLD.item.enumchron | html %]
56 [% INCLUDE 'biblio-title.inc' biblio=HOLD.biblio %]
57 [% HOLD.item.enumchron | html %]
60 [% HOLD.biblio.author | html %]
62 <td class="reservedate">
63 <span title="[% HOLD.reservedate | html %]">
64 <span class="tdlabel">Hold date:</span>
65 [% HOLD.reservedate | $KohaDates %]
68 <td class="expirationdate">
70 [% IF ( HOLD.expirationdate ) %]
71 <span title="[% HOLD.expirationdate | html %]">
72 <span class="tdlabel">Expiration:</span>
73 [% HOLD.expirationdate | $KohaDates %]
76 <span title="0000-00-00">
77 <span class="tdlabel">Expiration:</span>
82 <span title="0000-00-00">-</span>
85 [% UNLESS( singleBranchMode) %]
87 <span class="tdlabel">Pick up location:</span>
88 [% HOLD.branch.branchname | html %]
91 [% IF ( showpriority ) %]
92 <td data-order="[% HOLD.priority | html %]" class="priority">
93 <span class="tdlabel">Priority:</span>
94 [% HOLD.priority | html %]
98 <span class="tdlabel">Status:</span>
99 [% IF ( HOLD.is_waiting ) %]
100 <i class="fa fa-exclamation-circle text-warning" aria-hidden="true"></i>
101 [% IF ( HOLD.is_at_destination ) %]
102 Item waiting at <strong> [% HOLD.branch.branchname | html %]</strong>
103 [% IF ( HOLD.desk_id ) %], [% Desks.GetName ( HOLD.desk_id ) | html %],[% END %]
104 [% IF ( HOLD.waitingdate ) %]
105 since [% HOLD.waitingdate | $KohaDates %]
106 [% IF HOLD.expirationdate %]
107 until [% HOLD.expirationdate | $KohaDates %]
110 <input type="hidden" name="pickup" value="[% HOLD.branchcode | html %]" />
112 Item in transit to <strong> [% Branches.GetName( HOLD.branchcode ) | html %]</strong> <input type="hidden" name="pickup" value="[% HOLD.branchcode | html %]" />
115 [% IF ( HOLD.is_in_transit ) %]
116 [% SET transfer = HOLD.item.get_transfer %]
117 Item in transit from <strong> [% Branches.GetName( transfer.frombranch ) | html %]</strong> since
118 [% transfer.datesent | $KohaDates %]
119 [% ELSIF ( HOLD.is_in_processing ) %]
121 [% ELSIF ( HOLD.suspend ) %]
122 Suspended [% IF ( HOLD.suspend_until ) %] until [% HOLD.suspend_until | $KohaDates %] [% END %]
124 [% IF HOLD.itemtype %]
125 Pending for next available item of item type '[% ItemTypes.GetDescription( HOLD.itemtype ) | html %]'
132 [% IF SuspendHoldsOpac and ! onlyinfo %]
134 [% IF ( HOLD.is_cancelable_from_opac ) %]
135 [% IF HOLD.suspend %]
136 <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
137 <input type="hidden" name="reserve_id" value="[% HOLD.reserve_id | html %]" />
138 <button class="btn btn-link" type="submit" name="submit"><i class="fa fa-play" aria-hidden="true"></i> Resume</button>
141 [% IF AutoResumeSuspendedHolds %]
142 <a class="btn btn-link js-show" href="#suspendModal[% HOLD.reserve_id | html %]" role="button" data-toggle="modal"><i class="fa fa-pause" aria-hidden="true"></i> Suspend</a>
143 [% # hold suspend modal form %]
144 <div id="suspendModal[% HOLD.reserve_id | html %]" class="modal-nojs" tabindex="-1" role="dialog" aria-labelledby="suspendModal[% HOLD.reserve_id | html %]Label" aria-hidden="true">
145 <div class="modal-dialog">
146 <div class="modal-content">
147 <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
148 <div class="modal-header">
149 [% IF HOLD.suspend %]
150 <h3 class="modal-title" id="suspendModal[% HOLD.reserve_id | html %]Label">Resume your hold on <em>[% HOLD.biblio.title | html %]</em></h3>
152 <h3 class="modal-title" id="suspendModal[% HOLD.reserve_id | html %]Label">Suspend your hold on <em>[% HOLD.biblio.title | html %]</em></h3>
154 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">
155 <span aria-hidden="true">x</span>
158 <div class="modal-body">
159 <input type="hidden" name="reserve_id" value="[% HOLD.reserve_id | html %]" />
160 <label for="suspend_until_[% HOLD.reserve_id | html %]">Suspend until:</label>
161 <input type="text" name="suspend_until" id="suspend_until_[% HOLD.reserve_id | html %]" class="suspend-until" size="10" />
162 [% INCLUDE 'date-format.inc' %]
163 <p class="js-show"><a href="#" onclick="document.getElementById('suspend_until_[% HOLD.reserve_id | html %]').value='';return false;">Clear date to suspend indefinitely</a></p>
164 <button class="btn btn-primary btn-sm js-hide" type="submit" name="submit">Suspend</button>
166 <div class="modal-footer">
167 <button class="btn btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Suspend</button>
168 <button data-dismiss="modal" class="btn btn-secondary"><i class="fa fa-remove" aria-hidden="true"></i> Do not suspend</button>
171 </div> <!-- /.modal-content -->
172 </div> <!-- /.modal-dialog -->
173 </div> <!-- /#suspendModal[% HOLD.reserve_id | html %] -->
175 <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
176 <input type="hidden" name="reserve_id" value="[% HOLD.reserve_id | html %]" />
177 <button class="btn btn-link" type="submit" name="submit"><i class="fa fa-pause" aria-hidden="true"></i> Suspend</button>
179 [% END # / IF AutoResumeSuspendedHolds %]
180 [% END # / IF HOLD.suspend %]
181 [% END # / IF ( HOLD.is_cancelable_from_opac )%]
183 [% END # / IF SuspendHoldsOpac %]
186 [% IF ( HOLD.is_cancelable_from_opac ) %]
187 <form id="delete_hold_[% HOLD.reserve_id | html %]" action="/cgi-bin/koha/opac-modrequest.pl" method="post">
188 <input type="hidden" name="biblionumber" value="[% HOLD.biblionumber | html %]" />
189 <input type="hidden" name="reserve_id" value="[% HOLD.reserve_id | html %]" />
190 <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>
194 [% END # / IF onlyinfo %]
196 [% END # /FOREACH HOLDS %]
200 [% IF SuspendHoldsOpac and ! onlyinfo %]
201 [% UNLESS ( all_holds_waiting ) %]
203 <form class="form-inline" id="suspend_all_holds" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
204 <button type="submit" id="suspend_all_submit" class="btn btn-primary"><i class="fa fa-pause" aria-hidden="true"></i> Suspend all holds</button>
205 <input type="hidden" name="suspend" value="1" />
207 [% IF AutoResumeSuspendedHolds %]
208 <label for="suspend_until"> until </label>
209 <input type="text" name="suspend_until" id="suspend_until" class="suspend-until" readonly="readonly" size="10" />
210 <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('suspend_until').value='';return false;">Clear date to suspend indefinitely</a>
216 <form id="resume_all_holds" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
217 <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>
218 <input type="hidden" name="suspend" value="0" />
223 </div> <!-- / #opac-user-holds -->
224 [% END # / #HOLDS.count %]