{% extends "agenda_culturel/page.html" %}

{% block title %}{% block og_title %}Import récurrent #{{ object.pk }}{% endblock %}{% endblock %}

{% load cat_extra %}
{% load utils_extra %}
{% load tag_extra %}

{% block entete_header %}
    {% css_categories %}
{% endblock %}

{% block sidemenu-bouton %}
<li><a href="#contenu-principal" aria-label="Aller au contenu">{% picto_from_name "chevron-up" %}</a></li>
<li><a href="#sidebar" aria-label="Aller au menu latéral">{% picto_from_name "chevron-down" %}</a></li>
{% endblock %}

{% block content %}
<div class="grid two-columns">
    <article>
        <header>
            <div class="buttons left-buttons">
                <a href="{% url 'recurrent_imports' %}" role="button">&lt; Tous les imports récurrents</a>    
                <a href="{% url 'recent' %}?import_sources={{ object.pk }}" role="button">Voir les événements {% picto_from_name "calendar" %}</a>
            </div>
            <div class="buttons slide-buttons">
                <a href="{% url 'run_rimport' object.pk %}" role="button">Exécuter {% picto_from_name "download-cloud" %}</a>
                <a href="{% url 'edit_rimport' object.pk %}" role="button">Modifier {% picto_from_name "edit" %}</a>
                <a href="{% url 'delete_rimport' object.pk %}" role="button">Supprimer {% picto_from_name "trash" %}</a>
            </div>

            <h1>Import récurrent #{{ object.pk }}</h1>
            <ul>
                <li><strong>Nom&nbsp;:</strong> {{ object.name }}</li> 
                <li><strong>Processeur&nbsp;:</strong> {{ object.processor }}</li> 
                <li><strong>Téléchargeur&nbsp;:</strong> {{ object.downloader }}</li> 
                <li><strong>Recurrence&nbsp;:</strong> {{ object.recurrence }}</li> 
                <li><strong>Source&nbsp;:</strong> <a href="{{ object.source }}">{{ object.source }}</a></li>
                <li><strong>Adresse naviguable&nbsp;:</strong> <a href="{{ object.browsable_url }}">{{ object.browsable_url }}</a></li>
                <li><strong>Valeurs par défaut&nbsp;:</strong>
                    <ul>
                        <li><strong>Publié&nbsp;:</strong> {{ object.defaultPublished|yesno:"Oui,Non" }}</li>
                        {% if object.defaultLocation %}<li><strong>Localisation{% if object.forceLocation %} (forcée){% endif %}&nbsp;:</strong> {{ object.defaultLocation }}</li>{% endif %}
                        <li><strong>Catégorie&nbsp;:</strong> {{ object.defaultCategory }}</li>
                        {% if object.defaultOrganiser %}<li><strong>Organisateur&nbsp;:</strong> <a href="{{ object.defaultOrganiser.get_absolute_url }}">{{ object.defaultOrganiser }}</a></li>{% endif %}
                        <li><strong>Étiquettes&nbsp;:</strong> 
                            {% for tag in object.defaultTags %}
                            <a href="{% url 'view_tag' tag %}">{{ tag|tw_highlight }}</a>{% if not forloop.last %}, {% endif %}
                            {% endfor %}
                        </li>
                    </ul>                
                </li>                
            </ul>

        </header>

        {% include "agenda_culturel/batch-imports-inc.html" with objects=paginator_filter %}

        <footer>
            <span>
                {% include 'agenda_culturel/paginator.html' %}
            </span>
        </footer>
    </article>


  
    {% include "agenda_culturel/side-nav.html" with current="rimports" %}
</div>
{% endblock %}