{% extends 'admin.twig' %}
{% import '@CorePluginsAdmin/macros.twig' as pluginsMacro %}

{% block content %}

    <div class="pluginslistActionBar">

        <h2 piwik-enriched-headline
            feature-name="{{ 'CorePluginsAdmin_Marketplace'|translate }}"
            >{{ 'CorePluginsAdmin_TeaserExtendPiwikByPlugin'|translate }}</h2>

        <div class="infoBox">
            {{ 'CorePluginsAdmin_BeCarefulUsingPlugins'|translate }}
        </div>

        {% include "@CorePluginsAdmin/browsePluginsActions.twig" %}
    </div>

    {% if not isSuperUser %}
        <div class="pluginslistNonSuperUserHint">
            {{ 'CorePluginsAdmin_NotAllowedToBrowseMarketplacePlugins'|translate }}
        </div>
    {% endif %}

    <div class="pluginslist">

        {% if plugins|length %}

            {% for plugin in plugins %}

                <div class="plugin">
                    <div class="content" data-pluginName="{{ plugin.name }}">
                        {% include "@CorePluginsAdmin/pluginOverview.twig" %}
                    </div>

                    <div class="footer" data-pluginName="{{ plugin.name }}">
                        {% if plugin.featured %}
                            {{ pluginsMacro.featuredIcon('right') }}
                        {% endif %}
                        {% include "@CorePluginsAdmin/pluginMetadata.twig" %}
                    </div>
                </div>

            {% endfor %}

        {% else %}
            {{ 'CorePluginsAdmin_NoPluginsFound'|translate }}
        {% endif %}
    </div>
{% endblock %}
