source: trunk/plugins/LocalFilesEditor/admin.tpl @ 9173

Last change on this file since 9173 was 9173, checked in by patdenice, 10 years ago

Remove knwo_script from LocalFiles Editor

  • Property svn:eol-style set to LF
File size: 3.6 KB
Line 
1{html_head}<script type="text/javascript" src="{$ROOT_URL}plugins/LocalFilesEditor/editarea/edit_area_full.js"></script>{/html_head}
2{combine_css path="plugins/LocalFilesEditor/locfiledit.css"}
3{footer_script}
4function loadEditarea() {ldelim}
5  editAreaLoader.init({ldelim}
6    id: "text"
7    {foreach from=$EDITAREA_OPTIONS key=option item=value}
8    , {$option}: {$value|editarea_quote}
9    {/foreach}
10  });
11  jQuery("#showedit").hide();
12  jQuery("#hideedit").show();
13  jQuery.post("plugins/LocalFilesEditor/update_config.php", {ldelim} editarea: "on"});
14}
15
16function unloadEditarea() {ldelim}
17  editAreaLoader.delete_instance("text");
18  jQuery("#hideedit").hide();
19  jQuery("#showedit").show();
20  jQuery.post("plugins/LocalFilesEditor/update_config.php", {ldelim} editarea: "off"});
21}
22
23jQuery("#editarea_buttons").show();
24{if $LOAD_EDITAREA == 'on'}
25if (document.getElementById("text") != null) loadEditarea();
26{/if}
27{/footer_script}
28
29<div class="titrePage">
30  <h2>LocalFiles Editor</h2>
31</div>
32
33<form method="post" class="properties" action="{$F_ACTION}" ENCTYPE="multipart/form-data" name="form">
34
35<div id="LocalFilesEditor">
36
37<input type="hidden" value="{$zone_edit.EDITED_FILE}" name="edited_file"/>
38
39{if isset ($create_tpl)}
40  <table>
41    <tr>
42      <td style="text-align: right;">{'locfiledit_new_filename'|@translate}</td>
43      <td style="text-align: left;"><input type="text" size="55" maxlength="50" value="{$create_tpl.NEW_FILE_NAME}" name="tpl_name"/></td>
44    </tr>
45    <tr>
46      <td style="text-align: right;">{'locfiledit_parent_directory'|@translate}</td>
47      <td style="text-align: left;">{html_options name=tpl_parent options=$create_tpl.PARENT_OPTIONS selected=$create_tpl.PARENT_SELECTED}</td>
48    </tr>
49    <tr>
50      <td style="text-align: right;">{'locfiledit_model'|@translate}</td>
51      <td style="text-align: left;">{html_options name=tpl_model options=$create_tpl.MODEL_OPTIONS selected=$create_tpl.MODEL_SELECTED}</td>
52    </tr>
53  </table>
54<br><br>
55<input class="submit" type="submit" value="{'Submit'|@translate}" name="create_tpl" />
56{/if}
57
58{if isset ($css_lang_tpl)}
59{html_options name=file_to_edit options=$css_lang_tpl.OPTIONS selected=$css_lang_tpl.SELECTED}
60<input class="submit" type="submit" value="{'locfiledit_edit'|@translate}" name="edit" />
61<br><br>
62  {if isset ($css_lang_tpl.NEW_FILE_URL)}
63  <span class="{$css_lang_tpl.NEW_FILE_CLASS}">
64  <a href="{$css_lang_tpl.NEW_FILE_URL}">{'locfiledit_new_tpl'|@translate}</a>
65  </span>
66  {/if}
67{/if}
68
69{if !empty($show_default)}
70{foreach from=$show_default item=file name=default_loop}
71<span class="top_right">
72<a href="{$file.SHOW_DEFAULT}" onclick="window.open( this.href, 'local_file', 'location=no,toolbar=no,menubar=no,status=no,resizable=yes,scrollbars=yes,width=800,height=600' ); 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<b>{$zone_edit.FILE_NAME}</b>
80
81<textarea rows="30" cols="90" name="text" id="text">{$zone_edit.CONTENT_FILE}</textarea>
82<div id="editarea_buttons">
83<a href="javascript:loadEditarea();" id="showedit">[{'locfiledit_enable_editarea'|@translate}]</a>
84<a href="javascript:unloadEditarea();" id="hideedit">[{'locfiledit_disable_editarea'|@translate}]</a>
85</div>
86
87<br>
88
89<input class="submit" type="submit" value="{'locfiledit_save_file'|@translate}" name="submit"/>
90{if isset ($restore)}
91<input class="submit" type="submit" value="{'locfiledit_restore'|@translate}" name="restore" onclick="return confirm('{'locfiledit_restore_confirm'|@translate|escape:'javascript'}');"/>
92{/if}
93
94{if isset ($restore_infos)}
95<br><br>
96{'locfiledit_save_bak'|@translate}
97{/if}
98
99{/if}
100</div>
101</form>
Note: See TracBrowser for help on using the repository browser.