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

Revision 9947, 6.5 KB checked in by patdenice, 9 years ago (diff)

Use ajaxmanager

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