{% 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.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; {{title}}{% endblock %}

{% block breadcrumbs %}<a href="{% url 'front_notice' object.id %}">{{title|truncatechars:30}}</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>
                    
                    <div class="contribution-frame">
                        <h2>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">
                        {% for term in contributions %}
                            <li class="notice-term term-translated" data-contribution-id="{{term.contribution_id}}">
                                <div class="contribution-vote">
                                    <a href="#" class="contribution-upvote" title="{% trans 'Votez pour ce terme' %}"></a>
                                    <a href="#" class="contribution-downvote" title="{% trans 'Votez contre ce terme' %}"></a>
                                </div>
                                <a href="{% url 'front_search' %}?q={{term.label|urlencode}}" data-dbpedia-uri="{{term.dbpedia_uri}}">{{term.label}}</a>
                            </li>
                        {% endfor %}
                        </ul>
                    </div>
                    
                </div>
            </div>
{% endblock %}
