
{% extends "campaign_monitor/base.html" %}
{% load base_tags %}
{% load perm_tags %}
{% load campaign_monitor_tags %}
{% load i18n %}

{% block title %}{{ template.name }}{% endblock %}

{% block extra_head %}
{{ block.super }}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/campaign_monitor.css">
{% endblock %}

{% block body %}

<div class="t">
    {% template_nav request.user %}
    <div class="template-wrap">

        <div class="options options-search">
            <div class="quick-options">
                {% template_options request.user template %}
            </div>
        </div>
        <h1>{{ template.name }}</h1>
        <div class="content">
            <div>
                {% if template.cm_screenshot_url %}
                    <p><b>{% trans "Screenshot:" %}</b></p><a href="{{ template.cm_preview_url }}">
                        <img src="{{ template.cm_screenshot_url }}">
                    </a>
                {% else %}
                    <p><b>{% trans "Screenshot:" %}</b>{% trans " Not Available" %}</p>
                {% endif %}
                {% if template.html_file %}
                    <p><b>{% trans "Html File:" %}</b> <a href="{{ template.get_html_original_url }}">{% trans "Download" %}</a></p>
                {% endif %}
                {% if template.zip_file %}
                    <p><b>{% trans "Zip File:" %}</b><a href="{{ template.get_zip_url }}">{% trans "Download" %}</a></p>
                {% endif %}
                {% if template.screenshot_file %}
                    <p><b>{% trans "Screenshot File:" %}</b><a href="{{ template.get_screenshot_url }}">{% trans "Download" %}</a></p>
                {% endif %}
                <p>
                    Click <a href="{{ template.cm_preview_url }}">here</a>
                    to view the rendered version on Campaign Monitor.
                </p>
                {% if template.html_file %}
                <p>
                    Click <a href="{% url campaign_monitor.template_render template.template_id %}">here</a>
                    to view a rendered version of the html with the latest data.
                </p>
                <p>
                    Click <a href="{% url campaign_monitor.template_update template.template_id %}">here</a>
                    to use the same files to update this template.
                </p>
                {% endif %}
            </div>
            <div style="clear: both"></div>
        </div>
    </div>

</div>
{% endblock %}
