Bug 22818: (QA follow-up) Template CASE correction
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / letter.tt
blobe4995a4a1f06c804d614b255d819fc59a4623efd
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE KohaDates %]
5 [% USE Branches %]
6 [% USE TablesSettings %]
7 [% SET footerjs = 1 %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>
10     Koha &rsaquo; Tools &rsaquo; Notices
11     [% IF ( add_form or copy_form ) %]
12         [% IF ( modify ) %]
13              &rsaquo; Modify notice
14         [% ELSE %]
15             &rsaquo; Add notice
16         [% END %]
17     [% END %]
18     [% IF ( add_validate or copy_validate) %]
19         &rsaquo; Notice added
20     [% END %]
21     [% IF ( delete_confirm ) %]
22         &rsaquo; Confirm deletion
23     [% END %]
24 </title>
25 [% INCLUDE 'doc-head-close.inc' %]
26 <style>#preview_template .modal-dialog { width : 80%; } .spinner { display: none; } @media (max-width: 767px) { #preview_template { margin: 0; width : auto; } }</style>
27 </head>
29 <body id="tools_letter" class="tools">
30     [% INCLUDE 'header.inc' %]
31     [% INCLUDE 'letters-search.inc' %]
33     <div id="breadcrumbs">
34         <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
35         <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
36         [% IF ( add_form or copy_form) %]
37             [% IF ( modify ) %]
38                 <a href="/cgi-bin/koha/tools/letter.pl">Notices &amp; slips</a> &rsaquo;
39                 Modify notice
40             [% ELSE %]
41                 <a href="/cgi-bin/koha/tools/letter.pl">Notices &amp; slips</a> &rsaquo;
42                 Add notice
43             [% END %]
44         [% ELSE %]
45             [% IF ( add_validate or copy_validate) %]
46                 <a href="/cgi-bin/koha/tools/letter.pl">Notices &amp; slips</a> &rsaquo;
47                 Notice added
48             [% ELSE %]
49                 [% IF ( delete_confirm ) %]
50                     <a href="/cgi-bin/koha/tools/letter.pl">Notices &amp; slips</a> &rsaquo;
51                     Confirm deletion
52                 [% ELSE %]
53                     Notices &amp; slips
54                 [% END %]
55             [% END %]
56         [% END %]
57     </div> <!-- /#breadcrumbs -->
59     <div id="preview_template" class="modal in" tabindex="-1" role="dialog" aria-labelledby="preview_template_label" aria-hidden="true">
60         <div class="modal-dialog modal-lg">
61             <div class="modal-content">
62                 <div class="modal-header">
63                     <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
64                     <h3 id="preview_template_label">Preview notice template</h3>
65                 </div>
66                 <div class="modal-body">
67                     <div id="loading">
68                         <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading
69                     </div>
70                 </div>
71                 <div class="modal-footer">
72                     <!-- TODO <a href="#" class="btn btn-default" id="preview_template_button" role="button" data-toggle="modal">Convert using the Template Toolkit syntax</a>-->
73                     <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
74                 </div>
75             </div> <!-- /.modal-content -->
76         </div> <!-- /.modal-dialog -->
77     </div> <!-- /#preview_template -->
79     [% IF add_form or copy_form %]
80         <div class="main container-fluid">
81             <div class="row">
82                 <div class="col-md-8 col-md-offset-2">
83     [% ELSE %]
84         <div class="main container-fluid">
85             <div class="row">
86                 <div class="col-sm-10 col-sm-push-2">
87                     <main>
88     [% END %]
90                 [% IF ( no_op_set ) %]
91                     <h1>Notices &amp; slips</h1>
92                     <form method="get" action="/cgi-bin/koha/tools/letter.pl" id="selectlibrary">
93                         <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
94                         [% UNLESS independant_branch %]
95                             <p>
96                                 Select a library:
97                                 <select name="branchcode" id="branch" style="width:20em;">
98                                     <option value="*">All libraries</option>
99                                     [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
100                                 </select>
101                             </p>
102                         [% END %]
103                     </form> <!-- /#selectlibrary -->
105                     <div id="toolbar" class="btn-toolbar">
106                         <div class="btn-group">
107                             <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New notice <span class="caret"></span></button>
108                             <ul class="dropdown-menu">
109                                 <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=acquisition">Acquisition</a></li>
110                                 <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=catalogue">Catalog</a></li>
111                                 <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=circulation">Circulation</a></li>
112                                 <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=claimacquisition">Claim acquisition</a></li>
113                                 <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=claimissues">Claim serial issue</a></li>
114                                 <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=reserves">Holds</a></li>
115                                 <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=ill">Interlibrary loans</a></li>
116                                 <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=orderacquisition">Order acquisition</a></li>
117                                 <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=members">Patrons</a></li>
118                                 <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=serial">Serials (new issue)</a></li>
119                                 <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=suggestions">Suggestions</a></li>
120                                 <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=pos">Point of sale</a></li>
121                             </ul>
122                         </div>
123                     </div> <!-- /#toolbar -->
125                     [% IF ( search ) %]
126                         <p>You searched for <strong>[% searchfield | html %]</strong></p>
127                     [% END %]
129                     [% IF ( letter && !independant_branch) %]
130                         [% select_for_copy = BLOCK %]
131                             <select name="branchcode">
132                                 [% FOREACH l IN Branches.all() %]
133                                     <option value="[% l.branchcode | html %]">Copy to [% l.branchname | html %]</option>
134                                 [% END %]
135                             </select>
136                         [% END %]
137                     [% END %]
139                     [% IF letter %]
140                         <table id="lettert">
141                             <thead>
142                                 <tr>
143                                     <th>Library</th>
144                                     <th>Module</th>
145                                     <th>Code</th>
146                                     <th>Name</th>
147                                     <th class="title-string">Last updated</th>
148                                     <th class="nosort">Copy notice</th>
149                                     <th class="nosort">Actions</th>
150                                 </tr>
151                             </thead>
152                             <tbody>
153                                 [% FOREACH lette IN letter %]
154                                     [% can_edit = lette.branchcode || !independant_branch %]
155                                     <tr>
156                                         <td>
157                                             [% IF lette.branchname %]
158                                                 [% lette.branchname | html %]
159                                             [% ELSE %]
160                                                 (All libraries)
161                                             [% END %]
162                                         </td>
163                                         <td>
164                                             [% SWITCH lette.module %]
165                                                 [% CASE 'acquisition' %]<span>Acquisition</span>
166                                                 [% CASE 'catalogue' %]<span>Catalog</span>
167                                                 [% CASE 'circulation' %]<span>Circulation</span>
168                                                 [% CASE 'orderacquisition' %]<span>Order acquisition</span>
169                                                 [% CASE 'claimacquisition' %]<span>Claim acquisition</span>
170                                                 [% CASE 'claimissues' %]<span>Claim serial issue</span>
171                                                 [% CASE 'reserves' %]<span>Holds</span>
172                                                 [% CASE 'ill' %]<span>Interlibrary loans</span>
173                                                 [% CASE 'members' %]<span>Patrons</span>
174                                                 [% CASE 'serial' %]<span>Serials (new issue)</span>
175                                                 [% CASE 'suggestions' %]<span>Suggestions</span>
176                                                 [% CASE 'pos' %]<span>Point of sale</span>
177                                                 [% CASE %]<span>[% lette.module | html %]</span>
178                                             [% END %]
179                                         </td>
180                                         <td>[% lette.code | html %]</td>
181                                         <td>[% lette.name | html %]</td>
182                                         <td><span title="[% lette.updated_on | $KohaDates with_hours = 1 %]">[% lette.updated_on | $KohaDates with_hours = 1 %]</span></td>
183                                         <td class="actions">
184                                             [% IF !independant_branch || !lette.branchcode %]
185                                                 <form method="post" action="/cgi-bin/koha/tools/letter.pl">
186                                                     <input type="hidden" name="op" value="copy_form" />
187                                                     <input type="hidden" name="oldbranchcode" value="[% lette.branchcode | html %]" />
188                                                     <input type="hidden" name="module" value="[% lette.module | html %]" />
189                                                     <input type="hidden" name="code" value="[% lette.code | html %]" />
190                                                     [% IF independant_branch %]
191                                                         <input type="hidden" name="branchcode" value="[% independant_branch | html %]" />
192                                                     [% ELSE %]
193                                                         [% select_for_copy | $raw %]
194                                                     [% END %]
195                                                     <button class="btn btn-default btn-xs"><i class="fa fa-clone"></i> Copy</button>
196                                                 </form>
197                                             [% END # /IF !independent_branch %]
198                                         </td>
199                                         <td class="actions">
200                                             [% IF can_edit %]
201                                                 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;branchcode=[% lette.branchcode | html %]&amp;module=[% lette.module | html %]&amp;code=[% lette.code | html %]"><i class="fa fa-pencil"></i> Edit</a>
202                                             [% END %]
203                                             [% IF !lette.protected && can_edit %]
204                                                 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&amp;branchcode=[% lette.branchcode | html %]&amp;module=[% lette.module | html %]&amp;code=[% lette.code | html %]"><i class="fa fa-trash"></i> Delete</a>
205                                             [% END %]
206                                         </td>
207                                     </tr>
208                                 [% END # /FOREACH lette %]
209                             </tbody>
210                         </table> <!-- /#lettert -->
211                     [% ELSE # IF lette %]
212                         <div class="dialog message">
213                             [% IF ( branchcode ) %]
214                                 <p>There are no notices for this library.</p>
215                             [% ELSE %]
216                                 <p>There are no notices.</p>
217                             [% END %]
218                         </div>
219                     [% END # /IF lette %]
220                 [% END # /IF no_op_set %]
222                 [% IF add_form or copy_form %]
223                     <h1>[% IF ( modify ) %]Modify notice[% ELSE %]Add notice[% END %]</h1>
225                     <div id="toolbar" class="btn-toolbar">
226                         <div class="btn-group">
227                             <button class="btn btn-default" id="submit_form"><i class="fa fa-save"></i> Save</button>
228                             <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
229                             <span class="caret"></span>
230                             </button>
231                             <ul class="dropdown-menu">
232                                 <li><a id="saveandcontinue" href="#">Save and continue editing</a></li>
233                             </ul>
234                         </div>
235                         <a class="btn btn-default cancel" href="/cgi-bin/koha/tools/letter.pl"><i class="fa fa-remove"></i> Cancel</a>
236                     </div> <!-- /#toolbar -->
238                     <form id="add_notice" name="Aform" method="post" enctype="multipart/form-data" class="validate">
239                         [% IF add_form %]
240                             <input type="hidden" name="op" id="op" value="add_validate" />
241                         [% ELSE %]
242                             <input type="hidden" name="op" id="op" value="copy_validate" />
243                         [% END %]
245                         <input type="hidden" name="checked" value="0" />
247                         [% IF ( modify ) %]
248                             <input type="hidden" name="add" value="0" />
249                         [% ELSE %]
250                             <input type="hidden" name="add" value="1" />
251                         [% END %]
253                         <fieldset class="rows">
254                             <input type="hidden" name="oldbranchcode" value="[% oldbranchcode | html %]" />
255                             [% IF independant_branch %]
256                                 <input type="hidden" name="branchcode" value="[% independant_branch | html %]" />
257                                 <ol>
258                             [% ELSE %]
259                                 <ol>
260                                     <li>
261                                         [% IF adding %]
262                                             <label for="branch">Library:</label>
263                                             <select name="branchcode" id="branch" style="width:20em;">
264                                                 <option value="">All libraries</option>
265                                                 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
266                                             </select>
267                                         [% ELSE %]
268                                             <span class="label">Library:</span>
269                                             <input type="hidden" id="branch" name="branchcode" value="[% branchcode | html %]" />
270                                             [% IF ( branchcode ) %]
271                                                [% Branches.GetName( branchcode ) | html %]
272                                             [% ELSE %]
273                                                 All libraries
274                                             [% END %]
275                                         [% END %]
276                                     </li>
277                             [% END # /IF independant_branch %]
278                                 <li>
279                                     <label for="module">Koha module:</label>
280                                     <input type="hidden" name="oldmodule" value="[% module | html %]" />
281                                     [% IF adding  %]
282                                         <select name="module" id="newmodule">
283                                     [% ELSE %]
284                                         <select name="module" id="module">
285                                     [% END %]
286                                     [% IF ( module == "acquisition" ) %]
287                                         <option value="acquisition" selected="selected">Acquisition</option>
288                                     [% ELSE %]
289                                         <option value="acquisition" >Acquisition</option>
290                                     [% END %]
291                                     [% IF ( module == "catalogue" ) %]
292                                         <option value="catalogue" selected="selected">Catalog</option>
293                                     [% ELSE %]
294                                         <option value="catalogue" >Catalog</option>
295                                     [% END %]
296                                     [% IF ( module == "circulation" ) %]
297                                         <option value="circulation" selected="selected">Circulation</option>
298                                     [% ELSE %]
299                                         <option value="circulation">Circulation</option>
300                                     [% END %]
301                                     [% IF ( module == "orderacquisition" ) %]
302                                         <option value="orderacquisition" selected="selected">Order acquisition</option>
303                                     [% ELSE %]
304                                         <option value="orderacquisition">Order acquisition</option>
305                                     [% END %]
306                                     [% IF ( module == "claimacquisition" ) %]
307                                         <option value="claimacquisition" selected="selected">Claim acquisition</option>
308                                     [% ELSE %]
309                                         <option value="claimacquisition">Claim acquisition</option>
310                                     [% END %]
311                                     [% IF ( module == "claimissues" ) %]
312                                         <option value="claimissues" selected="selected">Claim serial issue</option>
313                                     [% ELSE %]
314                                         <option value="claimissues">Claim serial issue</option>
315                                     [% END %]
316                                     [% IF ( module == "reserves" ) %]
317                                         <option value="reserves" selected="selected">Holds</option>
318                                     [% ELSE %]
319                                         <option value="reserves">Holds</option>
320                                     [% END %]
321                                     [% IF ( module == "ill" ) %]
322                                       <option value="ill" selected="selected">Interlibrary loans</option>
323                                     [% ELSE %]
324                                       <option value="ill">Interlibrary loans</option>
325                                     [% END %]
326                                     [% IF ( module == "members" ) %]
327                                         <option value="members" selected="selected">Patrons</option>
328                                     [% ELSE %]
329                                         <option value="members">Patrons</option>
330                                     [% END %]
331                                     [% IF ( module == "serial" ) %]
332                                         <option value="serial" selected="selected">Serials (new issue)</option>
333                                     [% ELSE %]
334                                         <option value="serial">Serials (new issue)</option>
335                                     [% END %]
336                                     [% IF ( module == "suggestions" ) %]
337                                         <option value="suggestions" selected="selected">Suggestions</option>
338                                     [% ELSE %]
339                                         <option value="suggestions">Suggestions</option>
340                                     [% END %]
341                                     [% IF ( module == "pos" ) %]
342                                         <option value="pos" selected="selected">Point of sale</option>
343                                     [% ELSE %]
344                                         <option value="pos">Point of sale</option>
345                                     [% END %]
346                                 </select>
347                             </li>
348                             <li>
349                                 [% IF adding %]
350                                     <label for="code" class="required">Code:</label>
351                                     <input type="text" id="code" name="code" size="20" maxlength="20" value="" required="required"/>
352                                     <span class="required">Required</span>
353                                 [% ELSE %]
354                                     <span class="label">Code:</span>
355                                     <input type="hidden" id="code" name="code" value="[% code | html %]" />
356                                     [% code | html %]
357                                 [% END %]
358                             </li>
359                             <li>
360                                 <label for="name" class="required">Name:</label>
361                                 <input type="text" id="name" name="name" size="60" value="[% letter_name | html %]" required="required" />
362                                 <span class="required">Required</span>
363                             </li>
364                             [% IF code and preview_is_available%]
365                                 <li>
366                                     <label for="name">Data for preview:</label>
367                                     [% SWITCH code %]
368                                         [% CASE 'CHECKIN' %]
369                                             <input type="text" id="data_preview" name="data_preview" value="" placeholder="barcode" />
370                                         [% CASE 'CHECKOUT' %]
371                                             <input type="text" id="data_preview" name="data_preview" value="" placeholder="barcode|borrowernumber" />
372                                         [% CASE 'HOLD_SLIP' %]
373                                             <input type="text" id="data_preview" name="data_preview" value="" placeholder="biblionumber|borrowernumber" />
374                                         [% CASE %]
375                                             Not supported yet.
376                                     [% END %]
377                                     </li>
378                             [% END # /IF code %]
379                         </ol>
380                     </fieldset> <!-- /#add_notice -->
382                     [% IF Koha.Preference('TranslateNotices') %]
383                         <div style="clear:both"></div>
384                         <div id="tabs">
385                             <ul>
386                                 <li><a href="#lang_default">Default</a></li>
387                                 [% FOR language IN languages %]
388                                     [% FOR sublanguage IN language.sublanguages_loop %]
389                                         [% IF language.plural %]
390                                             <li><a href="#lang_[% sublanguage.rfc4646_subtag | uri %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</a></li>
391                                         [% ELSE %]
392                                             <li><a href="#lang_[% sublanguage.rfc4646_subtag | uri %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</a></li>
393                                         [% END %]
394                                     [% END %]
395                                 [% END %]
396                             </ul>
397                     [% END # /IF TranslateNotices %]
399                     [% FOREACH lang IN letters.keys %]
400                         <div id="lang_[% lang | html %]">
401                             <div class="transport-types" style="clear:both">
402                                 [% FOR mtt IN letters.$lang.templates.keys.sort %]
403                                     [% SET letter = letters.$lang.templates.$mtt %]
404                                     [% NEXT IF letter.message_transport_type == "itiva" && !Koha.Preference('TalkingTechItivaPhoneNotification') %]
405                                     [% NEXT IF letter.message_transport_type == "phone" && !Koha.Preference('PhoneNotification') %]
406                                     <h3>
407                                         [% SWITCH letter.message_transport_type %]
408                                             [% CASE 'email' %]
409                                               Email
410                                             [% CASE 'print' %]
411                                               Print
412                                             [% CASE 'sms' %]
413                                               SMS
414                                             [% CASE 'feed' %]
415                                               Feed
416                                             [% CASE 'itiva' %]
417                                               Phone ( Itiva )
418                                             [% CASE 'phone' %]
419                                                 Phone
420                                             [% CASE %]
421                                               [% letter.message_transport_type | html %]
422                                         [% END %]
423                                     </h3>
424                                     [% IF letter.message_transport_type == "sms" and not Koha.Preference("SMSSendDriver") %]
425                                         <fieldset class="rows mtt" id="[% letter.message_transport_type | html %]_[% lang | html %]" disabled="disabled">
426                                             <div class="dialog message">You should enable the SMSSendDriver preference to use the SMS templates.</div>
427                                     [% ELSE %]
428                                         <fieldset class="rows mtt" id="[% letter.message_transport_type | html %]_[% lang | html %]">
429                                     [% END %]
430                                         <ol>
431                                             [% IF ( letter.updated_on ) %]
432                                                 <li>
433                                                     <label for="updated_on_[% letter.message_transport_type | html %]_[% lang | html %]">Last updated:</label>
434                                                     [% letter.updated_on | $KohaDates with_hours = 1 %]
435                                                 </li>
436                                             [% END %]
437                                             <li>
438                                                 <input type="hidden" name="message_transport_type" value="[% letter.message_transport_type | html %]" />
439                                                 <input type="hidden" name="lang" value="[% lang | html %]" />
440                                                 <label for="is_html_[% letter.message_transport_type | html %]_[% lang | html %]">HTML message:</label>
441                                                 [% IF letter.is_html %]
442                                                     <input type="checkbox" name="is_html_[% letter.message_transport_type | html %]_[% lang | html %]" id="is_html_[% letter.message_transport_type | html %]_[% lang | html %]" value="1" checked="checked" />
443                                                 [% ELSE %]
444                                                     <input type="checkbox" name="is_html_[% letter.message_transport_type | html %]_[% lang | html %]" id="is_html_[% letter.message_transport_type | html %]_[% lang | html %]" value="1" />
445                                                 [% END %]
446                                             </li>
447                                             <li>
448                                                 <label for="title_[% letter.message_transport_type | html %]_[% lang | html %]">Message subject:</label><input type="text" id="title_[% letter.message_transport_type | html %]_[% lang | html %]" name="title" size="60" value="[% letter.title | html %]" />
449                                             </li>
450                                             <li>
451                                                 <label for="SQLfieldname_[% letter.message_transport_type | html %]_[% lang | html %]">Message body:</label>
452                                                 [% IF letter.message_transport_type == 'sms' %]
453                                                     <span class="sms_counter" id="sms_counter_[% lang | html %]">[% IF letter.content && letter.content.length > 0 %][% letter.content.length | html %][% ELSE %]0[% END %]/160 characters</span>
454                                                 [% END %]
455                                                 <table>
456                                                     <tr>
457                                                         <td>
458                                                             <select name="SQLfieldname" id="SQLfieldname_[% letter.message_transport_type | html %]_[% lang | html %]" multiple="multiple" size="9">
459                                                                 [% FOREACH SQLfieldname IN SQLfieldnames %]
460                                                                     <option value="[% SQLfieldname.value | html %]">[% SQLfieldname.text | html %]</option>
461                                                                 [% END %]
462                                                             </select>
463                                                         </td>
464                                                         <td class="actions">
465                                                             <button type="button" data-containerid="[% letter.message_transport_type | html %]_[% lang | html %]" class="btn btn-default btn-sm insert">Insert <i class="fa fa-long-arrow-right"></i></button>
466                                                         </td>
467                                                         <td>
468                                                             <textarea name="content" data-lang="[% lang | html %]" class="content_[% letter.message_transport_type | html %]" id="content_[% letter.message_transport_type | html %]_[% lang | html %]" cols="80" rows="15">[% letter.content | html %]</textarea>
469                                                         </td>
470                                                     </tr>
471                                                 </table>
472                                             </li>
473                                             [% IF preview_is_available %]
474                                                 <li>
475                                                     <a href="/cgi-bin/koha/svc/letters/preview" class="preview_template btn btn-default btn-xs" title="Preview this notice template" data-mtt="[% letter.message_transport_type | html %]" data-lang="[% lang | html %]"><i class="fa fa-eye"></i> Preview</a>
476                                                 </li>
477                                             [% END %]
478                                         </ol>
479                                     </fieldset> <!-- /.rows.mtt -->
480                                 [% END # /FOR mtt %]
481                             </div>
482                         </div> <!-- / #transport-types -->
483                     [% END # /FOREACH lang %]
485                     [% IF Koha.Preference('TranslateNotices') %]
486                         </div>
487                     [% END %]
489                         <input type="hidden" id="redirect" name="redirect" value="" />
490                         <input type="hidden" id="section" name="section" value="[% section | html %]" />
491                         <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
492                     </form> <!-- /#add_notice -->
493                 [% END # /IF add_form %]
495                 [% IF ( add_validate or copy_validate) %]
496                     Data recorded
497                     <form action="[% action | html %]" method="post">
498                         <input type="submit" value="OK" />
499                     </form>
500                 [% END %]
502                 [% IF ( delete_confirm ) %]
503                     <div class="dialog alert">
504                         <h3>Delete notice?</h3>
505                         <table>
506                             <thead>
507                             <tr>
508                                 <th>Library</th>
509                                 <th>Module</th>
510                                 <th>Code</th>
511                                 <th>Name</th>
512                             </tr>
513                             </thead>
514                             <tr>
515                                 <td>[% IF letter.branchcode %][% Branches.GetName( letter.branchcode ) | html %][% ELSE %](All libraries)[% END %]</td>
516                                 <td>[% letter.module | html %]</td>
517                                 <td>[% letter.code | html %]</td>
518                                 <td>[% letter.name | html %]</td>
519                             </tr>
520                         </table>
521                         <form action="[% action | html %]" method="post">
522                             <input type="hidden" name="op" value="delete_confirmed">
523                             <input type="hidden" name="branchcode" value="[% letter.branchcode | html %]" />
524                             <input type="hidden" name="code" value="[% letter.code | html %]" />
525                             <input type="hidden" name="module" value="[% letter.module | html %]" />
526                             <button type="submit" class="approve"><i class="fa fa-check"></i> Yes, delete</button>
527                         </form>
529                         <form action="[% action | html %]" method="get">
530                             <button type="submit" class="deny"><i class="fa fa-times"></i> No, do not delete</button>
531                         </form>
532                     </div>
533                 [% END # /IF delete_confirm %]
535                 [% IF ( delete_confirmed ) %]
536                     Data deleted
537                     <form action="[% action | html %]" method="post">
538                     <input type="submit" value="OK" />
539                     </form>
540                 [% END %]
542     [% IF add_form or copy_form %]
543             </div> <!-- /.col-md-8 -->
544         </div> <!-- /.row -->
545     [% ELSE %]
546                 </main>
547             </div> <!-- /.col-sm-10.col-sm-push-2 -->
549             <div class="col-sm-2 col-sm-pull-10">
550                 <aside>
551                     [% INCLUDE 'tools-menu.inc' %]
552                 </aside>
553             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
554         </div> <!-- /.row -->
555     [% END %]
557 [% MACRO jsinclude BLOCK %]
558     [% Asset.js("js/tools-menu.js") | $raw %]
559     [% INCLUDE 'datatables.inc' %]
560     [% INCLUDE 'columns_settings.inc' %]
561     [% Asset.js("lib/hc-sticky.js") | $raw %]
562     [% Asset.js("lib/jquery/plugins/jquery.insertatcaret.js") | $raw %]
563     <script>
564         var no_op_set = '[% no_op_set | html %]';
565         var interface = '[% interface | html %]';
566         var theme = '[% theme | html %]';
567         var add_form = '[% add_form | html %]';
568         var copy_form = '[% copy_form | html %]';
569         var code = '[% code | html %]';
570         var new_lettercode = '[% new_lettercode | html %]';
571         var new_branchcode = '[% new_branchcode | html %]';
572         var columns_settings = [% TablesSettings.GetColumns( 'tools', 'notices', 'lettert', 'json' ) | $raw %];
573      </script>
574     [% Asset.js("js/letter.js") | $raw %]
575 [% END %]
577 [% INCLUDE 'intranet-bottom.inc' %]