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