{% extends "po_projects/base.html" %}
{% load i18n crispy_forms_tags %}{% load url from future %}
{% block title %}{% trans "Create a new project" %}{% endblock %}

{% block content %}
    <hr>
    <h3>{% trans "Project catalogs" %}</h3>
    <ul class="list-group">{% for item in project_version.catalog_set.all %}
        <li>
            <h4><a href="{% url 'po_projects:catalog-details' slug=project.slug locale=item.locale %}">{{ item }}</a> <small>{{ item.locale }}</small></h4>
        </li>
    {% empty %}
        <li class="empty">There is no translation yet</li>
    {% endfor %}</ul>
    
    <a href="#" data-dropdown="download-dropdown" class="button dropdown">{% trans "Download archive" %}</a>
    <ul id="download-dropdown" data-dropdown-content class="f-dropdown">{% for item in AVAILABLE_CATALOG_FILENAMES %}
        <li><a href="{% url 'po_projects:project-download' slug=project.slug %}?kind={{ item }}">{% blocktrans with catalog_filename_kind=item|title %}For {{ catalog_filename_kind }}{% endblocktrans %}</a></li>
    {% endfor %}</ul>
    
    {% if perms.po_projects.change_project %}<a href="{% url 'po_projects:project-update' slug=project.slug %}" class="button">{% trans "Update" %}</a>{% endif %}
    
    {% if perms.po_projects.add_catalog %}<hr>
    <h4>{% trans "Add new catalog" %}</h4>
    {% crispy form %}{% endif %}
    
    <hr>
    <h3>{% trans "Messages to translate" %} ({{ project.get_current_version.templatemsg_set.count }})</h3>
    <ol>{% for item in project.get_current_version.templatemsg_set.all %}
        <li>
            <blockquote>
                <p>{{ item.message|safe }}
                {% comment %}<cite>{{ item.locations }}</cite>{% endcomment %}</p>
            </blockquote>
        </li>
    {% endfor %}</ol>
{% endblock %}
