{% extends '@CoreUpdater/layout.twig' %}

{% block content %}
<br/>
<p><strong>{{ 'CoreUpdater_ThereIsNewVersionAvailableForUpdate'|translate }}</strong></p>

{% if can_auto_update %}
    <p>{{ 'CoreUpdater_YouCanUpgradeAutomaticallyOrDownloadPackage'|translate(piwik_new_version) }}</p>
{% else %}
    <p>{{ 'Installation_SystemCheckAutoUpdateHelp'|translate }}</p>
    <p>{{ 'CoreUpdater_YouMustDownloadPackageOrFixPermissions'|translate(piwik_new_version) }}
        {{ makeWritableCommands|raw }}
    </p>
{% endif %}

{% if can_auto_update %}
<form id="oneclickupdate" action="index.php">
    <input type="hidden" name="module" value="CoreUpdater"/>
    <input type="hidden" name="action" value="oneClickUpdate"/>
    <input type="submit" class="submit" value="{{ 'CoreUpdater_UpdateAutomatically'|translate }}"/>
    {% endif %}
    <a style="margin-left:50px;" class="submit button"
       href="{{ piwik_latest_version_url }}?cb={{ piwik_new_version }}">{{ 'CoreUpdater_DownloadX'|translate(piwik_new_version) }}</a><br/>
    {% if can_auto_update %}
</form>
{% endif %}
<br/>
<a href="index.php">&laquo; {{ 'General_BackToPiwik'|translate }}</a>
{% endblock %}

