{% extends "base.html" %}
{% load static %}
{% load hdabo_tags %}
{% block title %}HdaLab - Éditorialisation : Tous les dossiers{% endblock %}

{% block css_import %}
{{block.super}}
<link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/profile.css' %}" />
{% endblock %}

{% block main_content %}
<p><a href="{% url 'hdalab_add_or_update_folder' %}">Nouveau dossier</a></p>
<table>
    <tr class="border_bottom">
        <th>Titre</th>
	    <th>Url</th>
	    <th>Description</th>
	    <th>Liste</th>
	    <th>Éditer</th>
	    <th>Effacer</th>
    </tr>
    {% for f in folders %}
    <tr class="border_bottom">
        <td>{{f.title}}</td>
        <td><a href="{{f.url}}" title="{{f.url}}" target="_blank">{{f.url|short_url}}</a></td>
        <td>{{f.description}}</td>
        <td class="list"><ul>{% for d in f.datasheets.all %}<li>{{ d.title }}</li>{% endfor %}</ul></td>
        <td class="text_centered"><a href="{% url 'hdalab_add_or_update_folder' folder_pk=f.pk %}"><img src="{% static 'hdabo/img/pen.png' %}"/></a></td>
        <td class="text_centered"><a class="" href="{% url 'hdalab_delete_folder' folder_pk=f.pk %}" onclick="return confirm('Êtes-vous sûr(e) ? Cette action est définitive.')"><img src="{% static 'hdabo/img/tag_remove.png' %}"/></a></td>
    </tr>
    {% endfor %}
</table>
{% endblock %}
