source: branches/2.1/plugins/LocalFilesEditor/admin.tpl @ 23207

Last change on this file since 23207 was 8224, checked in by patdenice, 14 years ago

bug 1338: notice fixed in LocalFiles Editor when debug_template is activated.

  • Property svn:eol-style set to LF
File size: 3.7 KB
Line 
1{html_head}<link rel="stylesheet" type="text/css" href="{$LOCALEDIT_PATH}locfiledit.css">{/html_head}
2{known_script id="editarea" src=$LOCALEDIT_PATH|@cat:"editarea/edit_area_full.js"}
3<script type="text/javascript">
4var editarea = "{$LOAD_EDITAREA}";
5
6function loadEditarea() {ldelim}
7  editAreaLoader.init({ldelim}
8    id: "text"
9    {foreach from=$EDITAREA_OPTIONS key=option item=value}
10    , {$option}: {$value|editarea_quote}
11    {/foreach}
12  });
13  jQuery("#showedit").hide();
14  jQuery("#hideedit").show();
15  jQuery.post("plugins/LocalFilesEditor/update_config.php", {ldelim} editarea: "on"});
16}
17
18function unloadEditarea() {ldelim}
19  editAreaLoader.delete_instance("text");
20  jQuery("#hideedit").hide();
21  jQuery("#showedit").show();
22  jQuery.post("plugins/LocalFilesEditor/update_config.php", {ldelim} editarea: "off"});
23}
24</script>
25
26<div class="titrePage">
27  <h2>LocalFiles Editor</h2>
28</div>
29
30<form method="post" class="properties" action="{$F_ACTION}" ENCTYPE="multipart/form-data" name="form">
31
32<div id="LocalFilesEditor">
33
34<input type="hidden" value="{$zone_edit.EDITED_FILE}" name="edited_file"/>
35
36{if isset ($create_tpl)}
37  <table>
38    <tr>
39      <td style="text-align: right;">{'locfiledit_new_filename'|@translate}</td>
40      <td style="text-align: left;"><input type="text" size="55" maxlength="50" value="{$create_tpl.NEW_FILE_NAME}" name="tpl_name"/></td>
41    </tr>
42    <tr>
43      <td style="text-align: right;">{'locfiledit_parent_directory'|@translate}</td>
44      <td style="text-align: left;">{html_options name=tpl_parent options=$create_tpl.PARENT_OPTIONS selected=$create_tpl.PARENT_SELECTED}</td>
45    </tr>
46    <tr>
47      <td style="text-align: right;">{'locfiledit_model'|@translate}</td>
48      <td style="text-align: left;">{html_options name=tpl_model options=$create_tpl.MODEL_OPTIONS selected=$create_tpl.MODEL_SELECTED}</td>
49    </tr>
50  </table>
51<br><br>
52<input class="submit" type="submit" value="{'Submit'|@translate}" name="create_tpl" />
53{/if}
54
55{if isset ($css_lang_tpl)}
56{html_options name=file_to_edit options=$css_lang_tpl.OPTIONS selected=$css_lang_tpl.SELECTED}
57<input class="submit" type="submit" value="{'locfiledit_edit'|@translate}" name="edit" />
58<br><br>
59  {if isset ($css_lang_tpl.NEW_FILE_URL)}
60  <span class="{$css_lang_tpl.NEW_FILE_CLASS}">
61  <a href="{$css_lang_tpl.NEW_FILE_URL}">{'locfiledit_new_tpl'|@translate}</a>
62  </span>
63  {/if}
64{/if}
65
66{if !empty($show_default)}
67{foreach from=$show_default item=file name=default_loop}
68<span class="top_right">
69<a href="{$file.SHOW_DEFAULT}" onclick="window.open( this.href, 'local_file', 'location=no,toolbar=no,menubar=no,status=no,resizable=yes,scrollbars=yes,width=800,height=600' ); return false;">{'locfiledit_show_default'|@translate} "{$file.FILE}"</a>
70</span>
71{if !($smarty.foreach.default_loop.last)}<br>{/if}
72{/foreach}
73{/if}
74
75{if isset ($zone_edit)}
76<b>{$zone_edit.FILE_NAME}</b>
77
78<textarea rows="30" cols="90" name="text" id="text">{$zone_edit.CONTENT_FILE}</textarea>
79<div id="editarea_buttons">
80<a href="javascript:loadEditarea();" id="showedit">[{'locfiledit_enable_editarea'|@translate}]</a>
81<a href="javascript:unloadEditarea();" id="hideedit">[{'locfiledit_disable_editarea'|@translate}]</a>
82</div>
83
84<br>
85
86<input class="submit" type="submit" value="{'locfiledit_save_file'|@translate}" name="submit" {$TAG_INPUT_ENABLED}/>
87{if isset ($restore)}
88<input class="submit" type="submit" value="{'locfiledit_restore'|@translate}" name="restore" onclick="return confirm('{'locfiledit_restore_confirm'|@translate|escape:'javascript'}');" {$TAG_INPUT_ENABLED}/>
89{/if}
90
91{if isset ($restore_infos)}
92<br><br>
93{'locfiledit_save_bak'|@translate}
94{/if}
95
96{/if}
97</div>
98</form>
99
100<script type="text/javascript">
101jQuery("#editarea_buttons").show();
102if ((editarea == "on") && (document.getElementById("text") != null)) loadEditarea();
103</script>
Note: See TracBrowser for help on using the repository browser.