{% extends 'admin.twig' %}

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

{% block content %}
    <div class="extendPlatform">

        <div class="ui-confirm" id="installPluginByUpload">
            <h2>{{ 'CorePluginsAdmin_TeaserExtendPiwikByUpload'|translate }}</h2>

            <p class="description"> {{ 'CorePluginsAdmin_AllowedUploadFormats'|translate }} </p>

            <form enctype="multipart/form-data"
                  method="post"
                  id="uploadPluginForm"
                  action="{{ linkTo({'action':'uploadPlugin', 'nonce': installNonce}) }}">
                <input type="file" name="pluginZip">
                <br />
                <input class="startUpload" type="submit" value="{{ 'CorePluginsAdmin_UploadZipFile'|translate }}">
            </form>
        </div>

        <div class="introduction">

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

            <p>{{ 'CorePluginsAdmin_DownloadAndInstallPluginsFromMarketplace'|translate("<a href='?module=Proxy&action=redirect&url=http://plugins.piwik.org/' target='_blank'>", "</a>")|raw }}</p>

            {% set marketplaceSellPluginSubject = 'CorePluginsAdmin_MarketplaceSellPluginSubject'|translate %}
            <em>{{ 'CorePluginsAdmin_GetEarlyAccessForPaidPlugins'|translate("<a href='mailto:hello@piwik.org?subject=" ~ marketplaceSellPluginSubject ~ "'>", "</a>")|raw }}</em>
        </div>

        <div>
            <div class="byPlugins">
                <h3 class="header">{{ 'CorePluginsAdmin_GetNewFunctionality'|translate }}</h3>
                <span class="callToAction">{{ 'CorePluginsAdmin_ByInstallingNewPluginFromMarketplace'|translate("<a href=" ~ linkTo({'action':'browsePlugins', 'sort': ''}) ~ ">", "</a>")|raw }}</span>

                <p>
                    <a href="{{ linkTo({'action':'browsePlugins', 'sort': ''}) }}"><img class="teaserImage" title="{{ 'CorePluginsAdmin_InstallNewPlugins'|translate }}" alt="{{ 'CorePluginsAdmin_InstallNewPlugins'|translate }}" src="plugins/CorePluginsAdmin/images/plugins.png"/></a>
                </p>

                <span class="callToAction">
                    {{ 'CorePluginsAdmin_ByWritingOwnPlugin'|translate('<a href="http://developer.piwik.org/guides/getting-started-part-1" target="_blank">', '</a>')|raw }}
                    {% if isSuperUser %}
                        <br/>{{ 'CorePluginsAdmin_OrByUploadingAPlugin'|translate('<a href="#" class="uploadPlugin">', '</a>')|raw }}
                    {% endif %}
                </span>

            </div>

            <div class="byThemes">
                <h3 class="header">{{ 'CorePluginsAdmin_EnjoyAnotherLookAndFeelOfThemes'|translate }}</h3>
                <span class="callToAction">{{ 'CorePluginsAdmin_ByInstallingNewThemeFromMarketplace'|translate("<a href=" ~ linkTo({'action':'browseThemes', 'sort': ''}) ~ ">", "</a>")|raw }}</span>

                <p>
                    <a href="{{ linkTo({'action':'browseThemes', 'sort': ''}) }}"><img class="teaserImage" alt="{{ 'CorePluginsAdmin_InstallNewThemes'|translate }}" title="{{ 'CorePluginsAdmin_InstallNewThemes'|translate }}" src="plugins/CorePluginsAdmin/images/themes.png"/></a>
                </p>

                <span class="callToAction">
                    {{ 'CorePluginsAdmin_ByDesigningOwnTheme'|translate('<a href="http://developer.piwik.org/guides/theming" target="_blank">', '</a>')|raw }}
                    {% if isSuperUser %}
                        <br />{{ 'CorePluginsAdmin_OrByUploadingATheme'|translate('<a href="#" class="uploadPlugin">', '</a>')|raw }}
                    {% endif %}
                </span>
            </div>
        </div>
    </div>
{% endblock %}
