{% extends 'admin.twig' %}

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

{% set title %}{{ 'CorePluginsAdmin_ThemesManagement'|translate }}{% endset %}

{% block content %}

<div piwik-content-intro>
    <h2 piwik-enriched-headline>
        {{ title|e('html_attr') }}
    </h2>

    <p>
        {{ 'CorePluginsAdmin_ThemesDescription'|translate }}

        {% if isMarketplaceEnabled %}
            {{ 'CorePluginsAdmin_TeaserExtendPiwikByTheme'|translate('<a href="' ~ linkTo({'action':'browseThemes', 'sort': ''}) ~ '">', '</a>')|raw }}
        {% endif %}

        {% if otherUsersCount > 0 %}
            <br/> {{ 'CorePluginsAdmin_InfoThemeIsUsedByOtherUsersAsWell'|translate(otherUsersCount, themeEnabled) }}
        {% endif %}
        {% if not isPluginsAdminEnabled %}
            <br/>{{ 'CorePluginsAdmin_DoMoreContactPiwikAdmins'|translate }}
        {% endif %}

    </p>
</div>

<div piwik-content-block content-title="{{ 'CorePluginsAdmin_InstalledThemes'|translate|e('html_attr') }}"
     piwik-plugin-management>

    <p>
    </p>

    {{ plugins.pluginsFilter() }}

    {{ plugins.tablePlugins(pluginsInfo, pluginNamesHavingSettings, activateNonce, deactivateNonce, uninstallNonce, true, marketplacePluginNames, isPluginsAdminEnabled ) }}
</div>
{% endblock %}
