diff options
author | patdenice <patdenice@piwigo.org> | 2011-04-13 10:36:53 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2011-04-13 10:36:53 +0000 |
commit | d2da26e467aec1347ae7c314c4c8279cb4618c34 (patch) | |
tree | 62593399f01a303f03608d910a98cce98cc8b664 /plugins/LocalFilesEditor/template/admin.tpl | |
parent | c01d0c1790613fd73efc3c78d0c12debdfb1cbc7 (diff) |
Clean code
git-svn-id: http://piwigo.org/svn/trunk@10348 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins/LocalFilesEditor/template/admin.tpl')
-rw-r--r-- | plugins/LocalFilesEditor/template/admin.tpl | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/plugins/LocalFilesEditor/template/admin.tpl b/plugins/LocalFilesEditor/template/admin.tpl new file mode 100644 index 000000000..1761951d2 --- /dev/null +++ b/plugins/LocalFilesEditor/template/admin.tpl @@ -0,0 +1,97 @@ +{combine_script id="codemirror" path="plugins/LocalFilesEditor/codemirror/lib/codemirror.js"} +{combine_script id="codemirror.xml" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/xml/xml.js"} +{combine_script id="codemirror.javascript" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/javascript/javascript.js"} +{combine_script id="codemirror.css" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/css/css.js"} +{combine_script id="codemirror.clike" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/clike/clike.js"} +{combine_script id="codemirror.htmlmixed" require="codemirror.xml,codemirror.javascript,codemirror.css" path="plugins/LocalFilesEditor/codemirror/mode/htmlmixed/htmlmixed.js"} +{combine_script id="codemirror.php" require="codemirror.xml,codemirror.javascript,codemirror.css,codemirror.clike" path="plugins/LocalFilesEditor/codemirror/mode/php/php.js"} + +{combine_css path="plugins/LocalFilesEditor/codemirror/lib/codemirror.css"} +{combine_css path="plugins/LocalFilesEditor/codemirror/mode/xml/xml.css"} +{combine_css path="plugins/LocalFilesEditor/codemirror/mode/javascript/javascript.css"} +{combine_css path="plugins/LocalFilesEditor/codemirror/mode/css/css.css"} +{combine_css path="plugins/LocalFilesEditor/codemirror/mode/clike/clike.css"} +{combine_css path="plugins/LocalFilesEditor/template/locfiledit.css"} + +{footer_script} +if (document.getElementById("text") != null) + var editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim} + matchBrackets: true, + mode: "{$CODEMIRROR_MODE}", + tabMode: "shift" + }); +{/footer_script} + +<div class="titrePage"> + <h2>LocalFiles Editor</h2> +</div> + +<form method="post" class="properties" action="{$F_ACTION}" ENCTYPE="multipart/form-data" name="form"> + +<div id="LocalFilesEditor"> + +<input type="hidden" value="{$zone_edit.EDITED_FILE}" name="edited_file"/> + +{if isset ($create_tpl)} + <table> + <tr> + <td style="text-align: right;">{'locfiledit_new_filename'|@translate}</td> + <td style="text-align: left;"><input type="text" size="55" maxlength="50" value="{$create_tpl.NEW_FILE_NAME}" name="tpl_name"/></td> + </tr> + <tr> + <td style="text-align: right;">{'locfiledit_parent_directory'|@translate}</td> + <td style="text-align: left;">{html_options name=tpl_parent options=$create_tpl.PARENT_OPTIONS selected=$create_tpl.PARENT_SELECTED}</td> + </tr> + <tr> + <td style="text-align: right;">{'locfiledit_model'|@translate}</td> + <td style="text-align: left;">{html_options name=tpl_model options=$create_tpl.MODEL_OPTIONS selected=$create_tpl.MODEL_SELECTED}</td> + </tr> + </table> +<br><br> +<input class="submit" type="submit" value="{'Submit'|@translate}" name="create_tpl" /> +{/if} + +{if isset ($css_lang_tpl)} +{html_options name=file_to_edit options=$css_lang_tpl.OPTIONS selected=$css_lang_tpl.SELECTED} +<input class="submit" type="submit" value="{'locfiledit_edit'|@translate}" name="edit" /> +<br><br> + {if isset ($css_lang_tpl.NEW_FILE_URL)} + <span class="{$css_lang_tpl.NEW_FILE_CLASS}"> + <a href="{$css_lang_tpl.NEW_FILE_URL}">{'locfiledit_new_tpl'|@translate}</a> + </span> + {/if} +{/if} + +{if isset ($zone_edit)} +<div id="title_bar"> +{/if} + +{if !empty($show_default)} +{foreach from=$show_default item=file name=default_loop} +<span class="default_file"> +<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> +</span> +{if !($smarty.foreach.default_loop.last)}<br>{/if} +{/foreach} +{/if} + +{if isset ($zone_edit)} +<span class="file_name">{$zone_edit.FILE_NAME}</span> +</div> {* title_bar *} + +<textarea rows="30" cols="90" name="text" id="text">{$zone_edit.CONTENT_FILE}</textarea> +<br> +<input class="submit" type="submit" value="{'locfiledit_save_file'|@translate}" name="submit"/> + +{if isset ($restore)} +<input class="submit" type="submit" value="{'locfiledit_restore'|@translate}" name="restore" onclick="return confirm('{'locfiledit_restore_confirm'|@translate|escape:'javascript'}');"/> +{/if} + +{if isset ($restore_infos)} +<br><br> +{'locfiledit_save_bak'|@translate} +{/if} + +{/if} {* zone_edit *} +</div> +</form> |