mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
Add obsolete_extensions.list file in install directory. Incompatible plugins is checked through ajax. git-svn-id: http://piwigo.org/svn/branches/2.2@11043 68402e56-0260-453c-a942-63ccdbb3a9ee
108 lines
3.5 KiB
Smarty
108 lines
3.5 KiB
Smarty
{footer_script}
|
|
var incompatible_msg = '{'WARNING! This plugin does not seem to be compatible with this version of Piwigo.'|@translate|@escape:'javascript'}';
|
|
var activate_msg = '\n{'Do you want to activate anyway?'|@translate|@escape:'javascript'}';
|
|
|
|
{literal}
|
|
jQuery(document).ready(function() {
|
|
jQuery('.incompatible').click(function() {
|
|
return confirm(incompatible_msg);
|
|
});
|
|
jQuery.ajax({
|
|
method: 'GET',
|
|
url: 'admin.php',
|
|
data: { page: 'plugins_list', incompatible_plugins: true },
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
for (i=0;i<data.length;i++) {
|
|
jQuery('#plugin_'+data[i]+' .pluginBoxNameCell')
|
|
.addClass('warning')
|
|
.attr('title', incompatible_msg)
|
|
.tipTip({'delay' : 0, 'fadeIn' : 200, 'fadeOut' : 200});
|
|
jQuery('#plugin_'+data[i]+' .activate').attr('onClick', 'return confirm(incompatible_msg + activate_msg);');
|
|
}
|
|
}
|
|
});
|
|
});
|
|
{/literal}{/footer_script}
|
|
|
|
<div class="titrePage">
|
|
<h2>{'Plugins'|@translate}</h2>
|
|
</div>
|
|
|
|
{if isset($plugins)}
|
|
|
|
{foreach from=$plugin_states item=plugin_state}
|
|
<fieldset>
|
|
<legend>
|
|
{if $plugin_state == 'active'}
|
|
{'Active Plugins'|@translate}
|
|
|
|
{elseif $plugin_state == 'inactive'}
|
|
{'Inactive Plugins'|@translate}
|
|
|
|
{elseif $plugin_state == 'uninstalled'}
|
|
{'Uninstalled Plugins'|@translate}
|
|
|
|
{elseif $plugin_state == 'missing'}
|
|
{'Missing Plugins'|@translate}
|
|
|
|
{elseif $plugin_state == 'merged'}
|
|
{'Obsolete Plugins'|@translate}
|
|
|
|
{/if}
|
|
</legend>
|
|
{foreach from=$plugins item=plugin name=plugins_loop}
|
|
{if $plugin.STATE == $plugin_state}
|
|
<div class="pluginBox" id="plugin_{$plugin.ID}">
|
|
<table>
|
|
<tr>
|
|
<td class="pluginBoxNameCell">
|
|
{$plugin.NAME}
|
|
</td>
|
|
<td>{$plugin.DESC}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
{if $plugin.STATE == 'active'}
|
|
<a href="{$plugin.U_ACTION}&action=deactivate">{'Deactivate'|@translate}</a>
|
|
|
|
{elseif $plugin_state == 'inactive'}
|
|
<a href="{$plugin.U_ACTION}&action=activate" class="activate">{'Activate'|@translate}</a>
|
|
| <a href="{$plugin.U_ACTION}&action=uninstall" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Uninstall'|@translate}</a>
|
|
|
|
{elseif $plugin_state == 'uninstalled'}
|
|
<a href="{$plugin.U_ACTION}&action=install">{'Install'|@translate}</a>
|
|
| <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>
|
|
|
|
{elseif $plugin_state == 'missing'}
|
|
<a href="{$plugin.U_ACTION}&action=uninstall" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">{'Uninstall'|@translate}</a>
|
|
|
|
{elseif $plugin_state == 'merged'}
|
|
<a href="{$plugin.U_ACTION}&action=delete">{'Delete'|@translate}</a>
|
|
{/if}
|
|
</td>
|
|
<td>
|
|
{'Version'|@translate} {$plugin.VERSION}
|
|
{if not empty($plugin.AUTHOR)}
|
|
{if not empty($plugin.AUTHOR_URL)}
|
|
{assign var='author' value='<a href="%s">%s</a>'|@sprintf:$plugin.AUTHOR_URL:$plugin.AUTHOR}
|
|
{else}
|
|
{assign var='author' value=$plugin.AUTHOR}
|
|
{/if}
|
|
| {'By %s'|@translate|@sprintf:$author}
|
|
{/if}
|
|
|
|
{if not empty($plugin.VISIT_URL)}
|
|
| <a class="externalLink" href="{$plugin.VISIT_URL}">{'Visit plugin site'|@translate}</a>
|
|
{/if}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
{/if}
|
|
{/foreach}
|
|
</fieldset>
|
|
{/foreach}
|
|
|
|
{/if}
|