1 | {combine_script id="codemirror" path="plugins/LocalFilesEditor/codemirror/lib/codemirror.js"} |
---|
2 | {combine_script id="codemirror.xml" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/xml/xml.js"} |
---|
3 | {combine_script id="codemirror.javascript" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/javascript/javascript.js"} |
---|
4 | {combine_script id="codemirror.css" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/css/css.js"} |
---|
5 | {combine_script id="codemirror.clike" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/clike/clike.js"} |
---|
6 | {combine_script id="codemirror.htmlmixed" require="codemirror.xml,codemirror.javascript,codemirror.css" path="plugins/LocalFilesEditor/codemirror/mode/htmlmixed/htmlmixed.js"} |
---|
7 | {combine_script id="codemirror.php" require="codemirror.xml,codemirror.javascript,codemirror.css,codemirror.clike" path="plugins/LocalFilesEditor/codemirror/mode/php/php.js"} |
---|
8 | |
---|
9 | {combine_css path="plugins/LocalFilesEditor/codemirror/lib/codemirror.css"} |
---|
10 | {combine_css path="plugins/LocalFilesEditor/codemirror/mode/xml/xml.css"} |
---|
11 | {combine_css path="plugins/LocalFilesEditor/codemirror/mode/javascript/javascript.css"} |
---|
12 | {combine_css path="plugins/LocalFilesEditor/codemirror/mode/css/css.css"} |
---|
13 | {combine_css path="plugins/LocalFilesEditor/codemirror/mode/clike/clike.css"} |
---|
14 | {combine_css path="plugins/LocalFilesEditor/template/locfiledit.css"} |
---|
15 | |
---|
16 | {footer_script} |
---|
17 | if (document.getElementById("text") != null) |
---|
18 | var editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim} |
---|
19 | matchBrackets: true, |
---|
20 | mode: "{$CODEMIRROR_MODE}", |
---|
21 | tabMode: "shift" |
---|
22 | }); |
---|
23 | {/footer_script} |
---|
24 | |
---|
25 | <div class="titrePage"> |
---|
26 | <h2>LocalFiles Editor</h2> |
---|
27 | </div> |
---|
28 | |
---|
29 | <form method="post" class="properties" action="{$F_ACTION}" ENCTYPE="multipart/form-data" name="form"> |
---|
30 | <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}"> |
---|
31 | |
---|
32 | <div id="LocalFilesEditor"> |
---|
33 | |
---|
34 | {if isset($theme)} |
---|
35 | <input type="hidden" value="{$theme}" name="theme"> |
---|
36 | {/if} |
---|
37 | |
---|
38 | {if isset($language)} |
---|
39 | <input type="hidden" value="{$language}" name="language"> |
---|
40 | {/if} |
---|
41 | |
---|
42 | {if isset($template)} |
---|
43 | <input type="hidden" value="{$template}" name="template"> |
---|
44 | {/if} |
---|
45 | |
---|
46 | |
---|
47 | {if isset ($create_tpl)} |
---|
48 | <table> |
---|
49 | <tr> |
---|
50 | <td style="text-align: right;">{'locfiledit_new_filename'|@translate}</td> |
---|
51 | <td style="text-align: left;"><input type="text" size="55" maxlength="50" value="{$create_tpl.NEW_FILE_NAME}" name="tpl_name"/></td> |
---|
52 | </tr> |
---|
53 | <tr> |
---|
54 | <td style="text-align: right;">{'locfiledit_parent_directory'|@translate}</td> |
---|
55 | <td style="text-align: left;">{html_options name=tpl_parent options=$create_tpl.PARENT_OPTIONS selected=$create_tpl.PARENT_SELECTED}</td> |
---|
56 | </tr> |
---|
57 | <tr> |
---|
58 | <td style="text-align: right;">{'locfiledit_model'|@translate}</td> |
---|
59 | <td style="text-align: left;">{html_options name=tpl_model options=$create_tpl.MODEL_OPTIONS selected=$create_tpl.MODEL_SELECTED}</td> |
---|
60 | </tr> |
---|
61 | </table> |
---|
62 | <br><br> |
---|
63 | <input class="submit" type="submit" value="{'Submit'|@translate}" name="create_tpl" /> |
---|
64 | {/if} |
---|
65 | |
---|
66 | {if isset ($css_lang_tpl)} |
---|
67 | <select name="{$css_lang_tpl.SELECT_NAME}"> |
---|
68 | {html_options options=$css_lang_tpl.OPTIONS selected=$css_lang_tpl.SELECTED} |
---|
69 | </select> |
---|
70 | |
---|
71 | <input class="submit" type="submit" value="{'locfiledit_edit'|@translate}" name="edit" /> |
---|
72 | <br><br> |
---|
73 | {/if} |
---|
74 | |
---|
75 | {if isset ($css_lang_tpl.NEW_FILE_URL)} |
---|
76 | <span class="{$css_lang_tpl.NEW_FILE_CLASS}"> |
---|
77 | <a href="{$css_lang_tpl.NEW_FILE_URL}">{'locfiledit_new_tpl'|@translate}</a> |
---|
78 | </span> |
---|
79 | {/if} |
---|
80 | |
---|
81 | {if isset ($zone_edit)} |
---|
82 | <div id="title_bar"> |
---|
83 | {/if} |
---|
84 | |
---|
85 | {if !empty($show_default)} |
---|
86 | {foreach from=$show_default item=file name=default_loop} |
---|
87 | <span class="default_file"> |
---|
88 | <a href="{$file.URL}" onclick="window.open( this.href, 'local_file', 'location=no,toolbar=no,menubar=no,status=no,resizable=yes,scrollbars=yes,width=800,height=700' ); return false;">{'locfiledit_show_default'|@translate} "{$file.FILE}"</a> |
---|
89 | </span> |
---|
90 | {if !($smarty.foreach.default_loop.last)}<br>{/if} |
---|
91 | {/foreach} |
---|
92 | {/if} |
---|
93 | |
---|
94 | {if isset ($zone_edit)} |
---|
95 | <span class="file_name">{$zone_edit.FILE_NAME}</span> |
---|
96 | </div> {* title_bar *} |
---|
97 | |
---|
98 | <textarea rows="30" cols="90" name="text" id="text">{$zone_edit.CONTENT_FILE}</textarea> |
---|
99 | <br> |
---|
100 | <input class="submit" type="submit" value="{'locfiledit_save_file'|@translate}" name="submit"/> |
---|
101 | |
---|
102 | {if isset ($restore)} |
---|
103 | <input class="submit" type="submit" value="{'locfiledit_restore'|@translate}" name="restore" onclick="return confirm('{'locfiledit_restore_confirm'|@translate|escape:'javascript'}');"/> |
---|
104 | {/if} |
---|
105 | |
---|
106 | {if isset ($restore_infos)} |
---|
107 | <br><br> |
---|
108 | {'locfiledit_save_bak'|@translate} |
---|
109 | {/if} |
---|
110 | |
---|
111 | {/if} {* zone_edit *} |
---|
112 | </div> |
---|
113 | </form> |
---|