Bug 30733: [22.05] Simplify translatable strings
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / includes / holds-table.inc
1 [% USE Branches %]
2 [% USE ItemTypes %]
3 [% USE KohaDates %]
4 [% PROCESS 'i18n.inc' %]
5
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 -->
11             <thead>
12                 <tr>
13                     <th class="anti-the">Title</th>
14                     [% IF ( showpriority ) %]
15                         <th>Placed on</th>
16                     [% ELSE %]
17                         <th class="psort">Placed on</th>
18                     [% END %]
19                     <th>Expires on</th>
20                     [% UNLESS( singleBranchMode) %]
21                         <th>Pick up location</th>
22                     [% END %]
23                     [% IF ( showpriority ) %]
24                         <th class="psort">Priority</th>
25                     [% END %]
26                     <th>Status</th>
27                     [% IF SuspendHoldsOpac and ! onlyinfo %]
28                             <th class="nosort" >Suspend</th>
29                     [% END %]
30                     [% IF ! onlyinfo %]
31                         <th class="nosort">Modify</th>
32                     [% END %]
33                 </tr>
34             </thead>
35             <tbody>
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 %]
40                     [% END %]
41                     [% IF ( HOLD.is_at_destination ) %]
42                         <tr class="reserved">
43                     [% ELSIF HOLD.is_in_transit %]
44                         <tr class="transfered">
45                     [% ELSE %]
46                         <tr>
47                     [% END %]
48                         <td class="title">
49                             [% IF ! onlyinfo %]
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 %]
53                                 </a>
54                             [% ELSE %]
55                                 <strong>
56                                     [% INCLUDE 'biblio-title.inc' biblio=HOLD.biblio %]
57                                     [% HOLD.item.enumchron | html %]
58                                 </strong>
59                             [% END %]
60                             [% HOLD.biblio.author | html %]
61                             [% IF HOLD.item_level_hold %]
62                                 <p class="hint">Item on hold: [% HOLD.item.barcode | html %]</p>
63                             [% END %]
64                         </td>
65                         <td class="reservedate" data-order="[% HOLD.reservedate | html %]">
66                             <span class="tdlabel">Hold date:</span>
67                                 [% HOLD.reservedate | $KohaDates %]
68                             </span>
69                         </td>
70                         [% IF ! HOLD.found %]
71                             <td class="expirationdate" data-order="[% HOLD.expirationdate | html %]">
72                                 [% IF ( HOLD.expirationdate ) %]
73                                     <span class="tdlabel">Expiration:</span>
74                                     [% HOLD.expirationdate | $KohaDates %]
75                                 [% ELSE %]
76                                     <span class="tdlabel">Expiration:</span>
77                                     Never expires
78                                 [% END %]
79                         [% ELSE %]
80                             <td class="expirationdate" data-order="0000-00-00">
81                                 -
82                         [% END %]
83                         </td>
84                         [% UNLESS( singleBranchMode) %]
85                             <td class="branch">
86                                 <span class="tdlabel">Pick up location:</span>
87                                 [% HOLD.branch.branchname | html %]
88                             </td>
89                         [% END %]
90                         [% IF ( showpriority ) %]
91                                 <td data-order="[% HOLD.priority | html %]" class="priority">
92                                 <span class="tdlabel">Priority:</span>
93                                 [% HOLD.priority | html %]
94                             </td>
95                         [% END %]
96                         <td class="status">
97                             <span class="tdlabel">Status:</span>
98                             [% IF ( HOLD.is_waiting ) %]
99                                 <i class="fa fa-exclamation-circle text-warning" aria-hidden="true"></i>
100                                 [% IF ( HOLD.is_at_destination ) %]
101                                     Item waiting at <strong> [% HOLD.branch.branchname | html %]</strong>
102                                     [% IF ( HOLD.desk_id ) %], [% HOLD.desk.desk_name | html %],[% END %]
103                                     [% IF ( HOLD.waitingdate ) %]
104                                         since [% HOLD.waitingdate | $KohaDates %]
105                                         [% IF HOLD.expirationdate %]
106                                             until [% HOLD.expirationdate | $KohaDates %]
107                                         [% END %]
108                                     [% END %]
109                                     <input type="hidden" name="pickup" value="[% HOLD.branchcode | html %]" />
110                                 [% ELSE %]
111                                     Item in transit to <strong> [% Branches.GetName( HOLD.branchcode ) | html %]</strong> <input type="hidden" name="pickup" value="[% HOLD.branchcode | html %]" />
112                                 [% END %]
113                             [% ELSE %]
114                                 [% IF ( HOLD.is_in_transit ) %]
115                                     [% SET transfer = HOLD.item.get_transfer %]
116                                     [% branch_name = BLOCK %]<strong>[% Branches.GetName( transfer.frombranch ) | html %]</strong>[% END %]
117                                     <span>Item in transit from [% branch_name| $raw %] since</span>
118                                     [% transfer.datesent | $KohaDates %]
119                                 [% ELSIF ( HOLD.is_in_processing ) %]
120                                     <span>Item in processing</span>
121                                 [% ELSIF ( HOLD.suspend ) %]
122                                     <span>Suspended</span>[% IF ( HOLD.suspend_until ) %] <span>until</span> [% HOLD.suspend_until | $KohaDates %][% END %]
123                                 [% ELSE %]
124                                     [% IF HOLD.itemtype %]
125                                         <span>Pending for next available item of item type '[% ItemTypes.GetDescription( HOLD.itemtype ) | html %]'</span>
126                                     [% ELSE %]
127                                         <span>Pending</span>
128                                     [% END %]
129                                 [% END %]
130                             [% END %]
131                         </td>
132                         [% IF SuspendHoldsOpac and ! onlyinfo %]
133                             <td>
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>
139                                         </form>
140                                     [% ELSE %]
141                                         [% IF AutoResumeSuspendedHolds %]
142                                             <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>
143                                         [% ELSE %]
144                                             <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
145                                                 <input type="hidden" name="reserve_id" value="[% HOLD.reserve_id | html %]" />
146                                                 <button class="btn btn-link" type="submit" name="submit"><i class="fa fa-pause" aria-hidden="true"></i> Suspend</button>
147                                             </form>
148                                         [% END # / IF AutoResumeSuspendedHolds %]
149                                     [% END # / IF HOLD.suspend %]
150                                 [% END # / IF ( HOLD.is_cancelable_from_opac )%]
151                             </td>
152                         [% END # / IF SuspendHoldsOpac %]
153                         [% IF ! onlyinfo %]
154                             <td class="modify">
155                                 [% IF ( HOLD.is_cancelable_from_opac ) %]
156                                     <form id="delete_hold_[% HOLD.reserve_id | html %]" action="/cgi-bin/koha/opac-modrequest.pl" method="post">
157                                     <input type="hidden" name="biblionumber" value="[% HOLD.biblionumber | html %]" />
158                                     <input type="hidden" name="reserve_id" value="[% HOLD.reserve_id | html %]" />
159                                     <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>
160                                 </form>
161                                 [% END %]
162                             </td>
163                         [% END # / IF onlyinfo %]
164                     </tr>
165                 [% END # /FOREACH HOLDS %]
166             </tbody>
167         </table>
168
169         [% IF SuspendHoldsOpac and ! onlyinfo %]
170             [% UNLESS ( all_holds_waiting ) %]
171                 <div>
172                     <form class="form-inline" id="suspend_all_holds" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
173                         <button type="submit" id="suspend_all_submit" class="btn btn-primary"><i class="fa fa-pause" aria-hidden="true"></i> Suspend all holds</button>
174                         <input type="hidden" name="suspend" value="1" />
175
176                         [% IF AutoResumeSuspendedHolds %]
177                             <label for="suspend_until"> until </label>
178                             <input type="text" name="suspend_until" id="suspend_until" class="flatpickr futuredate" size="10" />
179                             <p><a href="#" class="clear-flatpickr" data-fp="suspend_until">Clear date to suspend indefinitely</a></p>
180                         [% END %]
181                     </form>
182                 </div>
183                 <br/>
184                 <div>
185                     <form id="resume_all_holds" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
186                         <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>
187                         <input type="hidden" name="suspend" value="0" />
188                     </form>
189                 </div>
190             [% END %]
191         [% END %]
192     </div> <!-- / #opac-user-holds -->
193 [% END # / #HOLDS.count %]