Skip to content

Commit

Permalink
wip to rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentporte committed Aug 8, 2024
1 parent abf6d36 commit dad01bd
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 20 deletions.
6 changes: 2 additions & 4 deletions lacommunaute/templates/forum/forum_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@
<div class="s-title-01__container container">
<div class="s-title-01__row row">
<div class="s-title-01__col col-12">
{% include "forum/partials/tags.html" with tags=forum.tags.all only %}
<h1>{{ forum.name }}</h1>
{% if user.is_superuser %}
<a href="{% url 'forum_extension:edit_forum' forum.slug forum.id %}"><small>Mettre à jour</small></a>
{% endif %}
{% if forum.short_description %}<h2 class="mt-3">{{ forum.short_description }}</h2>{% endif %}
{% if forum.short_description %}<h2 class="mt-3 fs-base">{{ forum.short_description }}</h2>{% endif %}
</div>
</div>
</div>
Expand Down
9 changes: 1 addition & 8 deletions lacommunaute/templates/forum/forum_documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,7 @@
<div class="col-12 col-lg-9">
<div class="row align-items-sm-center mb-3">
<div class="col-12 col-sm" id="updated_area">
{% if forum.certified %}
<span class="badge badge-xs rounded-pill bg-communaute text-white text-decoration-none">
<i class="ri-checkbox-circle-fill"></i>
Certifiée par la communauté de l'inclusion le {{ forum.updated|date:"d/m/Y" }}
</span>
{% else %}
<span class="fs-sm">Fiche mise à jour le {{ forum.updated|date:"d/m/Y" }}</span>
{% endif %}
{% include "forum/partials/updated_certified.html" with forum=forum user=user only %}
</div>
<div class="col-12 col-sm-auto">
{% include "partials/upvotes.html" with obj=forum kind="forum" %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{% extends "forum/forum_detail.html" %}
{% block forum_head_content %}
{{ block.super }}
{% if user.is_superuser %}
<a href="{% url 'forum_extension:edit_forum' forum.slug forum.id %}"><small>Mettre à jour</small></a>
{% endif %}
{% endblock %}
{% block subforum_list %}
<div class="row mt-4" id="documentation-category-subforums">
{% for node in sub_forums.top_nodes %}
Expand Down
5 changes: 5 additions & 0 deletions lacommunaute/templates/forum/partials/tags.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="mb-3">
{% for tag in tags %}
<span class="badge badge-md rounded-pill bg-info-lighter text-info">{{ tag.name }}</span>
{% endfor %}
</div>
11 changes: 11 additions & 0 deletions lacommunaute/templates/forum/partials/updated_certified.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% if forum.certified %}
<span class="badge badge-md rounded-pill bg-communaute-light text-communaute text-decoration-none">
<i class="ri-checkbox-circle-fill"></i>
Certifiée par la communauté de l'inclusion le {{ forum.updated|date:"d/m/Y" }}
</span>
{% else %}
<span class="fs-sm">Fiche mise à jour le {{ forum.updated|date:"d/m/Y" }}</span>
{% endif %}
{% if user.is_superuser %}
<a href="{% url 'forum_extension:edit_forum' forum.slug forum.id %}"><small>Mettre à jour</small></a>
{% endif %}
2 changes: 1 addition & 1 deletion lacommunaute/templates/partials/social_share_buttons.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% load i18n %}
{% load social_share %}
<button class="btn btn-sm btn-ico-only btn-secondary" type="button" id="dropdownMenuSocialShare{{ id }}" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button class="btn btn-sm btn-ico btn-link" type="button" id="dropdownMenuSocialShare{{ id }}" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-share-fill ri-lg" aria-label="{% trans "Share this topics on " %}"></i>
</button>
<div class="dropdown-menu dropdown-menu-end" aria-labelledby="dropdownMenuSocialShare{{ id }}">
Expand Down
9 changes: 2 additions & 7 deletions lacommunaute/templates/partials/upvotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,12 @@
hx-target="#upvotesarea{{ obj.pk }}"
hx-swap="outerHTML">
<input type='hidden' name='pk' value="{{ obj.pk }}" />
<button type="submit" title="{% trans "UpVotes" %}" class="btn btn-sm btn-ico btn-secondary matomo-event px-2" data-matomo-category="engagement" data-matomo-action="upvote" data-matomo-option="post">
<button type="submit" title="{% trans "UpVotes" %}" class="btn btn-sm btn-ico btn-link matomo-event px-2" data-matomo-category="engagement" data-matomo-action="upvote" data-matomo-option="post">
<i class="{% if obj.has_upvoted %}ri-bookmark-fill{% else %}ri-bookmark-line{% endif %} me-1" aria-hidden="true"></i><span>{{ counter }}</span>
</button>
</form>
{% else %}
<a href="{% inclusion_connect_url next_url obj.id %}"
rel="nofollow"
class="btn btn-sm btn-ico btn-link btn-secondary px-2"
data-bs-toggle="tooltip"
data-bs-placement="top"
title="Connectez-vous pour sauvegarder">
<a href="{% inclusion_connect_url next_url obj.id %}" rel="nofollow" class="btn btn-sm btn-ico btn-link px-2" data-bs-toggle="tooltip" data-bs-placement="top" title="Connectez-vous pour sauvegarder">
<i class="{% if obj.has_upvoted %}ri-bookmark-fill{% else %}ri-bookmark-line{% endif %} me-1" aria-hidden="true"></i><span>{{ counter }}</span>
</a>
{% endif %}
Expand Down

0 comments on commit dad01bd

Please sign in to comment.