Bug 11319: Template modifications
[koha-equinox.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / marc_modification_templates.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Tools &rsaquo; MARC modification templates</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4
5 <script type="text/javascript">
6 //<![CDATA[
7 $(document).ready(function() {
8     $('#select_template').find("input:submit").hide();
9     $('#select_template').change(function() {
10         $('#select_template').submit();
11     });
12     $("span.match_regex_prefix" ).hide();
13     $("span.match_regex_suffix" ).hide();
14
15     $("#add_action").submit(function(){
16         var action = $("#action").val();
17         if ( action == 'move_field' || action == 'copy_field' ) {
18             if ( $("#from_subfield").val().length != $("#to_subfield").val().length ) {
19                 alert(_("Both subfield values should be filled or empty."));
20                 return false;
21             }
22             if ( $("#to_field").val().length <= 0 ) {
23                 alert(_("The destination should be filled."));
24                 return false;
25             }
26         }
27         if ( action == 'update_field' ) {
28             if ( $("#from_subfield").val().length <= 0 ) {
29                 alert(_("The source subfield should be filled for update."));
30                 return false;
31             }
32         }
33         if ( $("#from_field").val().length <= 0 ) {
34             alert(_("The source field should be filled."));
35             return false;
36         }
37     });
38 });
39 //]]>
40 </script>
41
42 <script>
43
44 function updateWarnings(){
45     if ( $("#conditional_field").is(":visible") ) {
46         if ( $("#conditional_field").val() == $("#from_field").val() && $("#from_field").val().length > 0 ) {
47             $("#warning_multivalued").show();
48         } else {
49             $("#warning_multivalued").hide();
50         }
51     }
52 }
53
54 function onActionChange(selectObj) {
55     // get the index of the selected option
56     var idx = selectObj.selectedIndex;
57
58     // get the value of the selected option
59     var action = selectObj.options[idx].value;
60
61     switch( action ) {
62         case 'delete_field':
63             show('field_number_block');
64             hide('with_value_block');
65             hide('to_field_block');
66             break;
67
68         case 'update_field':
69             hide('field_number_block');
70             show('with_value_block');
71             hide('to_field_block');
72             break;
73
74         case 'move_field':
75             show('field_number_block');
76             hide('with_value_block');
77             show('to_field_block');
78             break;
79
80         case 'copy_field':
81             show('field_number_block');
82             hide('with_value_block');
83             show('to_field_block');
84             break;
85
86     }
87 }
88
89 function onConditionalChange(selectObj) {
90     // get the index of the selected option
91     var idx = selectObj.selectedIndex;
92
93     // get the value of the selected option
94     var action = selectObj.options[idx].value;
95
96     switch( action ) {
97         case '':
98             hide('conditional_block');
99             break;
100
101         case 'if':
102         case 'unless':
103             show('conditional_block');
104             break;
105     }
106 }
107
108 function onConditionalComparisonChange(selectObj) {
109     // get the index of the selected option
110     var idx = selectObj.selectedIndex;
111
112     // get the value of the selected option
113     var action = selectObj.options[idx].value;
114
115     switch( action ) {
116         case 'equals':
117         case 'not_equals':
118             show('conditional_comparison_block');
119             break;
120
121         default:
122             hide('conditional_comparison_block');
123             break;
124     }
125 }
126
127 function onToFieldRegexChange( checkboxObj ) {
128     if ( checkboxObj.checked ) {
129         show('to_field_regex_value_block');
130     } else {
131         hide('to_field_regex_value_block');
132     }
133 }
134
135 function onConditionalRegexChange( checkboxObj ) {
136     if ( checkboxObj.checked ) {
137         $("span.match_regex_prefix" ).show();
138         $("span.match_regex_suffix" ).show();
139     } else {
140         $("span.match_regex_prefix" ).hide();
141         $("span.match_regex_suffix" ).hide();
142     }
143 }
144
145 function show(eltId) {
146     elt = document.getElementById( eltId );
147     elt.style.display='inline';
148 }
149
150 function hide(eltId) {
151     clearFormElements( eltId );
152     elt = document.getElementById( eltId );
153     elt.style.display='none';
154 }
155
156 function clearFormElements(divId) {
157     myBlock = document.getElementById( divId );
158
159     var inputElements = myBlock.getElementsByTagName( "input" );
160     for (var i = 0; i < inputElements.length; i++) {
161         switch( inputElements[i].type ) {
162             case "text":
163                 inputElements[i].value = '';
164                 break;
165             case "checkbox":
166                 inputElements[i].checked = false;
167                 break;
168         }
169     }
170
171     var selectElements = myBlock.getElementsByTagName( "select" );
172     for (var i = 0; i < selectElements.length; i++) {
173         selectElements[i].selectedIndex = 0;
174     }
175
176 }
177
178 function confirmDelete() {
179     var agree = confirm(_("Are you sure you wish to delete this template?"));
180     return agree;
181 }
182
183 var modaction_legend_innerhtml;
184 var action_submit_value;
185
186 function editAction( mmta_id, ordering, action, field_number, from_field, from_subfield, field_value, to_field,
187     to_subfield, to_regex_search, to_regex_replace, to_regex_modifiers, conditional, conditional_field, conditional_subfield,
188     conditional_comparison, conditional_value, conditional_regex, description
189 ) {
190     document.getElementById('mmta_id').value = mmta_id;
191
192     setSelectByValue( 'action', action );
193     document.getElementById('action').onchange();
194
195     setSelectByValue( 'field_number', field_number );
196
197     document.getElementById('from_field').value = from_field;
198     document.getElementById('from_subfield').value = from_subfield;
199     document.getElementById('field_value').value = field_value;
200     document.getElementById('to_field').value = to_field;
201     document.getElementById('to_subfield').value = to_subfield;
202     $("#to_regex_search").val(to_regex_search);
203     $("#to_regex_replace").val(to_regex_replace);
204     $("#to_regex_modifiers").val(to_regex_modifiers);
205
206     document.getElementById('to_field_regex').checked = conditional_regex.length;
207     document.getElementById('to_field_regex').onchange();
208
209     setSelectByValue( 'conditional', conditional );
210     document.getElementById('conditional').onchange();
211
212     document.getElementById('conditional_field').value = conditional_field;
213     document.getElementById('conditional_subfield').value = conditional_subfield;
214
215     setSelectByValue( 'conditional_comparison', conditional_comparison );
216     document.getElementById('conditional_comparison').onchange();
217
218     document.getElementById('conditional_value').value = conditional_value;
219
220     document.getElementById('conditional_regex').checked = parseInt( conditional_regex );
221
222     document.getElementById('description').value = description;
223
224     window.modaction_legend_innerhtml = document.getElementById('modaction_legend').innerHTML;
225     document.getElementById('modaction_legend').innerHTML = _("Edit action %s").format(ordering);
226
227     window.action_submit_value = document.getElementById('action_submit').value;
228     document.getElementById('action_submit').value = _("Update action");
229
230     show('cancel_edit');
231 }
232
233 function cancelEditAction() {
234     document.getElementById('mmta_id').value = '';
235
236     setSelectByValue( 'action', 'delete_field' );
237     document.getElementById('action').onchange();
238
239     document.getElementById('from_field').value = '';
240     document.getElementById('from_subfield').value = '';
241     document.getElementById('field_value').value = '';
242     document.getElementById('to_field').value = '';
243     document.getElementById('to_subfield').value = '';
244     $("#to_regex_search").val("");
245     $("#to_regex_replace").val("");
246     $("#to_regex_modifiers").val("");
247
248     document.getElementById('to_field_regex').checked = false;
249     document.getElementById('to_field_regex').onchange();
250
251     setSelectByValue( 'conditional', '' );
252     document.getElementById('conditional').onchange();
253
254     document.getElementById('conditional_field').value = '';
255     document.getElementById('conditional_subfield').value = '';
256
257     setSelectByValue( 'conditional_comparison', '' );
258     document.getElementById('conditional_comparison').onchange();
259
260     document.getElementById('conditional_value').value = '';
261
262     document.getElementById('conditional_regex').checked = false;
263
264     document.getElementById('modaction_legend').innerHTML = window.modaction_legend_innerhtml;
265     document.getElementById('action_submit').value = window.action_submit_value;
266
267     hide('cancel_edit');
268 }
269
270 function setSelectByValue( selectId, value ) {
271     s = document.getElementById( selectId );
272
273     for ( i = 0; i < s.options.length; i++ ) {
274         if ( s.options[i].value == value ) {
275             s.selectedIndex = i;
276         }
277     }
278 }
279
280 </script>
281
282 </head>
283
284 <body>
285 [% INCLUDE 'header.inc' %]
286 [% INCLUDE 'cat-search.inc' %]
287
288 <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; MARC modification templates</div>
289
290 <div id="doc3" class="yui-t2">
291   <div id="bd">
292     <div id="yui-main">
293         <div class="yui-b">
294             <h2>MARC modification templates</h2>
295             
296             [% IF error %]
297                 [% IF error == 'no_from_field' %]
298                     <div class="dialog message">Error: no field value specified.</div>
299                 [% END %]
300             [% END %]
301
302             [% IF ( TemplatesLoop ) %]
303
304                 <form method="get" action="/cgi-bin/koha/tools/marc_modification_templates.pl" id="select_template">
305                     <label for="select_template">Template: </label>
306                     <select name="template_id" id="select_template" style="width:20em;">
307                         [% FOREACH TemplatesLoo IN TemplatesLoop %]
308                                                     [% IF ( TemplatesLoo.selected ) %]
309                             <option value="[% TemplatesLoo.template_id %]" selected="selected"> [% TemplatesLoo.name %]</option>
310                                                     [% ELSE %]
311                             <option value="[% TemplatesLoo.template_id %]"> [% TemplatesLoo.name %]</option>
312                                                     [% END %]
313                         [% END %]
314                     </select>
315                     <input type="hidden" name="op" value="select_template">
316                     <input type="submit" value="Go" />
317                 </form>
318
319                 <form method="get" action="/cgi-bin/koha/tools/marc_modification_templates.pl" id="delete_template">
320                     <input type="hidden" name="template_id" value="[% template_id %]" />
321                     <input type="hidden" name="op" value="delete_template">
322                     <input type="submit" value="Delete template" onClick="return confirmDelete()" />
323                 </form>
324
325
326                 [% IF ( ActionsLoop ) %]
327                     <table>
328                         <caption>Actions for this template</caption>
329
330                         <tr>
331                             <th>Change order</th>
332                             <th>Order</th>
333                             <th>Action</th>
334                             <th>Description</th>
335                             <th>&nbsp</th>
336                             <th>&nbsp</th>
337                         </tr>
338
339                         [% FOREACH ActionsLoo IN ActionsLoop %]
340                             <tr>
341                                 <td style="white-space:nowrap;">
342                                     <a title="Move action up" href="marc_modification_templates.pl?op=move_action&amp;where=up&amp;template_id=[% ActionsLoo.template_id %]&amp;mmta_id=[% ActionsLoo.mmta_id %]">
343                                     <img src="[% interface %]/[% theme %]/img/go-up.png" border="0" alt="Go up" />
344                                         </a>
345
346                                 <a title="Move action to top" href="marc_modification_templates.pl?op=move_action&amp;where=top&amp;template_id=[% ActionsLoo.template_id %]&amp;mmta_id=[% ActionsLoo.mmta_id %]">
347                                     <img src="[% interface %]/[% theme %]/img/go-top.png" border="0" alt="Go top" />
348                                         </a>
349
350                                         <a title="Move action to bottom" href="marc_modification_templates.pl?op=move_action&amp;where=bottom&amp;template_id=[% ActionsLoo.template_id %]&amp;mmta_id=[% ActionsLoo.mmta_id %]">
351                                     <img src="[% interface %]/[% theme %]/img/go-bottom.png" border="0" alt="Go bottom" />
352                                         </a>
353
354                                         <a title="Move action down" href="marc_modification_templates.pl?op=move_action&amp;where=down&amp;template_id=[% ActionsLoo.template_id %]&amp;mmta_id=[% ActionsLoo.mmta_id %]">
355                                     <img src="[% interface %]/[% theme %]/img/go-down.png" border="0" alt="Go down" />
356                                         </a>
357                                 </td>
358
359                                 <td>[% ActionsLoo.ordering %]</td>
360                                 <td>
361                                     [% IF ( ActionsLoo.action_delete_field ) %] Delete [% END %]
362                                     [% IF ( ActionsLoo.action_update_field ) %] Update [% END %]
363                                     [% IF ( ActionsLoo.action_move_field ) %] Move [% END %]
364                                     [% IF ( ActionsLoo.action_copy_field ) %] Copy [% END %]
365
366                                     [% UNLESS ( ActionsLoo.action_update_field ) %]
367                                         [% IF ( ActionsLoo.field_number ) %]
368                                             1st
369                                         [% END %]
370                                     [% END %]
371
372                                     field
373
374                                     [% ActionsLoo.from_field %][% IF ( ActionsLoo.from_subfield ) %]$[% ActionsLoo.from_subfield %][% END %]
375
376                                     [% IF ( ActionsLoo.field_value ) %]
377                                         with value <i>[% ActionsLoo.field_value %]</i>
378                                     [% END %]
379
380                                     [% IF ( ActionsLoo.to_field ) %]
381                                         to [% ActionsLoo.to_field %][% IF ( ActionsLoo.to_subfield ) %]$[% ActionsLoo.to_subfield %][% END %]
382
383                                         [% IF ( ActionsLoo.to_regex_search ) %]
384                                              using RegEx s<strong>/[% ActionsLoo.to_regex_search %]/[% ActionsLoo.to_regex_replace %]/[% ActionsLoo.to_regex_modifiers %]</strong>
385                                         [% END %]
386                                     [% END %]
387
388                                     [% IF ( ActionsLoo.conditional ) %]
389                                         [% IF ( ActionsLoo.conditional_if ) %] if [% END %]
390                                         [% IF ( ActionsLoo.conditional_unless ) %] unless [% END %]
391
392                                         [% ActionsLoo.conditional_field %][% IF ( ActionsLoo.conditional_subfield ) %]$[% ActionsLoo.conditional_subfield %][% END %]
393
394                                         [% IF ( ActionsLoo.conditional_comparison_exists ) %] exists [% END %]
395                                         [% IF ( ActionsLoo.conditional_comparison_not_exists ) %] does not exist [% END %]
396                                         [% IF ( ActionsLoo.conditional_comparison_equals ) %] matches [% END %]
397                                         [% IF ( ActionsLoo.conditional_comparison_not_equals ) %] does not match [% END %]
398
399                                         [% IF ( ActionsLoo.conditional_regex ) %] RegEx m/[% END %]
400                                         <strong>[% ActionsLoo.conditional_value %]</strong>
401                                         [% IF ( ActionsLoo.conditional_regex ) %]/[% END %]
402                                     [% END %]
403                                 </td>
404                                 <td>[% ActionsLoo.description %]</td>
405                                 <td><a href="#modaction" onclick='editAction(
406                                                     "[% ActionsLoo.mmta_id |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]",
407                                                     "[% ActionsLoo.ordering |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]",
408                                                     "[% ActionsLoo.action |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]",
409                                                     "[% ActionsLoo.field_number |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]",
410                                                     "[% ActionsLoo.from_field |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]",
411                                                     "[% ActionsLoo.from_subfield |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]",
412                                                     "[% ActionsLoo.field_value |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]",
413                                                     "[% ActionsLoo.to_field |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]",
414                                                     "[% ActionsLoo.to_subfield |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]",
415                                                     "[% ActionsLoo.to_regex_search |replace('\\\\', '\\\\') |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]",
416                                                     "[% ActionsLoo.to_regex_replace |replace('\\\\', '\\\\') |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]",
417                                                     "[% ActionsLoo.to_regex_modifiers |replace('\\\\', '\\\\') |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]",
418                                                     "[% ActionsLoo.conditional |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]",
419                                                     "[% ActionsLoo.conditional_field |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]",
420                                                     "[% ActionsLoo.conditional_subfield |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]",
421                                                     "[% ActionsLoo.conditional_comparison |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]",
422                                                     "[% ActionsLoo.conditional_value |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]",
423                                                     "[% ActionsLoo.conditional_regex |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]",
424                                                     "[% ActionsLoo.description |replace('\\\\', '\\\\') |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]"
425                                                 )'>Edit</a></td>
426                                 <td><a href="marc_modification_templates.pl?template_id=[% ActionsLoo.template_id %]&op=delete_action&mmta_id=[% ActionsLoo.mmta_id %]">Delete</a></td>
427                             </tr>
428                         [% END %]
429                     </table>
430                 [% ELSE %]
431                     <div class="dialog message"><p>There are no defined actions for this template.</p></div>
432                 [% END %]
433
434                 <form method="post" action="/cgi-bin/koha/tools/marc_modification_templates.pl" id="add_action" >
435                     <a name="modaction"></a>
436                     <fieldset>
437                         <legend id="modaction_legend">Add a new action</legend>
438                         <div id="warning_multivalued" style="color:red; display:none;">You have chosen a condition on the same field as the original field. If your records contain multivalued fields it is highly recommended not to do that.</div>
439
440                         <select name="action" id="action" onchange="onActionChange(this);">
441                             <option value="delete_field">Delete</option>
442                             <option value="update_field">Add/Update</option>
443                             <option value="move_field">Move</option>
444                             <option value="copy_field">Copy</option>
445                         </select>
446
447                         <span id="field_number_block">
448                             <select name="field_number" id="field_number">
449                                 <option value="0">All</option>
450                                 <option value="1">1st</option>
451                             </select>
452                         </span>
453
454                         field(s) <input type="text" name="from_field" id="from_field" size="3" maxlength="3" /> <input type="text" name="from_subfield" id="from_subfield" size="1" maxlength="1" title="let blank for the entire field" />
455
456                         <span name="with_value_block" id="with_value_block" style="display:none;">
457                             with value <input type="text" name="field_value" id="field_value" />
458                         </span>
459
460                         <span name="to_field_block" id="to_field_block" style="display:none;">
461                             to field <input type="text" name="to_field" id="to_field" size="3" maxlength="3" /> <input type="text" name="to_subfield" id="to_subfield" size="1" maxlength="1" title="let blank for the entire field" />
462
463                             <span name="to_field_regex_block" id="to_field_regex_block">
464                                 <sup>
465                                     <label for="to_field_regex">RegEx</label>
466                                     <input type="checkbox" name="to_field_regex" id="to_field_regex" onchange="onToFieldRegexChange(this);" />
467
468                                     <span name="to_field_regex_value_block" id="to_field_regex_value_block" style="display:none;">
469                                         s/<input type="text" name="to_regex_search" id="to_regex_search" placeholder="regex pattern" />/<input type="text" name="to_regex_replace" id="to_regex_replace" placeholder="regex replacement" />/<input type="text" name="to_regex_modifiers" id="to_regex_modifiers" placeholder="ig" size="3" />
470                                     </span>
471                                 </sup>
472                             </span>
473                         </span>
474
475                         <p/>
476
477                         <select name="conditional" id="conditional" onchange="onConditionalChange(this);">
478                             <option value="" selected="selected" />
479                             <option value="if">if</option>
480                             <option value="unless">unless</option>
481                         </select>
482
483                         <span name="conditional_block" id="conditional_block" style="display:none;">
484                             field <input type="text" name="conditional_field" id="conditional_field" size="3" maxlength="3" /> <input type="text" name="conditional_subfield" id="conditional_subfield" size="1" maxlength="1" />
485
486                             <select name="conditional_comparison" id="conditional_comparison" onchange="onConditionalComparisonChange(this);">
487                                 <option value="" />
488                                 <option value="exists">exists</option>
489                                 <option value="not_exists">doesn't exist</option>
490                                 <option value="equals">matches</option>
491                                 <option value="not_equals">doesn't match</option>
492                             </select>
493
494                             <span name="conditional_comparison_block" id="conditional_comparison_block" style="display:none;">
495
496                                 <span class="match_regex_prefix">m/</span><input type="text" id="conditional_value" name="conditional_value" /><span class="match_regex_suffix">/</span>
497
498                                 <sup>
499                                     <label for="conditional_regex">RegEx</label>
500                                     <input type="checkbox" name="conditional_regex" id="conditional_regex" onchange="onConditionalRegexChange(this);" />
501                                 </sup>
502
503                             </span>
504                         </span>
505
506                         <input type="hidden" name="template_id" value="[% template_id %]" />
507                         <input type="hidden" name="mmta_id" id="mmta_id" />
508                         <input type="hidden" name="op" value="add_action" />
509
510                         <br/><br/>
511                         <label for="description">Description:</label>
512                         <input type="text" name="description" id="description" size="60" />
513
514                         <br/><br/>
515                         <input id="action_submit" type="submit" value="Add action" /> <a href="#modaction" id="cancel_edit" onclick="cancelEditAction();" style="display:none;">Cancel</a>
516
517                     </fieldset>
518                 </form>
519
520             [% ELSE %]
521                 <div class="dialog message"><p>There are no defined templates. Please create a template first.</p></div>
522             [% END %]
523
524             <form method="post" action="/cgi-bin/koha/tools/marc_modification_templates.pl" id="add_template" class="validated">
525                 <fieldset>
526                     <legend>Create a new template</legend>
527
528                     <label for="template_name" class="required">Name: </label>
529                     <input name="template_name" id="template_name" type="text" size="30" required="required" class="required" />
530                     <span class="required">Required</span>
531
532                     <input type="hidden" name="op" value="create_template" />
533                     <input type="submit" value="Create template" />
534
535                     [% IF ( template_id ) %]
536                         <input type="hidden" name="template_id" value="[% template_id %]" />
537                         <input type="checkbox" name="duplicate_current_template" id="duplicate_current_template" />
538                         <label for="duplicate_current_template">Duplicate current template</label>
539                     [% END %]
540                 </fieldset>
541             </form>
542         </div>
543     </div>
544
545     <div class="yui-b">
546         [% INCLUDE 'tools-menu.inc' %]
547     </div>
548   </div>
549 </div>
550 [% INCLUDE 'intranet-bottom.inc' %]