{% import '@CorePluginsAdmin/macros.twig' as plugins %}

{% if isSuperUser %}
    {% if plugin.canBeUpdated and 0 == plugin.missingRequirements|length %}
        <a class="update"
           href="{{ linkTo({'action':'updatePlugin', 'pluginName': plugin.name, 'nonce': updateNonce}) }}"
           >{{ 'CoreUpdater_UpdateTitle'|translate }}</a>
    {% elseif plugin.isInstalled %}
        <span class="install">{{ 'General_Installed'|translate }}</span>
    {% elseif 0 < plugin.missingRequirements|length %}
    {% else %}
        <a href="{{ linkTo({'action': 'installPlugin', 'pluginName': plugin.name, 'nonce': installNonce}) }}"
           class="install">{{ 'CorePluginsAdmin_ActionInstall'|translate }}</a>
    {% endif %}
{% endif %}


<h3 class="header" title="{{ 'General_MoreDetails'|translate }}">
    <a href="javascript:void(0);" class="more">{{ plugin.name }}</a>
</h3>
<p class="description">{{ plugin.description }}
    <br />
    <a href="javascript:void(0);" title="{{ 'General_MoreDetails'|translate }}" class="more">&gt;&gt; {{ 'General_MoreLowerCase'|translate }}</a>
</p>

{% if plugin.canBeUpdated %}
    <p class="updateAvailableNotice" data-activePluginTab="changelog">{{ 'CorePluginsAdmin_PluginUpdateAvailable'|translate(plugin.currentVersion, plugin.latestVersion) }}</p>
{% endif %}

{{ plugins.missingRequirementsPleaseUpdateNotice(plugin) }}