37 lines
1.4 KiB
HTML
37 lines
1.4 KiB
HTML
{% extends "base.html" %}
|
||
{% block content %}
|
||
<div class="card">
|
||
<h2 style="margin-top:0">Catalogue de playbooks</h2>
|
||
<form method="get" class="row">
|
||
<input type="text" name="q" placeholder="Rechercher…" value="{{ q or '' }}" style="flex:1">
|
||
<select name="sort">
|
||
<option value="mtime" {% if sort=='mtime' %}selected{% endif %}>Tri: récents</option>
|
||
<option value="name" {% if sort=='name' %}selected{% endif %}>Tri: nom</option>
|
||
<option value="size" {% if sort=='size' %}selected{% endif %}>Tri: taille</option>
|
||
</select>
|
||
<button type="submit" class="secondary">Appliquer</button>
|
||
</form>
|
||
</div>
|
||
|
||
{% for domain, items in grouped.items() %}
|
||
<div class="card">
|
||
<h3 style="margin-top:0">{{ domain }} <span class="badge">{{ items|length }} playbook(s)</span></h3>
|
||
<table class="table">
|
||
<tr><th>Nom</th><th>Taille</th><th>Modifié</th><th></th></tr>
|
||
{% for pb in items %}
|
||
<tr>
|
||
<td>{{ pb.name }}</td><td>{{ pb.size_h }}</td><td>{{ pb.mtime_h }}</td>
|
||
<td style="text-align:right">
|
||
<a class="badge" href="{{ url_for('user_run', domain=domain, name=pb.name) }}">Lancer</a>
|
||
</td>
|
||
</tr>
|
||
{% endfor %}
|
||
</table>
|
||
</div>
|
||
{% endfor %}
|
||
|
||
{% if not grouped %}
|
||
<div class="card small">Aucun playbook disponible. Demandez à l’admin d’en charger un via la page d’administration.</div>
|
||
{% endif %}
|
||
{% endblock %}
|