aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes/default
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2011-06-04 09:34:59 +0000
committermistic100 <mistic@piwigo.org>2011-06-04 09:34:59 +0000
commiteffb4d9de0dff2f68e65e9fabe4c9d4e18b68fe6 (patch)
treeb6010556c7ce3656bf22fec14529d717927a7c86 /admin/themes/default
parentd2fa16a7f5a0f334d72080eb12b78aea549e8d8b (diff)
'Deactivate all' link now visible if all plugins are active
git-svn-id: http://piwigo.org/svn/trunk@11227 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/themes/default/template/plugins_installed.tpl25
1 files changed, 16 insertions, 9 deletions
diff --git a/admin/themes/default/template/plugins_installed.tpl b/admin/themes/default/template/plugins_installed.tpl
index 036a568ef..5e3b451db 100644
--- a/admin/themes/default/template/plugins_installed.tpl
+++ b/admin/themes/default/template/plugins_installed.tpl
@@ -102,12 +102,12 @@ jQuery(document).ready(function() {
{if isset($plugins)}
-{assign var='field_name' value='null'}
+{assign var='field_name' value='null'} {* <!-- 'counter' for fieldset management --> *}
+{counter start=0 assign=i} {* <!-- counter for 'deactivate all' link --> *}
{foreach from=$plugins item=plugin name=plugins_loop}
{if $field_name != $plugin.STATE}
{if $field_name != 'null'}
- {if $field_name == 'active'}<div class="deactivate_all"><a>{'Deactivate all'|@translate}</a></div>{/if}
</fieldset>
{/if}
@@ -125,6 +125,8 @@ jQuery(document).ready(function() {
</legend>
{assign var='field_name' value=$plugin.STATE}
{/if}
+
+ {if $plugin.STATE == 'active'}{counter}{/if}
{if not empty($plugin.AUTHOR)}
{if not empty($plugin.AUTHOR_URL)}
@@ -147,14 +149,14 @@ jQuery(document).ready(function() {
<td>
{if $plugin.STATE == 'active'}
<a href="{$plugin.U_ACTION}&amp;action=deactivate">{'Deactivate'|@translate}</a>
- | <a href="{$plugin.U_ACTION}&amp;action=restore" class="plugin-restore" title="{'Restore default configuration. You will lost your plugin settings!'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Restore'|@translate}</a>
+ | <a href="{$plugin.U_ACTION}&amp;action=restore" class="plugin-restore" title="{'Restore default configuration. You will lost your plugin settings!'|@translate}" onclick="return confirm(confirmMsg);">{'Restore'|@translate}</a>
{elseif $plugin.STATE == 'inactive'}
<a href="{$plugin.U_ACTION}&amp;action=activate" class="activate">{'Activate'|@translate}</a>
- | <a href="{$plugin.U_ACTION}&amp;action=delete" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Delete'|@translate}</a>
+ | <a href="{$plugin.U_ACTION}&amp;action=delete" onclick="return confirm(confirmMsg);">{'Delete'|@translate}</a>
{elseif $plugin.STATE == 'missing'}
- <a href="{$plugin.U_ACTION}&amp;action=uninstall" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Uninstall'|@translate}</a>
+ <a href="{$plugin.U_ACTION}&amp;action=uninstall" onclick="return confirm(confirmMsg);">{'Uninstall'|@translate}</a>
{elseif $plugin.STATE == 'merged'}
<a href="{$plugin.U_ACTION}&amp;action=delete">{'Delete'|@translate}</a>
@@ -178,7 +180,7 @@ jQuery(document).ready(function() {
{elseif $plugin_display == 'compact'}
{if not empty($plugin.VISIT_URL)}
{assign var='version' value="<a class='externalLink' href='"|cat:$plugin.VISIT_URL|cat:"'>"|cat:$plugin.VERSION|cat:"</a>"}
- {else
+ {else}
{assign var='version' value=$plugin.VERSION}
{/if}
@@ -191,14 +193,14 @@ jQuery(document).ready(function() {
<div>
{if $plugin.STATE == 'active'}
<a href="{$plugin.U_ACTION}&amp;action=deactivate">{'Deactivate'|@translate}</a>
- | <a href="{$plugin.U_ACTION}&amp;action=restore" class="plugin-restore" title="{'Restore default configuration. You will lost all your settings !'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Restore'|@translate}</a>
+ | <a href="{$plugin.U_ACTION}&amp;action=restore" class="plugin-restore" title="{'Restore default configuration. You will lost all your settings !'|@translate}" onclick="return confirm(confirmMsg);">{'Restore'|@translate}</a>
{elseif $plugin.STATE == 'inactive'}
<a href="{$plugin.U_ACTION}&amp;action=activate" class="activate">{'Activate'|@translate}</a>
- | <a href="{$plugin.U_ACTION}&amp;action=delete" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Delete'|@translate}</a>
+ | <a href="{$plugin.U_ACTION}&amp;action=delete" onclick="return confirm(confirmMsg);">{'Delete'|@translate}</a>
{elseif $plugin.STATE == 'missing'}
- <a href="{$plugin.U_ACTION}&amp;action=uninstall" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Uninstall'|@translate}</a>
+ <a href="{$plugin.U_ACTION}&amp;action=uninstall" onclick="return confirm(confirmMsg);">{'Uninstall'|@translate}</a>
{elseif $plugin.STATE == 'merged'}
<a href="{$plugin.U_ACTION}&amp;action=delete">{'Delete'|@translate}</a>
@@ -209,6 +211,11 @@ jQuery(document).ready(function() {
{/if}
+ {if $active_plugins == $i}
+ <div class="deactivate_all"><a>{'Deactivate all'|@translate}</a></div>
+ {counter}
+ {/if}
+
{/foreach}
</fieldset>