{% extends 'admin.twig' %}

{% block content %}

    <div class="pluginslistActionBar">

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

        <div class="infoBox">
            {{ 'CorePluginsAdmin_ThemesDescription'|translate }}
            {{ 'CorePluginsAdmin_InstallingNewPluginViaMarketplaceOrUpload'|translate('<a href="#" class="uploadPlugin">','</a>')|raw }}
            <br/>
            {{ 'CorePluginsAdmin_BeCarefulUsingThemes'|translate }}
        </div>

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

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

    <div class="pluginslist themes">

        {% if plugins|length %}
            {% for plugin in plugins %}

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

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

            {% endfor %}
        {% else %}
            {{ 'CorePluginsAdmin_NoThemesFound'|translate }}
        {% endif %}

    </div>
{% endblock %}
