source: branches/2.2/plugins/LocalFilesEditor/template/admin.tpl @ 10349

Revision 10349, 4.2 KB checked in by patdenice, 9 years ago (diff)

merge r10348 from trunk to branch 2.2
Clean code

  • Property svn:eol-style set to LF
Line 
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}
17if (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
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
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" />
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}
63{/if}
64
65{if isset ($zone_edit)}
66<div id="title_bar">
67{/if}
68
69{if !empty($show_default)}
70{foreach from=$show_default item=file name=default_loop}
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>
73</span>
74{if !($smarty.foreach.default_loop.last)}<br>{/if}
75{/foreach}
76{/if}
77
78{if isset ($zone_edit)}
79<span class="file_name">{$zone_edit.FILE_NAME}</span>
80</div> {* title_bar *}
81
82<textarea rows="30" cols="90" name="text" id="text">{$zone_edit.CONTENT_FILE}</textarea>
83<br>
84<input class="submit" type="submit" value="{'locfiledit_save_file'|@translate}" name="submit"/>
85
86{if isset ($restore)}
87<input class="submit" type="submit" value="{'locfiledit_restore'|@translate}" name="restore" onclick="return confirm('{'locfiledit_restore_confirm'|@translate|escape:'javascript'}');"/>
88{/if}
89
90{if isset ($restore_infos)}
91<br><br>
92{'locfiledit_save_bak'|@translate}
93{/if}
94
95{/if} {* zone_edit *}
96</div>
97</form>
Note: See TracBrowser for help on using the repository browser.