Bug 19532: Recalls on intranet
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / renew.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE KohaDates %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7
8 <title>Renew [% title | html %] &rsaquo; Circulation &rsaquo; Koha</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 </head>
11
12 <body id="circ_renew" class="circ">
13
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'circ-search.inc' %]
16
17 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
18     <ol>
19         <li>
20             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
21         </li>
22         <li>
23             <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
24         </li>
25         <li>
26             <a href="#" aria-current="page">
27                 Renew
28             </a>
29         </li>
30     </ol>
31 </nav>
32
33 <div class="main container-fluid">
34     <div class="row">
35         <div class="col-sm-12">
36             <main>
37                 <div class="row">
38
39                 [% IF Koha.Preference('CircSidebar') %]
40                     <div class="col-sm-10 col-sm-push-2">
41                 [% ELSE %]
42                     <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
43                 [% END %]
44
45                 [% IF error %]
46                     <div class="dialog alert">
47                         <h3>Cannot renew:</h3>
48
49                             [% IF error == "no_item" %]
50
51                                 <p>No item matches this barcode</p>
52
53                             [% ELSIF error == "no_checkout" %]
54
55                                 <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %] ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber | uri %]&amp;biblionumber=[% item.biblio.biblionumber | uri %]&amp;bi=[% item.biblioitemnumber.biblioitemnumber | uri %]#item[% item.itemnumber | uri %]">[% item.barcode | html %]</a> ) is not checked out to a patron.</p>
56
57                             [% ELSIF error == "too_many" %]
58
59                                 <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %] ( [% item.barcode | html %] ) has been renewed the maximum number of times by [% borrower.firstname | html %] [% borrower.surname | html %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber | uri %]"> [% borrower.cardnumber | html %] </a> )</p>
60
61                                 [% IF Koha.Preference('AllowRenewalLimitOverride') %]
62                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
63                                         <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
64                                         <input type="hidden" name="override_limit" value="1" />
65                                         <button type="submit" class="approve"><i class="fa fa-check"></i> Override limit and renew</button>
66                                     </form>
67                                 [% END %]
68
69                             [% ELSIF error == "too_unseen" %]
70
71                                 <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio %] ( [% item.barcode | html %] ) has been renewed the maximum number of consecutive times without being seen by the library )</p>
72
73                                 [% IF Koha.Preference('AllowRenewalLimitOverride') %]
74                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
75                                         <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
76                                         <input type="hidden" name="override_limit" value="1" />
77                                         <button type="submit" class="approve"><i class="fa fa-check"></i> Override limit and renew</button>
78                                     </form>
79                                 [% END %]
80
81                             [% ELSIF error == "too_soon" %]
82
83                                 <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %] ( [% item.barcode | html %] ) cannot be renewed before [% soonestrenewdate | $KohaDates %]. </p>
84
85                                 [% IF Koha.Preference('AllowRenewalLimitOverride') %]
86                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
87                                         <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
88                                         <input type="hidden" name="override_limit" value="1" />
89                                         <button type="submit" class="approve"><i class="fa fa-check"></i> Override and renew</button>
90                                     </form>
91                                 [% END %]
92
93                             [% ELSIF error == "auto_too_soon" %]
94
95                                 <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal and cannot be renewed before [% soonestrenewdate | $KohaDates %]. </p>
96
97                                 [% IF Koha.Preference('AllowRenewalLimitOverride') %]
98                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
99                                         <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
100                                         <input type="hidden" name="override_limit" value="1" />
101                                         <button type="submit" class="approve"><i class="fa fa-check"></i> Override and renew</button>
102                                     </form>
103                                 [% END %]
104
105                             [% ELSIF error == "auto_too_late" %]
106
107                                 <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal and cannot be renewed anymore since [% latestautorenewdate | $KohaDates %]. </p>
108
109                                 [% IF Koha.Preference('AllowRenewalLimitOverride') %]
110                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
111                                         <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
112                                         <input type="hidden" name="override_limit" value="1" />
113                                         <input type="submit" class="approve" value="Override and renew" />
114                                     </form>
115                                 [% END %]
116
117                             [% ELSIF error == "auto_account_expired" %]
118
119                                 <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal and cannot be renewed because the patron's account is expired</p>
120
121                                 [% IF Koha.Preference('AllowRenewalLimitOverride') %]
122                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
123                                         <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
124                                         <input type="hidden" name="override_limit" value="1" />
125                                         <input type="submit" class="approve" value="Override and renew" />
126                                     </form>
127                                 [% END %]
128
129                             [% ELSIF error == "auto_renew" or error == "auto_too_much_oweing" %]
130
131                                 <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal. </p>
132
133                                 [% IF Koha.Preference('AllowRenewalLimitOverride') %]
134                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
135                                         <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
136                                         <input type="hidden" name="override_limit" value="1" />
137                                         <button type="submit" class="approve"><i class="fa fa-check"></i> Override limit and renew</button>
138                                     </form>
139                                 [% END %]
140
141                             [% ELSIF error == "on_reserve" %]
142
143                                 <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %] ( [% item.barcode | html %] ): This item is on hold for another patron.</p>
144
145                                 <form method="post" action="/cgi-bin/koha/circ/renew.pl">
146                                     <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
147                                     <input type="hidden" name="override_limit" value="1" />
148                                     <input type="hidden" name="override_holds" value="1" />
149                                     <div>
150                                         <label for="renewonholdduedate">Renewal due date:</label>
151                                         <input type="text" size="20" id="renewonholdduedate" name="renewonholdduedate" value="" class="flatpickr" data-flatpickr-enable-time="true" />
152                                     </div>
153                                     <button type="submit" class="approve"><i class="fa fa-check"></i> Override and renew</button>
154                                 </form>
155
156                             [% ELSIF error == "patron_restricted" %]
157
158                                 <p>[% borrower.firstname | html %] [% borrower.surname | html %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber | uri %]"> [% borrower.cardnumber | html %] </a> ) is currently restricted.</p>
159
160                             [% ELSIF error == "item_denied_renewal" %]
161
162                                 <p>Item is not allowed renewal.</p>
163
164                             [% ELSIF error == "onsite_checkout" %]
165                                 <p>Item cannot be renewed because it's an onsite checkout</p>
166
167                             [% ELSIF error == 'recalled' %]
168                                 <p>This item has been recalled.</p>
169
170                             [% ELSE %]
171
172                                 [% error | html %]
173
174                             [% END %]
175
176                                 <form method="get" action="/cgi-bin/koha/circ/renew.pl">
177                                     <input type="hidden" name="hard_due_date" value="[% hard_due_date | html %]" />
178                                     <button type="submit" class="deny"><i class="fa fa-times"></i> Continue without renewing</button>
179                                 </form>
180                     </div>
181                 [% END %]
182
183                 [% IF date_due %]
184                     <div class="dialog message">
185                         <h3>Item renewed:</h3>
186                         <p>
187                             [% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %]
188                             ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber | uri %]&amp;biblionumber=[% item.biblio.biblionumber | uri %]&amp;bi=[% item.biblioitemnumber.biblioitemnumber | uri %]#item[% item.itemnumber | uri %]">[% item.barcode | html %]</a> )
189                             renewed for
190                             [% borrower.firstname | html %] [% borrower.surname | html %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber | uri %]"> [% borrower.cardnumber | html %] </a> )
191                             now due on [% date_due | $KohaDates %]
192                         </p>
193                     </div>
194                 [% END %]
195
196             [% UNLESS error %]
197                 <form method="post" action="/cgi-bin/koha/circ/renew.pl" autocomplete="off" >
198
199                     <fieldset>
200                         <h2>Renew</h2>
201
202                         [% IF Koha.Preference('UnseenRenewals') %]
203                             <div class="renew_formfield">
204                                 <div>
205                                     <label for="barcode" class="hint">Enter item barcode: </label>
206                                 </div>
207                                 <input name="barcode" id="barcode" size="14" class="barcode focus" type="text" />
208                             </div>
209                             <div class="renew_formfield">
210                                 <label for="unseen" class="hint">Record renewal as unseen if appropriate: </label>
211                                 <input value="1" name="unseen" id="unseen" type="checkbox" />
212                             </div>
213                         [% ELSE %]
214                             <div>
215                                 <label for="barcode" class="hint">Enter item barcode: </label>
216                             </div>
217
218                             <input name="barcode" id="barcode" size="14" class="barcode focus" type="text" />
219
220                         [% END %]
221                         <button type="submit" class="btn btn-default">Submit</button>
222
223                         <div class="circ-settings show">
224                             <div class="date-select" id="renew_date_override_fields">
225                                 <div><label for="hard_due_date" class="hint">Renewal due date [% INCLUDE 'date-format.inc' %]:</label></div>
226                                 <input type="text" size="20" id="hard_due_date" name="hard_due_date" value="[% hard_due_date | $KohaDates with_hours => 1 %]" class="flatpickr" data-flatpickr-futuredate="true" data-flatpickr-enable-time="true" />
227                             </div> <!-- /.date-select -->
228                         </div>
229                     </fieldset>
230
231
232                 </form>
233             [% END %]
234
235                     [% IF Koha.Preference('CircSidebar') %]
236                             </div> <!-- /.col-sm-10.col-sm-push-2 -->
237                             <div class="col-sm-2 col-sm-pull-10">
238                                 <aside>
239                                     [% INCLUDE 'circ-nav.inc' %]
240                                 </aside>
241                             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
242                         </div> <!-- /.row -->
243                     [% END %]
244
245             </main>
246         </div> <!-- /.col-sm-12 -->
247     </div> <!-- /.row -->
248
249 [% MACRO jsinclude BLOCK %]
250     [% INCLUDE 'calendar.inc' %]
251     [% IF error %]
252         <script>
253             $( document ).ready(function() {
254                 removeFocus();
255             });
256         </script>
257     [% END %]
258 [% END %]
259
260 [% INCLUDE 'intranet-bottom.inc' %]