{% extends "jocondelab/front_base.html" %}
{% load i18n %}
{% load jlutils %}

{% block js_import %}
    {{block.super}}
    <script type="text/javascript" src="{{STATIC_URL}}jocondelab/lib/jquery.magnific-popup.min.js"></script>
{% endblock %}

{% block js_declaration %}
    {{block.super}}
    <script type="text/javascript">
        var notice_id = "{{object.id}}",
            csrf_token = "{{csrf_token}}";
        urls.ajax_contribute = "{% url 'ajax_contribute' %}";
        urls.upvote = "{% url 'ajax_upvote' %}";
        urls.downvote = "{% url 'ajax_downvote' %}";
        urls.wikipedia = {{wikipedia_urls|safe}};
    </script>
    <script type="text/javascript" src="{{STATIC_URL}}jocondelab/js/front-notice.js"></script>
{% endblock %}

{% block css_import %}
    {{block.super}}
    <link rel="stylesheet" href="{{STATIC_URL}}jocondelab/lib/magnific-popup.css" type="text/css" />
{% endblock %}

{% block css_declaration %}
    {{block.super}}
    <link rel="stylesheet" href="{{STATIC_URL}}jocondelab/css/front-notice.css" type="text/css" />
{% endblock %}

{% block title %}JocondeLab &raquo; {% trans "Détail d'une notice" %}{% endblock %}

{% block breadcrumbs %}<a href="{% url 'front_notice' object.id %}">{% trans "Détail d'une notice" %}</a>{% endblock %}

{% block main %}
            <ul class="notice-images">
                {% for img in images %}
                <li>
                    <a href="{{img}}" title="{{title}}">
                        <img src="{{img}}" />
                    </a>
                </li>
                {% endfor %}
            </ul>
            <div class="notice-colright-wrapper">
                <div class="notice-colright">
                    <table class="notice-datasheet">
                        {% show_datasheet_row 'AUTR' row_class='notice-title' %}
                        {% show_datasheet_row 'ECOL' row_class='notice-marginabove' %}
                        {% show_datasheet_row 'DOMN' row_class='notice-marginabove' %}
                    </table>
                    <h3 class="notice-termgroup">{% trans 'Désignation' %}</h3>
                    <table class="notice-datasheet">
                        {% show_datasheet_row 'TITR' row_class='notice-title' %}
                        {% show_datasheet_row 'APPL' row_class='notice-title' %}
                        {% show_datasheet_row 'DENO' row_class='notice-title' %}
                    {% if object.repr or object.srep %}
                    </table>
                    <h3 class="notice-termgroup">{% trans 'Sujet représenté' %}</h3>
                    <table class="notice-datasheet">
                        {% show_datasheet_row 'REPR' %}
                        {% show_datasheet_row 'SREP' %}
                    {% endif %}
                    {% if object.peri or object.mill or object.epoq %}
                    </table>
                    <h3 class="notice-termgroup">{% trans 'Datation' %}</h3>
                    <table class="notice-datasheet">
                        {% show_datasheet_row 'PERI' %}
                        {% show_datasheet_row 'MILL' %}
                        {% show_datasheet_row 'EPOQ' %}
                    {% endif %}
                        {% show_datasheet_row 'TECH' row_class='notice-marginabove' %}
                        {% show_datasheet_row 'DIMS' row_class='notice-marginabove' %}
                    {% if object.lieux or object.decv %}
                    </table>
                    <h3 class="notice-termgroup">{% trans 'Provenance' %}</h3>
                    <table class="notice-datasheet">
                        {% show_datasheet_row 'LIEUX' %}
                        {% show_datasheet_row 'DECV' %}
                    {% endif %}
                        {% show_datasheet_row 'HIST' row_class='notice-marginabove' %}
                        {% show_datasheet_row 'LOCA' row_class='notice-marginabove' %}
                        {% show_datasheet_row 'COPY' row_class='notice-small notice-marginabove' %}
                        {% show_datasheet_row 'PHOT' row_class='notice-small' %}
                    </table>
                    
                    <p class="notice-jocondelink">
                        <a href="{{JOCONDE_NOTICE_BASE_URL}}{{ notice.ref }}" target="_blank">{% trans 'Visiter sur le portail Joconde' %}</a>
                    </p>
{% block contribution %}
                    <div class="contribution-frame folksonomy-frame">
                        <h2>{% trans 'Contribution (Folksonomie)' %}</h2>
                        <input class="notice-contribution-field" type="text" size="60" placeholder="{% trans 'Complétez les mots-clés de la fiche' %}" />
                        <ul class="notice-term-list notice-contribution-list">
                        {% for term in contributions %}
                            {% include "jocondelab/partial/contributed_item.html" %}
                        {% endfor %}
                        </ul>
                        <p class="button-links">
                            <a href="{% url 'front_describe' object.id %}">{% trans "Aidez-nous à approfondir l'iconographie" %}</a>
                        </p>
                    </div>
{% endblock %}

                </div>
            </div>
{% endblock %}
