1 | {footer_script} |
---|
2 | var incompatible_msg = '{'WARNING! This plugin does not seem to be compatible with this version of Piwigo.'|@translate|@escape:'javascript'}'; |
---|
3 | var activate_msg = '\n{'Do you want to activate anyway?'|@translate|@escape:'javascript'}'; |
---|
4 | |
---|
5 | {literal} |
---|
6 | jQuery(document).ready(function() { |
---|
7 | jQuery('.incompatible').click(function() { |
---|
8 | return confirm(incompatible_msg); |
---|
9 | }); |
---|
10 | jQuery.ajax({ |
---|
11 | method: 'GET', |
---|
12 | url: 'admin.php', |
---|
13 | data: { page: 'plugins_list', incompatible_plugins: true }, |
---|
14 | dataType: 'json', |
---|
15 | success: function(data) { |
---|
16 | for (i=0;i<data.length;i++) { |
---|
17 | jQuery('#plugin_'+data[i]+' .pluginBoxNameCell') |
---|
18 | .addClass('warning') |
---|
19 | .attr('title', incompatible_msg) |
---|
20 | .tipTip({'delay' : 0, 'fadeIn' : 200, 'fadeOut' : 200}); |
---|
21 | jQuery('#plugin_'+data[i]+' .activate').attr('onClick', 'return confirm(incompatible_msg + activate_msg);'); |
---|
22 | } |
---|
23 | } |
---|
24 | }); |
---|
25 | }); |
---|
26 | {/literal}{/footer_script} |
---|
27 | |
---|
28 | <div class="titrePage"> |
---|
29 | <h2>{'Plugins'|@translate}</h2> |
---|
30 | </div> |
---|
31 | |
---|
32 | {if isset($plugins)} |
---|
33 | |
---|
34 | {foreach from=$plugin_states item=plugin_state} |
---|
35 | <fieldset> |
---|
36 | <legend> |
---|
37 | {if $plugin_state == 'active'} |
---|
38 | {'Active Plugins'|@translate} |
---|
39 | |
---|
40 | {elseif $plugin_state == 'inactive'} |
---|
41 | {'Inactive Plugins'|@translate} |
---|
42 | |
---|
43 | {elseif $plugin_state == 'uninstalled'} |
---|
44 | {'Uninstalled Plugins'|@translate} |
---|
45 | |
---|
46 | {elseif $plugin_state == 'missing'} |
---|
47 | {'Missing Plugins'|@translate} |
---|
48 | |
---|
49 | {elseif $plugin_state == 'merged'} |
---|
50 | {'Obsolete Plugins'|@translate} |
---|
51 | |
---|
52 | {/if} |
---|
53 | </legend> |
---|
54 | {foreach from=$plugins item=plugin name=plugins_loop} |
---|
55 | {if $plugin.STATE == $plugin_state} |
---|
56 | <div class="pluginBox" id="plugin_{$plugin.ID}"> |
---|
57 | <table> |
---|
58 | <tr> |
---|
59 | <td class="pluginBoxNameCell"> |
---|
60 | {$plugin.NAME} |
---|
61 | </td> |
---|
62 | <td>{$plugin.DESC}</td> |
---|
63 | </tr> |
---|
64 | <tr> |
---|
65 | <td> |
---|
66 | {if $plugin.STATE == 'active'} |
---|
67 | <a href="{$plugin.U_ACTION}&action=deactivate">{'Deactivate'|@translate}</a> |
---|
68 | |
---|
69 | {elseif $plugin_state == 'inactive'} |
---|
70 | <a href="{$plugin.U_ACTION}&action=activate" class="activate">{'Activate'|@translate}</a> |
---|
71 | | <a href="{$plugin.U_ACTION}&action=uninstall" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Uninstall'|@translate}</a> |
---|
72 | |
---|
73 | {elseif $plugin_state == 'uninstalled'} |
---|
74 | <a href="{$plugin.U_ACTION}&action=install">{'Install'|@translate}</a> |
---|
75 | | <a href="{$plugin.U_ACTION}&action=delete" onclick="return confirm('{'Are you sure you want to delete this plugin?'|@translate|@escape:'javascript'}');">{'Delete'|@translate}</a> |
---|
76 | |
---|
77 | {elseif $plugin_state == 'missing'} |
---|
78 | <a href="{$plugin.U_ACTION}&action=uninstall" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Uninstall'|@translate}</a> |
---|
79 | |
---|
80 | {elseif $plugin_state == 'merged'} |
---|
81 | <a href="{$plugin.U_ACTION}&action=delete">{'Delete'|@translate}</a> |
---|
82 | {/if} |
---|
83 | </td> |
---|
84 | <td> |
---|
85 | {'Version'|@translate} {$plugin.VERSION} |
---|
86 | {if not empty($plugin.AUTHOR)} |
---|
87 | {if not empty($plugin.AUTHOR_URL)} |
---|
88 | {assign var='author' value='<a href="%s">%s</a>'|@sprintf:$plugin.AUTHOR_URL:$plugin.AUTHOR} |
---|
89 | {else} |
---|
90 | {assign var='author' value=$plugin.AUTHOR} |
---|
91 | {/if} |
---|
92 | | {'By %s'|@translate|@sprintf:$author} |
---|
93 | {/if} |
---|
94 | |
---|
95 | {if not empty($plugin.VISIT_URL)} |
---|
96 | | <a class="externalLink" href="{$plugin.VISIT_URL}">{'Visit plugin site'|@translate}</a> |
---|
97 | {/if} |
---|
98 | </td> |
---|
99 | </tr> |
---|
100 | </table> |
---|
101 | </div> |
---|
102 | {/if} |
---|
103 | {/foreach} |
---|
104 | </fieldset> |
---|
105 | {/foreach} |
---|
106 | |
---|
107 | {/if} |
---|