Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion moderation/templates/moderation/tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,29 @@
{% block title %}Arbre de modération{% endblock %}

{% block content %}
{% partialdef tree_node %}
<li class="py-1">
<div class="d-flex flex-wrap align-items-baseline gap-1">
{% if not is_root %}
<span class="border-top flex-shrink-0 align-self-center" style="width: 1rem;"></span>
{% endif %}
<strong><a href="{% url 'moderation_profile' node.user.netid %}">{{ node.user.netid }}</a></strong>
<span class="text-muted">{{ node.user.name }}</span>
<span class="text-muted small">({{ node.user.action_count }} action{{ node.user.action_count|pluralize }} de modération, {{ node.user.document_count }} document{{ node.user.document_count|pluralize }})</span>
{% if node.user.is_staff %}
<span class="badge text-bg-danger ms-1">Admin</span>
{% endif %}
</div>
{% if node.children %}
<ul class="list-unstyled border-start ps-0 ms-2 mb-0">
{% for child in node.children %}
{% with node=child is_root=False %}{% partial tree_node %}{% endwith %}
{% endfor %}
</ul>
{% endif %}
</li>
{% endpartialdef tree_node %}

<div class="container-xl mt-4">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
Expand All @@ -21,7 +44,7 @@ <h1 class="h3 mb-4">Arbre de modération</h1>
<div>
<ul class="list-unstyled ps-0 mb-0">
{% for root in tree %}
{% include "moderation/tree_node.html" with node=root is_root=True %}
{% with node=root is_root=True %}{% partial tree_node %}{% endwith %}
{% endfor %}
</ul>
</div>
Expand Down
20 changes: 0 additions & 20 deletions moderation/templates/moderation/tree_node.html

This file was deleted.

Loading