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

Revision 9721, 6.3 KB checked in by patdenice, 9 years ago (diff)

Add ajax loader bar.

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