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

Revision 11361, 4.4 KB checked in by plg, 9 years ago (diff)

bug 2341 fixed: simplified selection for CSS file to edit. We display the list
of themes in the same order as on [Administration > Configuration > Themes]

  • 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<select name="file_to_edit">
56{foreach from=$css_lang_tpl.OPTIONS item=theme key=value}
57  <option value="{$value}" {if $value == $css_lang_tpl.SELECTED}selected="selected"{/if} {if is_numeric($value)}disabled="disabled"{/if}>{$theme}</option>
58{/foreach}
59</select>
60
61
62<input class="submit" type="submit" value="{'locfiledit_edit'|@translate}" name="edit" />
63<br><br>
64  {if isset ($css_lang_tpl.NEW_FILE_URL)}
65  <span class="{$css_lang_tpl.NEW_FILE_CLASS}">
66  <a href="{$css_lang_tpl.NEW_FILE_URL}">{'locfiledit_new_tpl'|@translate}</a>
67  </span>
68  {/if}
69{/if}
70
71{if isset ($zone_edit)}
72<div id="title_bar">
73{/if}
74
75{if !empty($show_default)}
76{foreach from=$show_default item=file name=default_loop}
77<span class="default_file">
78<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>
79</span>
80{if !($smarty.foreach.default_loop.last)}<br>{/if}
81{/foreach}
82{/if}
83
84{if isset ($zone_edit)}
85<span class="file_name">{$zone_edit.FILE_NAME}</span>
86</div> {* title_bar *}
87
88<textarea rows="30" cols="90" name="text" id="text">{$zone_edit.CONTENT_FILE}</textarea>
89<br>
90<input class="submit" type="submit" value="{'locfiledit_save_file'|@translate}" name="submit"/>
91
92{if isset ($restore)}
93<input class="submit" type="submit" value="{'locfiledit_restore'|@translate}" name="restore" onclick="return confirm('{'locfiledit_restore_confirm'|@translate|escape:'javascript'}');"/>
94{/if}
95
96{if isset ($restore_infos)}
97<br><br>
98{'locfiledit_save_bak'|@translate}
99{/if}
100
101{/if} {* zone_edit *}
102</div>
103</form>
Note: See TracBrowser for help on using the repository browser.