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

{% block js_import %}
    {{block.super}}
    <script type="text/javascript" src="{{STATIC_URL}}jocondelab/js/front-search.js"></script>
{% endblock %}

{% block title %}JocondeLab &raquo; {% trans 'Multilingual search' %}{% endblock %}

{% block breadcrumbs %}&raquo; {% trans 'Multilingual search' %}{% endblock %}

{% block main %}
            <ul class="term-cloud">
                {% for word in words %}
                    <li style="font-size: {{word.font_size|unlocalize}}em">
                        <a href="#">{{word.label}} <span class="term-frequency">({{word.notice_count}})</span></a>
                    </li>
                {% endfor %}
            </ul>
            
            <ul class="notice-list clearfix">
                {% for notice in notices %}
                    <li class="notice-item" data-notice-id="{{notice.id}}">
                        <div class="notice-contents">
                            <img class="notice-image" alt="{{notice.imagetitle}}" title="{{notice.imagetitle}}" src="{{JOCONDE_IMG_BASE_URL}}{{ notice.image }}" />
                            <div class="notice-metadata">
                                {% if notice.title %}<h2>{% trans 'Title:' %} {{notice.title}}</h2>{% endif %}
                                {% if not notice.title and notice.denomination %}<h2>{% trans 'Denomination:' %} {{notice.denomination}}</h2>{% endif %}
                                {% if not notice.terms_by_thesaurus.AUTR and notice.author %}<h2>{% trans 'Author:' %} {{notice.author}}</h2>{% endif %}
                                <ul>
                                    {% for thesaurus, terms in notice.terms_by_thesaurus.items %}
                                     <li>
                                         <h3>{% trans thesaurus %}{% trans ':' %}</h3>
                                         <ul>
                                             {% for term in terms %}
                                                <li>{{term.locale_label}}</li>
                                             {% endfor %}
                                         </ul>
                                     </li>
                                    {% endfor %}
                                </ul>
                            </div>
                        </div>
                    </li>
                {% endfor %}
            </ul>
{% endblock %}
