Bug 29240: Centralise from/to handling
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / additional-contents.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE KohaDates %]
5 [% USE Branches %]
6 [% SET footerjs = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Additional contents &rsaquo; Tools &rsaquo; Koha</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% UNLESS ( wysiwyg ) %]
11     [% Asset.css("lib/codemirror/codemirror.css") | $raw %]
12     [% Asset.css("lib/codemirror/lint.min.css") | $raw %]
13     <style>
14         .CodeMirror {
15             resize: vertical;
16             z-index: 0;
17         }
18     </style>
19 [% END %]
20 </head>
21
22 <body id="tools_additional-contents" class="tools">
23 [% INCLUDE 'header.inc' %]
24 [% INCLUDE 'cat-search.inc' %]
25
26 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
27     <ol>
28         <li>
29             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
30         </li>
31         <li>
32             <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
33         </li>
34
35             <li>
36                 <a href="/cgi-bin/koha/tools/additional-contents.pl">Additional contents</a>
37             </li>
38         [% IF op == 'add_form' %]
39             <li>
40                 [% IF category == 'news' %]
41                     <a href="/cgi-bin/koha/tools/additional-contents.pl?category=news">News</a>
42                 [% ELSE %]
43                     <a href="/cgi-bin/koha/tools/additional-contents.pl?category=html_customizations">HTML customizations</a>
44                 [% END %]
45             </li>
46             <li>
47                 <a href="#" aria-current="page">
48                     [% IF additional_content.idnew %]
49                         Modify additional content
50                     [% ELSE %]
51                         Add additional content
52                     [% END %]
53                 </a>
54             </li>
55         [% ELSE %]
56             <li>
57                 <a href="#" aria-current="page">
58                     [% IF category == 'news' %]
59                         News
60                     [% ELSE %]
61                         HTML customizations
62                     [% END %]
63                 </a>
64             </li>
65         [% END %]
66
67     </ol>
68 </nav>
69
70 [% IF op == 'add_form' %]
71 <div class="main container-fluid">
72     <div class="row">
73         <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
74 [% ELSE %]
75 <div class="main container-fluid">
76     <div class="row">
77         <div class="col-sm-10 col-sm-push-2">
78 [% END %]
79
80 <main>
81
82     [% FOR m IN messages %]
83         <div class="dialog [% m.type | html %]">
84             [% SWITCH m.code %]
85             [% CASE 'error_on_update' %]
86                 An error occurred when updating this content. Perhaps it already exists.
87             [% CASE 'error_on_insert' %]
88                 An error occurred when adding this content. Check the logs
89             [% CASE 'error_on_delete' %]
90                 An error occurred when deleting this content. Check the logs.
91             [% CASE 'success_on_update' %]
92                 Content updated successfully.
93             [% CASE 'success_on_insert' %]
94                 Content added successfully.
95             [% CASE 'success_on_delete' %]
96                 Content deleted successfully.
97             [% CASE %]
98                 [% m.code | html %]
99             [% END %]
100         </div>
101     [% END %]
102
103     [% IF op == 'add_form' %]
104         [% PROCESS add_form %]
105     [% ELSE %]
106         [% PROCESS list %]
107     [% END %]
108
109 </main>
110
111         [% IF op != 'add_form' %]
112             </div> <!-- /.col-sm-10.col-sm-push-2 -->
113
114             <div class="col-sm-2 col-sm-pull-10">
115                 <aside>
116
117                     <div id="news-filter">
118                         <form action="/cgi-bin/koha/tools/additional-contents.pl" method="get">
119                             <h4>Filter</h4>
120                             <fieldset class="brief">
121                                 <ol>
122                                     <li>
123                                         <label for="news_keyword">Keyword:</label>
124                                         <input type="text" name="news_keyword" id="news_keyword" />
125                                     </li>
126                                     <li>
127                                         <label for="news_display_location">Display location:</label>
128                                         <select name="news_display_location" id="news_display_location">
129                                             <option value="">All</option>
130                                             [% PROCESS locations_options category => category %]
131                                         </select>
132                                     </li>
133                                     <li>
134                                         <label for="news_library">Library: </label>
135                                         <select id="news_library" name="news_library">
136                                             <option value=""></option>
137                                             <option value="">All libraries</option>
138                                             [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1, ) %]
139                                         </select>
140                                     </li>
141                                     <li>
142                                         <label>
143                                             <input type="checkbox" name="show_expired" id="show_expired" /> Show expired
144                                         </label>
145                                     </li>
146                                 </ol>
147                             </fieldset>
148                         </form>
149                     </div>
150
151                     [% INCLUDE 'tools-menu.inc' %]
152                 </aside>
153             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
154         [% END %]
155     </div> <!-- /.row -->
156 </div> <!-- /.main.container-fluid -->
157
158 [% BLOCK add_form %]
159     [% IF additional_content %]
160         <h1>Modify an additional content</h1>
161     [% ELSE %]
162         <h1>New additional content ([% IF category == 'news' %]News[% ELSE %]HTML customizations[% END %])</h1>
163     [% END %]
164
165     <div id="toolbar" class="btn-toolbar">
166         <div class="btn-group">
167             <button class="btn btn-default" id="submit_form"><i class="fa fa-save"></i> Save</button>
168         </div>
169         [% IF category == 'news' %]
170             <a class="btn btn-default cancel" href="/cgi-bin/koha/tools/additional-contents.pl"><i class="fa fa-remove"></i> Cancel</a>
171         [% ELSE %]
172             <a class="btn btn-default cancel" href="/cgi-bin/koha/tools/additional-contents.pl?category=html_customizations"><i class="fa fa-remove"></i> Cancel</a>
173         [% END %]
174     </div>
175
176     <form id="add_additional_content" method="post" action="/cgi-bin/koha/tools/additional-contents.pl" class="validate">
177         <input type="hidden" name="op" value="add_validate" />
178         <input type="hidden" name="id" value="[% additional_content.idnew | html %]" />
179         <input type="hidden" name="category" value="[% category | html %]" />
180         <fieldset class="rows">
181             <ol>
182                 <li>
183                     [% IF additional_content %]
184                         <span class="label">Code:</span> [% additional_content.code | html %]
185                         <input type="hidden" id="code" name="code" value="[% additional_content.code | html %]" />
186                     [% ELSE %]
187                         <label for="code" class="required">Code:</label>
188                         <input type="text" id="code" name="code" size="20" maxlength="20" value="" required="required"/>
189                         <span class="required">Required</span>
190                     [% END %]
191                 </li>
192                 <li>
193                     <label for="location">Display location:</label>
194                     <select id="location" name="location">
195                         [% PROCESS locations_options location => additional_content.location %]
196                     </select>
197                 </li>
198                 <li>
199                     <label for="branchcode">Library: </label>
200                     <select id="branchcode" name="branchcode">
201                         [% IF additional_content.branchcode == '' %]
202                             <option value="" selected="selected">All libraries</option>
203                         [% ELSE %]
204                             <option value="">All libraries</option>
205                         [% END %]
206                         [% PROCESS options_for_libraries libraries => Branches.all( selected => additional_content.branchcode, unfiltered => 1, ) %]
207                     </select>
208                 </li>
209                 [% UNLESS languages.size %]
210                     <li>
211                         <label for="title" class="required">Title: </label>
212                         <input id="title" size="100" maxlength="250" type="text" name="title" value="[% additional_content.title | html %]" required="required" class="required" /> <span class="required">Required</span>
213                     </li>
214                 [% END %]
215                 <li>
216                     <label for="from">Publication date: </label>
217                     <input id="from" type="text" name="published_on" size="15" value="[% additional_content.published_on | $KohaDates %]" class="flatpickr" data-start_for="to" />
218                     <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
219                 </li>
220                 <li>
221                     <label for="to">Expiration date: </label>
222                     <input id="to" type="text" name="expirationdate" size="15" value="[% additional_content.expirationdate | $KohaDates %]" class="flatpickr" />
223                     <div class="hint">
224                         [% INCLUDE 'date-format.inc' %]
225                         [% IF category == 'news' %]
226                             <br>News will still be accessible by direct URL if expired.
227                         [% END %]
228                     </div>
229                 </li>
230                 <li>
231                     <label for="number">Appear in position: </label>
232                     [% IF ( additional_content.number ) %]
233                         <input id="number" size="3" name="number" type="text" value="[% additional_content.number | html %]" />
234                     [% ELSE %]
235                         <input id="number" size="3" name="number" type="text" />
236                     [% END %]
237                 </li>
238             </ol>
239         </fieldset>
240
241         [% IF languages.size %]
242             <div style="clear:both"></div>
243             <div id="tabs">
244                 <ul>
245                     [% FOR language IN languages %]
246                         [% IF language.lang == 'default' %]
247                             <li><a href="#lang_default">Default</a></li>
248                         [% ELSE %]
249                             <li><a href="#lang_[% language.lang | uri %]">[% language.description | html %]</a></li>
250                         [% END %]
251                     [% END %]
252                 </ul>
253
254                 [% FOR language IN languages %]
255                     <div id="lang_[% language.lang | uri %]" class="lang clearfix" data-lang="[% language.description | html %]">
256                         <fieldset class="rows">
257                             <ol>
258                                 <li style="list-style: none;">
259                                     <label for="title_[% language.lang | html %]">Title: </label>
260                                     <input id="title_[% language.lang| html %]" size="100" maxlength="250" type="text" name="title" value="[% translated_contents.item(language.lang).title | html %]">
261                                 </li>
262                                 <li style="list-style: none;">
263                                     <label for="content_[% language.lang | html %]">Content: </label>
264                                     <textarea name="content" id="content_[% language.lang | html %]" data-lang="[% language.lang | html%]" cols="75" rows="10">[% translated_contents.item(language.lang).content | html %]</textarea>
265                                     <input type="hidden" name="lang" value="[% language.lang | html %]" />
266                                 </li>
267                             </ol>
268                         </fieldset>
269                     </div>
270                 [% END %]
271             </div>
272         [% ELSE %]
273             <div id="lang_default">
274                 <div class="clearfix">
275                     <textarea name="content" id="content_default" data-lang="[% language.lang | html %]"  cols="75" rows="10">[% additional_content.content | html %]</textarea>
276                 </div>
277             </div>
278         [% END %]
279     </form>
280 [% END %]
281
282 [% BLOCK list %]
283
284     <div id="toolbar" class="btn-toolbar">
285         <a class="btn btn-default" id="newentry" href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form&category=[% category | html %]"><i class="fa fa-plus"></i> New entry</a>
286     </div>
287
288     <h2>Additional contents ([% IF category == 'news' %]News[% ELSE %]HTML customizations[% END %])</h2>
289     [% IF category == 'news' %]
290         See <a href="/cgi-bin/koha/tools/additional-contents.pl?category=html_customizations">HTML customizations</a>
291     [% ELSE %]
292         See <a href="/cgi-bin/koha/tools/additional-contents.pl?category=news">News</a>
293     [% END %]
294
295     [% IF additional_contents.count %]
296         <form id="del_form" method="post" action="/cgi-bin/koha/tools/additional-contents.pl">
297             <table id="table_additional_contents">
298                 <thead>
299                     <tr>
300                         <th class="NoSort">&nbsp;</th>
301                         <th>Location</th>
302                         <th>Library</th>
303                         <th>Number</th>
304                         <th>Publication date</th>
305                         <th>Expiration date</th>
306                         <th class="anti-the">Title</th>
307                         <th>Author</th>
308                         <th class="anti-the">News</th>
309                         <th class="NoSort noExport">Actions</th>
310                     </tr>
311                 </thead>
312                 <tbody>
313                     [% FOREACH c IN additional_contents%]
314                         [% IF ( c.is_expired ) %]<tr class="expired">[% ELSE %]<tr>[% END %]
315                         <td>
316                             <input type="checkbox" name="ids" value="[% c.idnew | html %]" />
317                         </td>
318                         <td>
319                             [% IF c.category == 'news' %]
320                                 [% IF c.location == 'staff_and_opac' %]All
321                                 [% ELSIF c.location == 'staff_only' %]Librarian interface
322                                 [% ELSIF c.location == 'opac_only' %]OPAC
323                                 [% ELSIF c.location == 'slip' %]Slip
324                                 [% ELSE %]Unknown ('[% location | html %]')
325                                 [% END %]
326                             [% ELSE %]
327                                 [% c.location | html %]
328                             [% END %]
329                         </td>
330                         <td>
331                             [% IF ( c.branchcode == "" ) -%]
332                             All libraries
333                             [% ELSE %][% c.library.branchname | html %]
334                             [% END %]
335                         </td>
336                         <td>[% c.number | html %]</td>
337                         <td data-order="[% c.published_on | html %]">[% c.published_on | $KohaDates %]</td>
338                         <td data-order="[% c.expirationdate | html %]">[% c.expirationdate | $KohaDates %] [% IF ( c.is_expired ) %](<span class="expired">expired</span>)[% END %]</td>
339                         <td>[% c.title | html %]</td>
340                         <td>[% IF ( c.author) %][% INCLUDE 'patron-title.inc' patron=c.author %][% END %]</td>
341                         <td>
342                             <div class="btn-group">
343                                 <a class="preview_news btn btn-default btn-xs" data-number="[% loop.count | html %]"><i class="fa fa-eye" aria-hidden="true"></i> Preview content</a>
344                             </div>
345                             <div id="contentModal[% loop.count | html %]" class="modal" tabindex="-1" role="dialog" data-number="[% loop.count | html %]">
346                                 <div class="modal-dialog" role="document">
347                                     <div class="modal-content modal-lg">
348                                         <div class="modal-header">
349                                             <h5 class="modal-title">Preview of: "[% c.title | html %]"</h5>
350                                         </div>
351                                     <div class="modal-body">
352                                         [% c.content | $raw %]
353                                     </div>
354                                     <div class="modal-footer">
355                                         <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
356                                     </div>
357                                 </div>
358                             </div>
359                         </td>
360                         <td class="actions">
361                             [% IF ( wysiwyg ) %]
362                                 [% SET editmode = "wysiwyg" %]
363                             [% ELSE %]
364                                 [% SET editmode = "text" %]
365                             [% END %]
366                             <div class="btn-group dropup">
367                                 <a href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form&amp;id=[% c.idnew | uri %]&editmode=[% editmode | uri %]" class="btn btn-default btn-xs"> <i class="fa fa-pencil"></i> Edit</a><button class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
368                                     <span class="caret"></span>
369                                 </button>
370                                 <ul class="dropdown-menu pull-right">
371                                     <li>
372                                         [% IF ( wysiwyg ) %]
373                                             <a href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form&amp;id=[% c.idnew | uri %]&editmode=text"><i class="fa fa-pencil"></i> Edit with text editor</a>
374                                         [% ELSE %]
375                                             <a href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form&amp;id=[% c.idnew | uri %]&editmode=wysiwyg"><i class="fa fa-pencil"></i> Edit with WYSIWYG editor</a>
376                                         [% END %]
377                                     </li>
378                                 </ul>
379                             </div>
380                             <div class="btn-group">
381                                 <a href="#" class="delete_news btn btn-default btn-xs" data-idnew="[% c.idnew | html %]"><i class="fa fa-trash"></i> Delete</a>
382                             </div>
383                         </td>
384                     </tr>
385                     [% END %]
386                 </tbody>
387             </table>
388             <input type="hidden" name="op" value="delete_confirmed" />
389             <input type="hidden" name="category" value="[% category | html %]" />
390             <fieldset class="action"><input type="submit" class="button" value="Delete selected" /></fieldset>
391         </form>
392         <form action="/cgi-bin/koha/tools/additional-contents.pl" method="post" id="delete_single">
393             <input type="hidden" id="del_op" name="op" value="delete_confirmed" />
394             <input type="hidden" id="del_category" name="category" value="[% category | html %]" />
395             <input type="hidden" id="del_ids" name="ids" />
396         </form>
397     [% ELSE %]
398         <div class="dialog message">There are no additional contents.</div>
399     [% END %]
400 [% END %]
401
402 [% BLOCK locations_options %]
403     [% IF category == 'news' %]
404         [% IF location == "staff_and_opac" %]
405             <option value="staff_and_opac" selected="selected">Librarian and OPAC interfaces</option>
406         [% ELSE %]
407             <option value="staff_and_opac">Librarian and OPAC interfaces</option>
408         [% END %]
409
410         [% IF location == "staff_only" %]
411             <option value="staff_only" selected="selected">Librarian interface</option>
412         [% ELSE %]
413             <option value="staff_only">Librarian interface</option>
414         [% END %]
415
416         [% IF location == "opac_only" %]
417             <option value="opac_only" selected="selected">OPAC</option>
418         [% ELSE %]
419             <option value="opac_only">OPAC</option>
420         [% END %]
421
422         [% IF location == "slip" %]
423             <option value="slip" selected="selected">Slip</option>
424         [% ELSE %]
425             <option value="slip">Slip</option>
426         [% END %]
427     [% ELSE %]
428         [% FOREACH l IN [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText' ] %]
429             [% IF l == location %]
430                 <option value="[% l | html %]" selected="selected">[% l | html %]</option>
431             [% ELSE %]
432                 <option value="[% l | html %]">[% l | html %]</option>
433             [% END %]
434         [% END %]
435     [% END %]
436 [% END %]
437
438 [% MACRO jsinclude BLOCK %]
439     [% INCLUDE 'calendar.inc' %]
440     [% Asset.js("js/tools-menu.js") | $raw %]
441     [% Asset.js("lib/hc-sticky.js") | $raw %]
442     [% IF additional_contents.count %]
443         [% INCLUDE 'datatables.inc' %]
444         <script>
445             $('.preview_news').click( function() {
446                 modalNumber = $(this).attr('data-number');
447                 $('.modal[data-number="'+modalNumber+'"]').modal('show');
448             })
449             function Checkbox(){
450                 var form = document.getElementById('del_form');
451                 var inputs = form.getElementsByTagName('input');
452                 var checked = false;
453                 for (var i=0; i<inputs.length; i++) {
454                     if (inputs[i].type == 'checkbox' && inputs[i].name == 'ids') {
455                         checked = inputs[i].checked;
456                         if (checked) return true;
457                     }
458                 }
459             }
460
461             function filterDataTable( table, column, term ){
462                 if( column ){
463                     table.column( column ).search( term ).draw();
464                 } else {
465                     table.search( term ).draw();
466                 }
467                 clearFilter( term );
468             }
469
470             function clearFilter( term ){
471                 if( term == "" ){
472                     $(".dt_button_clear_filter").addClass("disabled");
473                 } else {
474                     $(".dt_button_clear_filter").removeClass("disabled");
475                 }
476             }
477
478             /* Custom table search configuration: If a table row
479                has an "expired" class, hide it UNLESS the
480                show_expired checkbox is checked */
481             $.fn.dataTable.ext.search.push(
482                 function( settings, searchData, index, rowData, counter ) {
483                     var row = $(settings.aoData[index].nTr);
484                     if( row.hasClass("expired") && !$("#show_expired").prop("checked") ){
485                         return false;
486                     } else {
487                         return true;
488                     }
489                 }
490             );
491
492             $(document).ready(function() {
493
494                 var table = $("#table_additional_contents").DataTable($.extend(true, {}, dataTablesDefaults, {
495                     "order": [[ 4, "desc" ]],
496                     "aoColumnDefs": [
497                         { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
498                         { "type": "anti-the", "targets": [ "anti-the" ] }
499                     ],
500                     "sPaginationType": "full_numbers"
501                 }));
502
503                 $("#del_form").on("click", ".delete_news", function(e){
504                     e.preventDefault();
505                     if( confirmDelete( _("Are you sure you want to delete this content? This cannot be undone.") ) ){
506                         $("#del_ids").val( $(this).data("idnew") );
507                         $("#delete_single").submit();
508                     }
509                 });
510
511                 $("#del_form").on("submit",function(){
512                     if ( Checkbox() ) {
513                         return confirmDelete( _("Are you sure you want to delete the selected content?") );
514                     } else {
515                         alert(_("Please select content to delete."));
516                         return false;
517                     }
518                 });
519
520                 $("#show_expired").on("change", function(){
521                     /* redraw the DataTable according to the custom search function */
522                     table.draw();
523                 });
524
525                 table.on( 'search.dt', function () {
526                     var term = table.search();
527                     $("#news_keyword").val( term );
528                 });
529
530                 $("#news_keyword").on("keyup", function(){
531                     var term = $(this).val();
532                     filterDataTable( table, null, term );
533                 });
534
535                 $("#news_display_location").on("change", function(){
536                     var term = $(this).val();
537                     filterDataTable( table, 1, term );
538                 });
539
540                 $("#news_library").on("change", function(){
541                     // Table must be filtered by the <option>'s text, not its value
542                     var opt = $(this).find("option:selected").text();
543                     filterDataTable( table, 2, opt );
544                 });
545
546                 $(".dt_button_clear_filter").on("click", function(){
547                     table.search('').columns().search('').draw();
548                     $("#news-filter select").each(function(){
549                         $(this).val("");
550                     });
551                 });
552             });
553         </script>
554     [% ELSE %]
555         <script>
556             $(document).ready(function() {
557                 $("#tabs").tabs();
558                 $("#add_additional_content").validate({
559                     submitHandler: function(form){
560                         if ( ! $("#title_default").val().length > 0 ) {
561                             alert(__("Please specify a title for 'Default'"));
562                             return false;
563                         }
564
565                         form.submit();
566                     }
567                 });
568
569                 $("#submit_form").on("click",function(){
570                     $("#add_additional_content").submit();
571                 });
572
573                 Sticky = $("#toolbar");
574                 Sticky.hcSticky({
575                     stickTo: ".main",
576                     stickyClass: "floating"
577                 });
578
579             });
580         </script>
581     [% END %]
582     [% UNLESS ( wysiwyg ) %]
583         [% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %]
584         [% Asset.js( "lib/codemirror/xml.min.js" ) | $raw %]
585         [% Asset.js( "lib/codemirror/lint.min.js" ) | $raw %]
586         [% Asset.js( "lib/linters/htmlhint.min.js" ) | $raw %]
587         [% Asset.js( "lib/codemirror/html-lint.min.js" ) | $raw %]
588         <script>
589             $("textarea[name='content']").each( function(index) {
590                 var this_lang = $(this).attr('data-lang');
591                 var editor = CodeMirror.fromTextArea(document.getElementById('content_' + this_lang), {
592                     lineNumbers: true,
593                     lineWrapping: true,
594                     lint: true,
595                     mode: "text/html",
596                     gutters: ["CodeMirror-lint-markers"],
597                     viewportMargin: Infinity,
598                 });
599             });
600         </script>
601     [% ELSE %]
602         [% Asset.js("lib/tiny_mce/tinymce.min.js") | $raw %]
603         [% INCLUDE 'str/tinymce_i18n.inc' %]
604         <script>
605             tinyMCE.init({
606                 verify_html: false,
607                 force_br_newlines : false,
608                 force_p_newlines : false,
609                 forced_root_block : '',
610                 branding : false,
611                 relative_urls : false,
612                 content_css : "[% interface | html %]/[% theme | html %]/css/tinymce.css",
613                 menubar : "file edit view insert format tools table",
614                 mode : "specific_textareas",
615                 plugins : "autoresize table hr link image charmap lists code emoticons",
616                 extended_valid_elements:"style,link[href|rel]",
617                 custom_elements:"style,link,~link",
618                 toolbar : [
619                     "formatselect | bold italic | cut copy paste | alignleft aligncenter alignright | outdent indent | image link unlink anchor cleanup hr",
620                     "table | bullist numlist | undo redo | removeformat | emoticons charmap | forecolor backcolor | code"
621                 ],
622             });
623         </script>
624     [% END # /UNLESS wysiwyg %]
625 [% END %]
626
627 [% INCLUDE 'intranet-bottom.inc' %]