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

{% 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" 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' notice.id %}">{{title|truncatechars:30}}</a>{% endblock %}

{% block main %}

            <ul class="notice-images">
                {% for img in images %}
                <li>
                    <a href="{{JOCONDE_IMG_BASE_URL}}{{img}}" title="{{title}}">
                        <img src="{{JOCONDE_IMG_BASE_URL}}{{img}}" />
                    </a>
                </li>
                {% endfor %}
            </ul>
            
            <table class="notice-datasheet">
            {% if notice.titr %}
                <tr class="notice-title">
                    <th>{% trans 'Title:' %}</th>
                    <td>{{notice.titr}}</td>
                </tr>
            {% endif %}
            {% if notice.deno %}
                <tr {% if not notice.titr %}class="notice-title"{% endif %}>
                    <th>{% trans 'Denomination:' %}</th>
                    <td>{{notice.deno}}</td>
                </tr>
            {% endif %}
            {% for thesaurus, terms in terms_by_thesaurus.items %}
                <tr>
                     <th>{% trans thesaurus %}{% trans ':' %}</th>
                     <td>
                         <ul class="datasheet-contents notice-term-list">
                         {% for termtype, terms in terms.items %}
                            {% for term in terms %}
                            <li class="notice-term term-{{termtype}}"><a href="{% url 'multilingual_search' %}?q={{term.locale_label|urlencode}}" data-dbpedia-uri="{{term.dbpedia_uri}}">{{term.locale_label}}</a></li>
                            {% endfor %}
                         {% endfor %}
                         </ul>
                     </td>
                </tr>
            {% endfor %}
            {% if notice.desc %}
                <tr>
                    <th>{% trans 'Description:' %}</th>
                    <td>{{notice.desc}}</td>
                </tr>
            {% endif %}
            {% if notice.hist %}
                <tr>
                    <th>{% trans 'History:' %}</th>
                    <td>{{notice.hist}}</td>
                </tr>
            {% endif %}
            {% if notice.loca %}
                <tr>
                    <th>{% trans 'Conservation location:' %}</th>
                    <td>{{notice.loca}}</td>
                </tr>
            {% endif %}
            {% if notice.copy %}
                <tr class="datasheet-small">
                    <th>{% trans 'Datasheet rights:' %}</th>
                    <td>{{notice.copy}}</td>
                </tr>
            {% endif %}
            {% if notice.phot %}
                <tr class="datasheet-item datasheet-small">
                    <th>{% trans 'Images rights:' %}</th>
                    <td>{{notice.phot}}</td>
                </tr>
            {% endif %}
            </table>
            
{% endblock %}
