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