{% extends "hdabo_base.html" %}
{% load static %}
{% load hdabo_tags %}
{% block title %}HDA - BO : Tous les dossiers{% endblock %}
    
{% block content %}
{{block.super}}
<p><a href="{% url 'add_or_update_folder' %}">Nouveau dossier</a></p>
<table>
    <tr>
	    <th>Url</th>
	    <th>Titre</th>
	    <th>Description</th>
	    <th>Liste</th>
	    <th>Éditer</th>
	    <th>Effacer</th>
    </tr>
    {% for f in folders %}
    <tr class="imageline {% cycle 'hdabooddline' 'hdaboevenline' %}">
        <td><a href="{{f.url}}" title="{{f.url}}" target="_blank">{{f.url|short_url}}</a></td>
        <td>{{f.title}}</td>
        <td>{{f.description}}</td>
        <td><ul>{% for d in f.datasheets.all %}<li>{{ d.title }}</li>{% endfor %}</ul></td>
        <td class="text_centered"><a href="{% url '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 '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 %}
