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