{% extends "jocondelab/base.html" %}
{% load core_extras %}
{% load i18n %}

    {% block js_declaration %}
    {{block.super}}
    <script type="text/javascript">
    $(document).ready(function(){
        init_filter();
    });
    </script>
    {% endblock %}

    {% block content %}
    <div id="term-filter-top-container">{% include "jocondelab/partial/filter.html" %}</div>
    <div id="top-pagination">{% include "jocondelab/partial/pagination.html" %}</div>
    <div id="term-list-table">
    <table >
        <thead>
            <tr><th>{% trans 'Label' %}</th><th>{% trans 'thesaurus' %}</th><th>{% trans 'level' %}</th><th>{% trans 'wikipedia' %}</th><th>{% trans 'dbpedia' %}</th><th>{% trans 'valid.' %}</th><th>{% trans 'nb notice' %}</th></tr>
        </thead>
        <tbody>
        {% for term in object_list %}
        <tr class="{% cycle 'hdabooddline' 'hdaboevenline' %}">
            <td class="{{term.url_status_text}} term-list-label" {% if show_levels %}style="padding-left: {{ term.level }}em"{% endif %} ><a href="{% url 'term' term_id=term.id %}{% append_to_param %}">{{ term.label }}</a></td>
            <td class="text_centered">{{ term.thesaurus.label }}</td>
            <td class="text_centered">{{ term.level }}</td>            
            <td class="text_centered">
                {% if term.wikipedia_url and term.wikipedia_url != ""  %}
                <a href="{{term.wikipedia_url}}" target="_blank"><img src="{{STATIC_URL}}jocondelab/img/arrow_right.png" ></a>
                {% else %}
                <a href="http://fr.wikipedia.org/w/index.php?search={{term.label}}" target="_blank"><img src="{{STATIC_URL}}jocondelab/img/wikipedia_search.png" ></a>
                {% endif %}
            </td>
            <td class="text_centered">
                {% if term.dbpedia_uri and term.dbpedia_uri != ""  %}
                <a href="{{term.dbpedia_uri}}" target="_blank"><img src="{{STATIC_URL}}jocondelab/img/arrow_green_right.png" ></a>
                {% else %}
                &nbsp;
                {% endif %}
            </td>
            <td class="text_centered">
                {% if term.validated %}
                <input type="checkbox" checked="checked" readonly="readonly" disabled="disabled"/>
                {% else %}
                <input type="checkbox" readonly="readonly" disabled="disabled"/>
                {% endif %}
            </td>
            <td class="text_right_aligned">
                {{ term.nb_notice }}
            </td>
         </tr>
        {% endfor %}
        </tbody>
    </table>
    </div>
    {% endblock %}