Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCUMENTATION] poser une question en haut de doc #464

Merged
merged 2 commits into from
Nov 28, 2023
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
17 changes: 15 additions & 2 deletions lacommunaute/templates/forum/forum_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{% block meta_description %}{{forum.short_description}}{% endblock meta_description %}"

{% block content %}
{% get_permission 'can_add_topic' forum request.user as user_can_add_topic %}

<section class="s-title-01 mt-lg-5">
<div class="s-title-01__container container">
Expand Down Expand Up @@ -47,6 +48,18 @@ <h2 class="mt-3">
{{forum.description.rendered|urlizetrunc_target_blank:30}}
</div>
<div class="col-12 col-lg-3">
{% if user_can_add_topic %}
<a href="{% url 'forum_conversation:topic_create' forum.slug forum.pk %}"
rel="nofollow"
class="btn btn-primary btn-block btn-ico matomo-event"
data-matomo-category="engagement"
data-matomo-action="contribute"
data-matomo-option="new_topic_on_docs">
<i class="ri-chat-new-line ri-lg"></i>
<span>{% trans "New topic on doc" %}</span>
</a>
<hr>
{% endif %}
<a href="{% url 'forum_extension:forum' parent_forum.slug parent_forum.id %}"
class="matomo-event h3 text-decoration-none d-inline-block"
data-matomo-category="engagement"
Expand Down Expand Up @@ -91,7 +104,7 @@ <h2 class="mt-3">
<section class="s-section">
<div class="s-section__container container">
<div class="s-section__row row justify-content-between">
{% get_permission 'can_add_topic' forum request.user as user_can_add_topic %}
{% comment %}{% get_permission 'can_add_topic' forum request.user as user_can_add_topic %}{% endcomment %}
{% get_permission 'can_approve_posts' forum request.user as user_can_access_stats %}
{% if user_can_add_topic or user_can_access_stats %}
<div class="col-12 col-sm-auto forum-actions-block">
Expand All @@ -106,7 +119,7 @@ <h2 class="mt-3">
<span>{% if forum.kind == 'NEWS' %}{% trans "New news" %}{% else %}{% trans "New topic" %}{% endif %}</span>
</a>
{% endif %}
{% if user_can_access_stats and forum.members_group%}
{% if user_can_access_stats and forum.members_group %}
<button id="id_dropdown_moderators_stats_button" class="btn btn-ico-only btn-outline-primary" type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-bar-chart-line ri-lg" aria-label="Statistiques animateurs"></i>
</button>
Expand Down
Binary file modified locale/fr/LC_MESSAGES/django.mo
Binary file not shown.
4 changes: 4 additions & 0 deletions locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -976,3 +976,7 @@ msgstr "Voir toute la documentation"

msgid "See all news"
msgstr "Voir toutes les actualités"

msgid "New topic on doc"
msgstr "Poser une question sur cette documentation"