{% 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>
            
            <table class="notice-datasheet">
            
            {% show_datasheet_row 'AUTR' rowclass='notice-title' %}
                        
            {% show_datasheet_row 'ECOL' %}
            
            {% show_datasheet_row 'DOMN' %}
            
            {% show_datasheet_row 'TITR' rowclass='notice-title' %}
            {% show_datasheet_row 'APPL' rowclass='notice-title' %}
            {% show_datasheet_row 'DENO' rowclass='notice-title' %}
            
            {% show_datasheet_row 'REPR' %}
            {% show_datasheet_row 'SREP' %}
            
            {% show_datasheet_row 'PERI' %}
            {% show_datasheet_row 'MILL' %}
            {% show_datasheet_row 'EPOQ' %}
            
            {% show_datasheet_row 'TECH' %}
            
            {% show_datasheet_row 'DIMS' %}
            
            {% show_datasheet_row 'LIEUX' %}
            
            {% show_datasheet_row 'DECV' %}
            
            {% show_datasheet_row 'HIST' %}
            
            {% show_datasheet_row 'LOCA' %}
            
            {% show_datasheet_row 'COPY' %}
            {% show_datasheet_row 'PHOT' %}

            </table>
            
            <h2 style="float: left; padding: 20px 20px 0; font-size: 18px; font-weight : 800;">Contribuer</h2>
            
            <table class="notice-datasheet">
                <tr>
                    <th>{% trans 'REPR' context 'Thesaurus label' %}{% trans ':' %}</th>
                    <td>
                        <input class="notice-contribution-field" data-thesaurus="REPR" type="text" size="60" placeholder="{% trans 'What do you see in this work?' %}" />
                        <ul class="notice-term-list">
                        {% for term in contributions.REPR %}
                            <li class="notice-term term-translated"><a href="{% url 'front_search' %}?q={{term.label|urlencode}}" data-dbpedia-uri="{{term.dbpedia_uri}}">{{term.label}}</a></li>
                        {% endfor %}
                        </ul>
                    </td>
                </tr>
                <tr>
                    <th>{% trans 'SREP' context 'Thesaurus label' %}{% trans ':' %}</th>
                    <td>
                        <input class="notice-contribution-field" data-thesaurus="SREP" type="text" size="60" placeholder="{% trans 'Which other work is a source for this work?' %}" />
                        <ul class="notice-term-list">
                        {% for term in contributions.SREP %}
                            <li class="notice-term term-translated"><a href="{% url 'front_search' %}?q={{term.label|urlencode}}" data-dbpedia-uri="{{term.dbpedia_uri}}">{{term.label}}</a></li>
                        {% endfor %}</ul>
                    </td>
                </tr>
            </table>
{% endblock %}
