{% extends 'cloud/base.html' %}
{% load i18n %}
{% block title %}{{ paquete.Package }}{% endblock %}
{% block content %}
<div class="jumbotron">
    <div class="container-fluid">
        <div class="row-fluid dashboard_container">
            <div class="span8 dashboard_timeline">
                <div class="page-header">
                    <h1>{{ paquete.Package }}</h1>
                </div>
                {% if paquete.Maintainer %}
                    {% if paquete.Description %}
                    <span class="row-fluid bigger-150 lighter">
                        {{ paquete.Description }}
                    </span>
                    {% endif %}
                    {% if detalles %}
                    <h3 class="smaller">{% blocktrans %}This package appears in the following distributions of {{ tribus_distro }}:{% endblocktrans %}</h3>
                    <accordion close-others="oneAtATime">
                        {% for dists in detalles|dictsort:'version' %}
                        <accordion-group is-open="false">
                            <accordion-heading>
                                <i class="icon-chevron-right"></i> {{ tribus_distro }} {{dists.version}} ({{ dists.codename }})
                            </accordion-heading>
                            <tabset vertical="true" direction="'left'">
                                {% for arch in dists.Architectures.items %}
                                <tab>
                                    <tab-heading>
                                    <i class="icon-asterisk"></i> {{ arch.0 }}
                                    </tab-heading>
                                    {% include 'cloud/architectures.html' %}
                                </tab>
                                {% endfor %}
                            </tabset>
                        </accordion-group>
                        {% endfor %}
                    </accordion>
                    {% endif %}
                {% else %}
                    <span class="row-fluid bigger-150 lighter">
                        {% trans 'This is not a real package.' %}
                    </span>
                {% endif %}
            </div>
            <div class="span4 dashboard_panel">
                {% if paquete.Maintainer %}
                <div class="widget-box transparent">
                    <div class="widget-body">
                        <div class="widget-main">
                            <span class="cloud_avatar" style="background-image: url('http://screenshots.debian.net/screenshot/{{ paquete.Package }}')"></span>
                        </div>
                    </div>
                </div>
                <div class="widget-box">
                    <div class="widget-header padding-2">
                        <h3 class="smaller lighter black">
                            {% trans 'Package Information' %}
                        </h3>
                    </div>
                    <div class="widget-body">
                        <div class="widget-main padding-8">
                            <ul class="unstyled spaced">
                                <li>
                                    {% if paquete.Maintainer %}
                                    <h3 class="line-height-1 smaller">
                                        <i class="icon-group red"></i>
                                        {% trans 'Maintainer' %}
                                    </h3>
                                    <h4 class="line-height-1 lighter">{{ paquete.Maintainer }}</h4>
                                    {% endif %}
                                </li>
                                <li>
                                    {% if paquete.Section %}
                                    <h3 class="line-height-1 smaller">
                                        <i class="icon-bookmark red"></i>
                                        {% trans 'Section' %}
                                    </h3>
                                    <h4 class="line-height-1 lighter">{{ paquete.Section }}</h4>
                                    {% endif %}
                                </li>
                                <li>
                                    {% if paquete.Priority %}
                                    <h3 class="line-height-1 smaller">
                                        <i class="icon-dashboard red"></i>
                                        {% trans 'Priority' %}
                                    </h3>
                                    <h4 class="line-height-1 lighter">{{ paquete.Priority }}</h4>
                                    {% endif %}
                                </li>
                                <li>
                                    {% if paquete.Homepage %}
                                    <h3 class="line-height-1 smaller">
                                        <i class="icon-globe red"></i>
                                        {% trans 'Homepage' %}
                                    </h3>
                                    <h4 class="line-height-1 lighter">
                                        <a href="{{ paquete.Homepage }}" target="_blank">
                                            {{ paquete.Homepage }}
                                        </a>
                                    </h4>
                                    {% endif %}
                                </li>
                                <li>
                                    {% if paquete.Labels.all  %}
                                    <h3 class="line-height-1 smaller">
                                        <i class="icon-tag red"></i>
                                        {% trans 'Tags' %}
                                    </h3>
                                    <h4 class="line-height-1 lighter">
                                        {% for label in paquete.Labels.all %}
                                            {% if forloop.last %}
                                                <b> {{ label.Name }} </b> : {{ label.Tags.Value }} 
                                            {% else %}
                                                <b> {{ label.Name }} </b> : {{ label.Tags.Value }}, 
                                            {% endif %}
                                        {% endfor %}
                                    </h4>
                                    {% endif %}
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="widget-box">
                    <div class="widget-header padding-2">
                        <h3 class="smaller lighter black">
                            {% trans 'Debian Resources' %}
                        </h3>
                    </div>
                    <div class="widget-body">
                        <div class="widget-main padding-8">
                            <ul class="unstyled spaced">
                                <li>
                                    <i class="icon-circle red"></i>
                                    <a href="http://bugs.debian.org/{{ paquete.Package }}" target="_blank">
                                        {% trans 'Bug Tracking System' %}
                                    </a>
                                </li>
                                <li>
                                    <i class="icon-circle red"></i>
                                    <a href="http://packages.qa.debian.org/{{ paquete.Package }}" target="_blank">
                                        {% trans 'Package Tracking System' %}
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
                {% endif %}
            </div>
        </div>
    </div>
</div>
{% endblock %}
