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

{% if isSuperUser %}
    {% if plugin.canBeUpdated and 0 == plugin.missingRequirements|length %}
        <a href="{{ linkTo({'action':'updatePlugin', 'pluginName': plugin.name, 'nonce': updateNonce}) }}"
           class="update"
           >{{ '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">{% if plugin.featured %}{{ plugins.featuredIcon('right') }}{% endif %}{{ plugin.description }}</p>

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

{{ plugins.missingRequirementsPleaseUpdateNotice(plugin) }}

<a href="javascript:void(0);" class="more"><img  title="{{ 'General_MoreDetails'|translate }}"
            class="preview" src="{{ plugin.screenshots|first }}?w=250&h=250"/></a>
