{% extends "hdabo_base.html" %}
    {% block title %}HDA - BO : Tous les tags{% endblock %}

    {% block js_import %}
    {{block.super}}
    <script type="text/javascript" src="{{STATIC_URL}}hdabo/js/jquery-ui.min.js"></script>
    <script type="text/javascript" src="{{STATIC_URL}}hdabo/js/jquery.jeditable.js"></script>
    {% endblock %}
    
    {% block js_declaration %}
    {{block.super}}
    <script type="text/javascript">
    
    var global_csrf_token = "{{ csrf_token }}";
    var static_url = "{{STATIC_URL}}";
    var tag_up_down_url = "{% url hdabo.views.tag_up_down %}";
    var remove_tag_from_list_url = "{% url hdabo.views.remove_tag_from_list %}";
    var validate_wp_link_url = "{% url hdabo.views.validate_wp_link %}";
    var modify_tag_url = "{% url hdabo.views.modify_tag %}";
    var reset_wp_info_url = "{% url hdabo.views.reset_wikipedia_info %}";
    var add_tag_url = "{% url hdabo.views.add_tag %}";
    var remove_wp_link_url = "{% url hdabo.views.remove_wp_link %}";
    var update_tag_alias_url = "{% url hdabo.views.update_tag_alias %}";
    
    $(document).ready(function(){
        init_tags_events();
    });
    </script>
    {% endblock %}

    {% block css_import %}
    {{block.super}}
    <link rel="stylesheet" href="{{STATIC_URL}}hdabo/css/smoothness/jquery-ui-1.8.13.custom.css" type="text/css"/>
    {% endblock %}

    {% block css_declaration %}
    {{block.super}}
    <style type="text/css">
    .ui-autocomplete {
        max-height: 100px;
        overflow-y: auto;
        /* prevent horizontal scrollbar */
        overflow-x: hidden;
        /* add padding to account for vertical scrollbar */
        padding-right: 20px;
    }
    </style>
    {% endblock %}
    
    
    {% block content %}
    {{block.super}}
    <p>Tags {{ current_page.start_index }} à {{ current_page.end_index }} sur {{ nb_total }}</p>
    <div id="count_nav_top">
        <p><a href="{% url hdabo.views.all_tags num_page=1, nb_by_page=nb_by_page %}">&lt;&lt;</a>&nbsp;&nbsp;
           <a href="{% url hdabo.views.all_tags num_page=prev_page, nb_by_page=nb_by_page %}">&lt;</a>&nbsp;&nbsp;
           {{ num_page }}/{{ last_page }}&nbsp;&nbsp;
           <a href="{% url hdabo.views.all_tags num_page=next_page, nb_by_page=nb_by_page %}">&gt;</a>&nbsp;&nbsp;
           <a href="{% url hdabo.views.all_tags num_page=last_page, nb_by_page=nb_by_page %}">&gt;&gt;</a></p>
    </div>
    <input type="hidden" name="num_page" value="{{num_page}}" id="num_page" />
    <input type="hidden" name="nb_by_page" value="{{nb_by_page}}" id="nb_by_page" />
    <div id="tag_table_container">
    {% include "partial/all_tags_table.html" %}
    </div>
    <div id="count_nav_bottom">
        <p><a href="{% url hdabo.views.all_tags num_page=1, nb_by_page=nb_by_page %}">&lt;&lt;</a>&nbsp;&nbsp;
           <a href="{% url hdabo.views.all_tags num_page=prev_page, nb_by_page=nb_by_page %}">&lt;</a>&nbsp;&nbsp;
           {{ num_page }}/{{ last_page }}&nbsp;&nbsp;
           <a href="{% url hdabo.views.all_tags num_page=next_page, nb_by_page=nb_by_page %}">&gt;</a>&nbsp;&nbsp;
           <a href="{% url hdabo.views.all_tags num_page=last_page, nb_by_page=nb_by_page %}">&gt;&gt;</a></p>
    </div>
    {% endblock %}
