[10307] | 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"} |
---|
[10348] | 14 | {combine_css path="plugins/LocalFilesEditor/template/locfiledit.css"} |
---|
[10307] | 15 | |
---|
[9173] | 16 | {footer_script} |
---|
[10312] | 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 | }); |
---|
[9173] | 23 | {/footer_script} |
---|
| 24 | |
---|
[2235] | 25 | <div class="titrePage"> |
---|
| 26 | <h2>LocalFiles Editor</h2> |
---|
| 27 | </div> |
---|
| 28 | |
---|
[2588] | 29 | <form method="post" class="properties" action="{$F_ACTION}" ENCTYPE="multipart/form-data" name="form"> |
---|
[2235] | 30 | |
---|
[2588] | 31 | <div id="LocalFilesEditor"> |
---|
| 32 | |
---|
| 33 | <input type="hidden" value="{$zone_edit.EDITED_FILE}" name="edited_file"/> |
---|
| 34 | |
---|
| 35 | {if isset ($create_tpl)} |
---|
| 36 | <table> |
---|
| 37 | <tr> |
---|
| 38 | <td style="text-align: right;">{'locfiledit_new_filename'|@translate}</td> |
---|
| 39 | <td style="text-align: left;"><input type="text" size="55" maxlength="50" value="{$create_tpl.NEW_FILE_NAME}" name="tpl_name"/></td> |
---|
| 40 | </tr> |
---|
| 41 | <tr> |
---|
| 42 | <td style="text-align: right;">{'locfiledit_parent_directory'|@translate}</td> |
---|
| 43 | <td style="text-align: left;">{html_options name=tpl_parent options=$create_tpl.PARENT_OPTIONS selected=$create_tpl.PARENT_SELECTED}</td> |
---|
| 44 | </tr> |
---|
| 45 | <tr> |
---|
| 46 | <td style="text-align: right;">{'locfiledit_model'|@translate}</td> |
---|
| 47 | <td style="text-align: left;">{html_options name=tpl_model options=$create_tpl.MODEL_OPTIONS selected=$create_tpl.MODEL_SELECTED}</td> |
---|
| 48 | </tr> |
---|
| 49 | </table> |
---|
| 50 | <br><br> |
---|
| 51 | <input class="submit" type="submit" value="{'Submit'|@translate}" name="create_tpl" /> |
---|
| 52 | {/if} |
---|
| 53 | |
---|
[2235] | 54 | {if isset ($css_lang_tpl)} |
---|
| 55 | {html_options name=file_to_edit options=$css_lang_tpl.OPTIONS selected=$css_lang_tpl.SELECTED} |
---|
| 56 | <input class="submit" type="submit" value="{'locfiledit_edit'|@translate}" name="edit" /> |
---|
[2588] | 57 | <br><br> |
---|
| 58 | {if isset ($css_lang_tpl.NEW_FILE_URL)} |
---|
| 59 | <span class="{$css_lang_tpl.NEW_FILE_CLASS}"> |
---|
| 60 | <a href="{$css_lang_tpl.NEW_FILE_URL}">{'locfiledit_new_tpl'|@translate}</a> |
---|
| 61 | </span> |
---|
| 62 | {/if} |
---|
[2235] | 63 | {/if} |
---|
| 64 | |
---|
[10348] | 65 | {if isset ($zone_edit)} |
---|
| 66 | <div id="title_bar"> |
---|
| 67 | {/if} |
---|
| 68 | |
---|
[8225] | 69 | {if !empty($show_default)} |
---|
[2588] | 70 | {foreach from=$show_default item=file name=default_loop} |
---|
[10348] | 71 | <span class="default_file"> |
---|
| 72 | <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> |
---|
[2588] | 73 | </span> |
---|
| 74 | {if !($smarty.foreach.default_loop.last)}<br>{/if} |
---|
[2235] | 75 | {/foreach} |
---|
[8225] | 76 | {/if} |
---|
[2235] | 77 | |
---|
| 78 | {if isset ($zone_edit)} |
---|
[10348] | 79 | <span class="file_name">{$zone_edit.FILE_NAME}</span> |
---|
| 80 | </div> {* title_bar *} |
---|
[2588] | 81 | |
---|
| 82 | <textarea rows="30" cols="90" name="text" id="text">{$zone_edit.CONTENT_FILE}</textarea> |
---|
[2235] | 83 | <br> |
---|
[10348] | 84 | <input class="submit" type="submit" value="{'locfiledit_save_file'|@translate}" name="submit"/> |
---|
[2588] | 85 | |
---|
[2235] | 86 | {if isset ($restore)} |
---|
[8128] | 87 | <input class="submit" type="submit" value="{'locfiledit_restore'|@translate}" name="restore" onclick="return confirm('{'locfiledit_restore_confirm'|@translate|escape:'javascript'}');"/> |
---|
[2235] | 88 | {/if} |
---|
[2588] | 89 | |
---|
| 90 | {if isset ($restore_infos)} |
---|
| 91 | <br><br> |
---|
| 92 | {'locfiledit_save_bak'|@translate} |
---|
[2235] | 93 | {/if} |
---|
| 94 | |
---|
[10348] | 95 | {/if} {* zone_edit *} |
---|
[2235] | 96 | </div> |
---|
| 97 | </form> |
---|