{% 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' 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">
            {% if object.titr %}
                <tr class="notice-title">
                    <th>{% trans 'Title:' %}</th>
                    <td>{{object.titr}}</td>
                </tr>
            {% endif %}
            {% if object.deno %}
                <tr {% if not object.titr %}class="notice-title"{% endif %}>
                    <th>{% trans 'Denomination:' %}</th>
                    <td>{{object.deno}}</td>
                </tr>
            {% endif %}
            {% for thesaurus, terms in terms_by_thesaurus.items %}
                <tr>
                     <th>{% trans thesaurus context 'Thesaurus label' %}{% 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 'front_search' %}?q={{term.locale_label|urlencode}}" data-dbpedia-uri="{{term.dbpedia_uri}}">{{term.locale_label}}</a></li>
                            {% endfor %}
                         {% endfor %}
                         </ul>
                     </td>
                </tr>
            {% endfor %}
            {% if object.desc %}
                <tr>
                    <th>{% trans 'Description:' %}</th>
                    <td>{{object.desc}}</td>
                </tr>
            {% endif %}
            {% if object.hist %}
                <tr>
                    <th>{% trans 'History:' %}</th>
                    <td>{{object.hist}}</td>
                </tr>
            {% endif %}
            {% if object.loca %}
                <tr>
                    <th>{% trans 'Conservation location:' %}</th>
                    <td>{{object.loca}}</td>
                </tr>
            {% endif %}
            {% if object.copy %}
                <tr class="datasheet-small">
                    <th>{% trans 'Datasheet rights:' %}</th>
                    <td>{{object.copy}}</td>
                </tr>
            {% endif %}
            {% if object.phot %}
                <tr class="datasheet-item datasheet-small">
                    <th>{% trans 'Images rights:' %}</th>
                    <td>{{object.phot}}</td>
                </tr>
            {% endif %}
            </table>
            
{% endblock %}
