source: extensions/autoupdate/trunk/template/update_ext.tpl @ 9712

Revision 9712, 6.1 KB checked in by patdenice, 9 years ago (diff)

Clean code.
Rename files.

RevLine 
[9707]1{combine_script id='jquery.jgrowl' load='footer' require='jquery' path='themes/default/js/plugins/jquery.jgrowl_minimized.js' }
[9712]2{combine_script id='jquery.autoupdate' load='footer' require='jquery' path='plugins/autoupdate/template/autoupdate.js' }
[9707]3{combine_css path="admin/themes/default/uploadify.jGrowl.css"}
4
[9712]5{footer_script require='jquery.autoupdate,jquery.effects.blind,jquery.jgrowl'}
[9707]6var extList = new Array();
7var confirmMsg  = '{'Are you sure?'|@translate|@escape:'javascript'}';
8var errorHead   = '{'ERROR'|@translate|@escape:'javascript'}';
9var successHead = '{'Upgrade Complete'|@translate|@escape:'javascript'}';
10var errorMsg    = '{'an error happened'|@translate|@escape:'javascript'}';
[9710]11var restoreMsg  = '{'autoupdate_reset_ignore'|@translate|@escape:'javascript'}';
[9707]12
[9712]13checkFieldsets();
14
[9707]15{literal}
16jQuery(document).ready(function() {
17        jQuery("td[id^='desc_'], p[id^='revdesc_']").click(function() {
18                id = this.id.split('_');
19                jQuery("#revdesc_"+id[1]).toggle('blind');
20    jQuery(".button_"+id[1]).toggle();
21                return false;
22        });
23});
[9712]24{/literal}
25{/footer_script}
[9707]26
27<div class="titrePage">
28  <h2>Piwigo AutoUpgrade</h2>
29</div>
[9710]30
[9707]31<div>
[9712]32<input type="button" id="update_all" value="{'autoupdate_update_all'|@translate}" onClick="updateAll();">
33<input type="button" id="reset_ignore" value="{'autoupdate_reset_ignore'|@translate}" onClick="resetIgnored();" {if !$SHOW_RESET}style="display:none;"{/if}>
[9707]34</div>
35
[9710]36<p id="up_to_date" style="display:none; text-align:left; margin-left:20px;">{'All extensions are up to date.'|@translate}</p>
37
[9707]38{if not empty($update_plugins)}
39<div>
40<fieldset id="plugins">
41<legend>{'Plugins which need upgrade'|@translate}</legend>
42{foreach from=$update_plugins item=plugin name=plugins_loop}
43<div class="pluginBox" id="plugin_{$plugin.PLUGIN_ID}" {if $plugin.IGNORED}style="display:none;"{/if}>
44  <table>
45    <tr>
46      <td class="pluginBoxNameCell">
47        {$plugin.EXT_NAME}
48      </td>
49      <td>
50        <a href="#" onClick="upgradeExtension('plugin', '{$plugin.PLUGIN_ID}', {$plugin.REVISION_ID});" class="updateExtension">{'Install'|@translate}</a>
51        | <a href="{$plugin.URL_DOWNLOAD}">{'Download'|@translate}</a>
52        | <a href="#" onClick="ignoreExtension('plugin', '{$plugin.PLUGIN_ID}');">{'autoupdate_ignore'|@translate}</a>
53      </td>
54    </tr>
55    <tr>
56      <td>
57        {'Version'|@translate} {$plugin.CURRENT_VERSION}
58      </td>
59      <td class="pluginDesc" id="desc_{$plugin.ID}">
60        <em>{'Downloads'|@translate}: {$plugin.DOWNLOADS}</em>
61        <img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/plus.gif" alt="" class="button_{$plugin.ID}">
62        <img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/minus.gif" alt="" class="button_{$plugin.ID}" style="display:none;">
63        {'New Version'|@translate} : {$plugin.NEW_VERSION}
64        | {'By %s'|@translate|@sprintf:$plugin.AUTHOR}
65      </td>
66    </tr>
67    <tr>
68      <td></td>
69      <td class="pluginDesc">
70        <p id="revdesc_{$plugin.ID}" style="display:none;">{$plugin.REV_DESC|htmlspecialchars|nl2br}</p>
71      </td>
72    </tr>
73  </table>
74</div>
75{/foreach}
76</fieldset>
77</div>
78{/if}
79
80{if not empty($update_themes)}
81<div>
82<fieldset id="themes">
83<legend>{'Themes which need upgrade'|@translate}</legend>
84{foreach from=$update_themes item=theme name=themes_loop}
85<div class="pluginBox" id="theme_{$theme.THEME_ID}" {if $theme.IGNORED}style="display:none;"{/if}>
86  <table>
87    <tr>
88      <td class="pluginBoxNameCell">
89        {$theme.EXT_NAME}
90      </td>
91      <td>
92        <a href="#" onClick="upgradeExtension('theme', '{$theme.THEME_ID}', {$theme.REVISION_ID});" class="updateExtension">{'Install'|@translate}</a>
93        | <a href="{$theme.URL_DOWNLOAD}">{'Download'|@translate}</a>
94        | <a href="#" onClick="ignoreExtension('theme', '{$theme.THEME_ID}');">{'autoupdate_ignore'|@translate}</a>
95      </td>
96    </tr>
97    <tr>
98      <td>
99        {'Version'|@translate} {$theme.CURRENT_VERSION}
100      </td>
101      <td class="pluginDesc" id="desc_{$theme.ID}">
102        <em>{'Downloads'|@translate}: {$theme.DOWNLOADS}</em>
103        <img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/plus.gif" alt="" class="button_{$theme.ID}">
104        <img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/minus.gif" alt="" class="button_{$theme.ID}" style="display:none;">
105        {'New Version'|@translate} : {$theme.NEW_VERSION}
106        | {'By %s'|@translate|@sprintf:$theme.AUTHOR}
107      </td>
108    </tr>
109    <tr>
110      <td></td>
111      <td class="pluginDesc">
112        <p id="revdesc_{$theme.ID}" style="display:none;">{$theme.REV_DESC|htmlspecialchars|nl2br}</p>
113      </td>
114    </tr>
115  </table>
116</div>
117{/foreach}
118</fieldset>
119</div>
120{/if}
121
122{if not empty($update_languages)}
123<div>
124<fieldset id="languages">
125<legend>{'Languages which need upgrade'|@translate}</legend>
126{foreach from=$update_languages item=language name=languages_loop}
127<div class="pluginBox" id="language_{$language.LANGUAGE_ID}" {if $language.IGNORED}style="display:none;"{/if}>
128  <table>
129    <tr>
130      <td class="pluginBoxNameCell">
131        {$language.EXT_NAME}
132      </td>
133      <td>
134        <a href="#" onClick="upgradeExtension('language', '{$language.LANGUAGE_ID}', {$language.REVISION_ID});" class="updateExtension">{'Install'|@translate}</a>
135        | <a href="{$language.URL_DOWNLOAD}">{'Download'|@translate}</a>
136        | <a href="#" onClick="ignoreExtension('language', '{$language.LANGUAGE_ID}');">{'autoupdate_ignore'|@translate}</a>
137      </td>
138    </tr>
139    <tr>
140      <td>
141        {'Version'|@translate} {$language.CURRENT_VERSION}
142      </td>
143      <td class="pluginDesc" id="desc_{$language.ID}">
144        <em>{'Downloads'|@translate}: {$language.DOWNLOADS}</em>
145        <img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/plus.gif" alt="" class="button_{$language.ID}">
146        <img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/minus.gif" alt="" class="button_{$language.ID}" style="display:none;">
147        {'New Version'|@translate} : {$language.NEW_VERSION}
148        | {'By %s'|@translate|@sprintf:$language.AUTHOR}
149      </td>
150    </tr>
151    <tr>
152      <td></td>
153      <td class="pluginDesc">
154        <p id="revdesc_{$language.ID}" style="display:none;">{$language.REV_DESC|htmlspecialchars|nl2br}</p>
155      </td>
156    </tr>
157  </table>
158</div>
159{/foreach}
160</fieldset>
161</div>
162{/if}
Note: See TracBrowser for help on using the repository browser.