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 | incompatible_msg += '\n'; |
---|
4 | incompatible_msg += '{'Do you want to activate anyway?'|@translate|@escape:'javascript'}'; |
---|
5 | |
---|
6 | {literal} |
---|
7 | jQuery(document).ready(function() { |
---|
8 | jQuery('.incompatible').click(function() { |
---|
9 | return confirm(incompatible_msg); |
---|
10 | }); |
---|
11 | }); |
---|
12 | {/literal}{/footer_script} |
---|
13 | |
---|
14 | <div class="titrePage"> |
---|
15 | <h2>{'Plugins'|@translate}</h2> |
---|
16 | </div> |
---|
17 | |
---|
18 | {if isset($plugins)} |
---|
19 | |
---|
20 | {foreach from=$plugin_states item=plugin_state} |
---|
21 | <fieldset> |
---|
22 | <legend> |
---|
23 | {if $plugin_state == 'active'} |
---|
24 | {'Active Plugins'|@translate} |
---|
25 | |
---|
26 | {elseif $plugin_state == 'inactive'} |
---|
27 | {'Inactive Plugins'|@translate} |
---|
28 | |
---|
29 | {elseif $plugin_state == 'uninstalled'} |
---|
30 | {'Uninstalled Plugins'|@translate} |
---|
31 | |
---|
32 | {elseif $plugin_state == 'missing'} |
---|
33 | {'Missing Plugins'|@translate} |
---|
34 | |
---|
35 | {elseif $plugin_state == 'merged'} |
---|
36 | {'Obsolete Plugins'|@translate} |
---|
37 | |
---|
38 | {/if} |
---|
39 | </legend> |
---|
40 | {foreach from=$plugins item=plugin name=plugins_loop} |
---|
41 | {if $plugin.STATE == $plugin_state} |
---|
42 | <div class="pluginBox"> |
---|
43 | <table> |
---|
44 | <tr> |
---|
45 | <td class="pluginBoxNameCell">{$plugin.NAME}</td> |
---|
46 | <td>{$plugin.DESC}</td> |
---|
47 | </tr> |
---|
48 | <tr> |
---|
49 | <td> |
---|
50 | {if $plugin.STATE == 'active'} |
---|
51 | <a href="{$plugin.U_ACTION}&action=deactivate">{'Deactivate'|@translate}</a> |
---|
52 | |
---|
53 | {elseif $plugin_state == 'inactive'} |
---|
54 | <a href="{$plugin.U_ACTION}&action=activate" {if $plugin.INCOMPATIBLE}class="incompatible"{/if}>{'Activate'|@translate}</a> |
---|
55 | | <a href="{$plugin.U_ACTION}&action=uninstall" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Uninstall'|@translate}</a> |
---|
56 | |
---|
57 | {elseif $plugin_state == 'uninstalled'} |
---|
58 | <a href="{$plugin.U_ACTION}&action=install">{'Install'|@translate}</a> |
---|
59 | | <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> |
---|
60 | |
---|
61 | {elseif $plugin_state == 'missing' or $plugin_state == 'merged'} |
---|
62 | <a href="{$plugin.U_ACTION}&action=uninstall" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Uninstall'|@translate}</a> |
---|
63 | |
---|
64 | {/if} |
---|
65 | </td> |
---|
66 | <td> |
---|
67 | {'Version'|@translate} {$plugin.VERSION} |
---|
68 | {if not empty($plugin.AUTHOR)} |
---|
69 | {if not empty($plugin.AUTHOR_URL)} |
---|
70 | {assign var='author' value='<a href="%s">%s</a>'|@sprintf:$plugin.AUTHOR_URL:$plugin.AUTHOR} |
---|
71 | {else} |
---|
72 | {assign var='author' value=$plugin.AUTHOR} |
---|
73 | {/if} |
---|
74 | | {'By %s'|@translate|@sprintf:$author} |
---|
75 | {/if} |
---|
76 | |
---|
77 | {if not empty($plugin.VISIT_URL)} |
---|
78 | | <a class="externalLink" href="{$plugin.VISIT_URL}">{'Visit plugin site'|@translate}</a> |
---|
79 | {/if} |
---|
80 | </td> |
---|
81 | </tr> |
---|
82 | </table> |
---|
83 | </div> |
---|
84 | {/if} |
---|
85 | {/foreach} |
---|
86 | </fieldset> |
---|
87 | {/foreach} |
---|
88 | |
---|
89 | {/if} |
---|