{% extends "po_projects/base.html" %}
{% load i18n %}{% load url from future %}
{% block title %}{% trans "Projects" %}{% endblock %}

{% block content %}
    <div class="panel panel-headed radius">
        <h3>{% trans "Projects list" %}</h3>
        <ul class="list-group">{% for project_item in project_list %}
            <li>{% with project_item.get_current_version as current_version %}
                <h4><a href="{% url 'po_projects:project-details' slug=project_item.slug %}">{{ project_item.name }}</a> <small>v{{ current_version.version }}</small></h4>
                <p>{{ project_item.description }}</p>
                <ul class="inline-list strong-items">
                    <li><strong>{% trans "catalog" %} :</strong> {{ current_version.catalog_set.all.count }}</li>
                    <li><strong>{% trans "message" %} :</strong> {{ current_version.templatemsg_set.all.count }}</li>
                </ul>
            {% endwith %}</li>
        {% empty %}
        <li class="empty">{% trans "There is no project yet" %}</li>
        {% endfor %}</ul>
    </div>
    
    {% if perms.po_project.add_project %}<hr>
    <p class="text-center">
        <a href="{% url 'po_projects:project-create' %}" class="button large">{% trans "Start a new project" %}</a>
    </p>{% endif %}
{% endblock %}
