{% extends 'dashboard.twig' %}

{% block topcontrols %}
{% endblock %}

{% block content %}
<div class="activateTagManager">
    <div class="row">
        <div class="col s12" style="text-align: center;">
            <h2>{{ 'CorePluginsAdmin_TagManagerNowAvailableTitle'|translate }}</h2>
            <p>{{ 'CorePluginsAdmin_TagManagerNowAvailableSubtitle'|translate }}</p>
        </div>
    </div>
    {% set actionBlock %}
    <div class="row">
        <div class="col s12">
            <div style="text-align: center;">
                {% if isSuperUser %}
                    <a href="{{ linkTo({'module': 'CorePluginsAdmin', 'action': 'activate', 'nonce': nonce, 'pluginName': 'TagManager', 'redirectTo': 'tagmanager'}) }}"
                       class="btn activateTagManagerPlugin"><span class="icon-rocket"></span> {{ 'CorePluginsAdmin_ActivateTagManagerNow'|translate }} <span class="icon-rocket"></span></a>
                {% else %}
                    <a href="mailto:{{ contactEmail|e('url') }}?subject={{ 'CorePluginsAdmin_TagManagerNowAvailableTitle'|translate|e('url') }}&body={{ 'CorePluginsAdmin_TagManagerTeaserEmailSuperUserBody'|translate("\n\n", "\n\n", piwikUrl, "\n\n")|e('url') }}"
                       class="btn activateTagManagerPlugin"><span class="icon-rocket"></span> {{ 'CorePluginsAdmin_TagManagerEmailSuperUserToActivate'|translate }} <span class="icon-rocket"></span></a>
                {% endif %}

                <a href="{{ linkTo({'module': 'CorePluginsAdmin', 'action': 'disableActivateTagManagerPage'}) }}"
                   class="btn dontShowAgainBtn"><span class="icon-hide"></span>
                    {% if isSuperUser %}{{ 'CorePluginsAdmin_TagManagerTeaserHideSuperUser'|translate }}{% else %}{{ 'CorePluginsAdmin_TagManagerTeaserHideNonSuperUser'|translate }}{% endif %}
                </a>
            </div>
        </div>
    </div>
    {% endset %}
    {{ actionBlock|raw }}
    <div class="row">
        <div class="col {% if isSuperUser %}l4{% else %}l6{% endif %} m12 s12">
            <div vue-entry="CoreHome.ContentBlock" content-title="{{ 'CorePluginsAdmin_WhatIsTagManager'|translate }}">
                <p>
                    {{ 'CorePluginsAdmin_WhatIsTagManagerDetails1'|translate }}<br /><br />
                    {{ 'CorePluginsAdmin_WhatIsTagManagerDetails2'|translate }}<br /><br />
                    <a href="{{ 'https://matomo.org/docs/tag-manager'|trackmatomolink }}" rel="noreferrer noopener">{{ 'CorePluginsAdmin_TagManagerLearnMoreInUserGuide'|translate }}</a>
                </p>
            </div>
        </div>
        <div class="col {% if isSuperUser %}l4{% else %}l6{% endif %} m12 s12">
            <div vue-entry="CoreHome.ContentBlock" content-title="{{ 'CorePluginsAdmin_WhyUsingATagManager'|translate }}">
                <p>
                    {{ 'CorePluginsAdmin_WhyUsingATagManagerDetails1'|translate }}
                    <br /><br />
                    {{ 'CorePluginsAdmin_WhyUsingATagManagerDetails2'|translate }}
                    <br /><br />
                    {{ 'CorePluginsAdmin_WhyUsingATagManagerDetails3'|translate }}
                    <br /><br /><br />
                    <a href="{{ 'https://matomo.org/docs/tag-manager'|trackmatomolink }}" rel="noreferrer noopener">{{ 'CorePluginsAdmin_TagManagerLearnMoreInUserGuide'|translate }}</a>
                </p>
            </div>
        </div>
        {% if isSuperUser %}
            <div class="col l4 m12 s12">
                <div vue-entry="CoreHome.ContentBlock" content-title="{{ 'CorePluginsAdmin_AreThereAnyRisks'|translate }}">

                    {{ 'CorePluginsAdmin_AreThereAnyRisksDetails1'|translate('<a rel="noreferrer noopener" href="https://en.wikipedia.org/wiki/Cross-site_scripting">', '</a>')|raw }}
                    <br /><br />
                    {{ 'CorePluginsAdmin_AreThereAnyRisksDetails2'|translate }}
                    <br /><br /><br />
                    <a href="{{ 'https://matomo.org/faq/tag-manager/website-security-considerations-when-using-a-tag-manager/'|trackmatomolink }}" rel="noreferrer noopener">{{ 'CorePluginsAdmin_TagManagerLearnMoreInUserGuide'|translate }}</a>
                </div>
            </div>
        {% endif %}
    </div>
    {{ actionBlock|raw }}
</div>
{% endblock %}
