1<!-- edit_template.tt2 -->
2
3<h2>[%|loc%]Template edition system[%END%]</h2>
4<br />
5<p>
6    <ul>
7        <li>
8            [%|loc%]Template name: [%END%]<strong> [% template_name %] </strong>
9        </li>
10        <li>
11            [%|loc%]Type: [%END%]
12            <strong>
13                [% SWITCH webormail -%]
14                    [% CASE 'web' %][%|loc%]web[%END -%]
15                    [% CASE 'mail' %][%|loc%]mail[%END -%]
16                    [% CASE %][% webormail -%]
17                [% END %]
18            </strong>
19        </li>
20        <li>
21            [%|loc%]Path: [%END%]<strong> [% template_path %] </strong>
22        </li>
23        <li>
24            [%|loc%]Scope: [%END%]
25            [%- SWITCH scope -%]
26                [% CASE 'site' %]
27                    <strong> [%|loc%]site[%END%] </strong>
28                    [%|loc%](this template is the default used by all robots unless redefined for a specific robot)[%END%]
29                [% CASE 'robot' %]
30                    <strong> [%|loc%]robot[%END%] </strong>
31                    [%|loc(robot)%](this template is the default for all lists of robot %1 unless it is redefined for a specific list)[%END%]
32                [% CASE 'list' %]
33                    <strong> [%|loc%]list[%END -%] </strong>
34                    [%|loc(list,robot)%](this template is defined for list %1@%2)[%END%]
35                [% CASE %]
36                    <strong> [% scope %] </strong>
37            [% END %]
38        </li>
39        <li>
40            [%|loc%]Language: [%END%]
41            [%- IF tpl_lang == 'default' -%]
42                <strong> [%|loc%]default[%END%] </strong>
43                [%|loc%](This template is the default for all languages unless it is redefined for a specific language)[%END%]
44            [%- ELSE -%]
45                <strong class="neutral" lang="[%tpl_lang_lang%]" xml:lang="[%tpl_lang_lang%]">
46                    [%~ tpl_lang | optdesc('lang',1) ~%]
47                </strong>
48            [%- END %]
49        </li>
50    </ul>
51</p>
52<br />
53<form action="[% 'edit_template' | url_rel %]" method="post">
54    <fieldset>
55        <textarea wrap="off" name="content" cols="90" rows="[% rows %]">
56            [%~ template_content ~%]
57        </textarea>
58        <br /><br />
59        <input type="hidden" name="webormail"     value="[% webormail %]" />
60        <input type="hidden" name="template_name" value="[% template_name %]" />
61        <input type="hidden" name="action"        value="edit_template" />
62        <input type="hidden" name="template_path" value="[% template_path %]" />
63        <input type="hidden" name="tpl_lang"      value="[% tpl_lang %]" />
64        [% IF list %]
65                <input type="hidden" name="list" value="[% list %]" />
66        [% END %]
67
68        <input type="hidden" name="scope" value="[% scope %]" />
69        <input type="submit" class="MainMenuLinks" name="action_edit_template" value="[%|loc%]save[%END%]" />
70
71        [% IF saved %]
72            [%|loc%]Template saved[%END%] ([% time %]) <br /><br />
73        [% END %]
74    </fieldset>
75</form>
76<!-- end edit_template.tt2 -->
77