Skip to content

Commit

Permalink
djhtml quality
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentporte committed Jun 29, 2023
1 parent e0a8539 commit 6463064
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 87 deletions.
8 changes: 4 additions & 4 deletions lacommunaute/templates/forum/category_forum_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ <h2 class="mt-3">Des ressources exclusives pour les professionnels de l'inclusio
</div>
<div class="card-footer text-right">
<a href="{% url 'forum_extension:forum' forum.slug forum.id %}"
class="btn btn-ico btn-link stretched-link matomo-event"
data-matomo-category="engagement"
data-matomo-action="show"
data-matomo-option="fichestechniques">
class="btn btn-ico btn-link stretched-link matomo-event"
data-matomo-category="engagement"
data-matomo-action="show"
data-matomo-option="fichestechniques">
<span>Consulter les fiches du thème</span>
<i class="ri-arrow-right-up-line ri-lg"></i>
</a>
Expand Down
52 changes: 26 additions & 26 deletions lacommunaute/templates/forum/forum_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ <h2 class="h2">
<div class="row mt-3">
<div class="col-12 col-sm-3">
<a href="{% url 'forum_extension:forum' parent_forum.slug parent_forum.id %}"
class="matomo-event h3"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="forum">
class="matomo-event h3"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="forum">
Fiches {{ parent_forum.name }}
</a>
<ul>
Expand Down Expand Up @@ -79,10 +79,10 @@ <h2 class="h2">
<div class="col-12 col-sm-auto forum-actions-block">
{% if user_can_add_topic %}
<a href="{% url 'forum_conversation:topic_create' forum.slug forum.pk %}"
class="btn btn-primary btn-ico matomo-event"
data-matomo-category="engagement"
data-matomo-action="contribute"
data-matomo-option="new_topic">
class="btn btn-primary btn-ico matomo-event"
data-matomo-category="engagement"
data-matomo-action="contribute"
data-matomo-option="new_topic">
<i class="ri-chat-new-line ri-lg"></i>
<span>{% if forum.kind == 'NEWS' %}{% trans "New news" %}{% else %}{% trans "New topic" %}{% endif %}</span>
</a>
Expand All @@ -93,10 +93,10 @@ <h2 class="h2">
</button>
<div class="dropdown-menu" aria-labelledby="id_dropdown_moderators_stats_button">
<a href="{% url 'members:forum_profiles' forum.slug forum.pk %}"
class="dropdown-item matomo-event"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="directory">
class="dropdown-item matomo-event"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="directory">
{% trans "Members" %}
</a>
</div>
Expand All @@ -111,22 +111,22 @@ <h2 class="h2">
<ul class="s-tabs-01__nav nav nav-tabs" role="tablist">
<li class="nav-item" role="presentation">
<a class="nav-link active" id="topics-tab"
data-toggle="tab"
href="#topics"
role="tab"
aria-controls="topics"
aria-selected="true">
data-toggle="tab"
href="#topics"
role="tab"
aria-controls="topics"
aria-selected="true">
Sujets
</a>
</li>
{% if announces %}
<li class="nav-item" role="presentation">
<a class="nav-link" id="announces-tab"
data-toggle="tab"
href="#announces"
role="tab"
aria-controls="announces"
aria-selected="false">
data-toggle="tab"
href="#announces"
role="tab"
aria-controls="announces"
aria-selected="false">
Annonces
</a>
</li>
Expand All @@ -139,16 +139,16 @@ <h2 class="h2">
</ul>
<div class="tab-content topiclist">
<div class="tab-pane fade show active" id="topics"
role="tabpanel"
aria-labelledby="topics-tab">
role="tabpanel"
aria-labelledby="topics-tab">
{% with unread_topics=unread_topics %}
{% include "forum_conversation/topic_list.html" %} <!-- note vincentporte : to be optimized -->
{% endwith %}
</div>
{% if announces %}
<div class="tab-pane fade" id="announces"
role="tabpanel"
aria-labelledby="announces-tab">
role="tabpanel"
aria-labelledby="announces-tab">
{% with topics=announces hide_if_empty=True unread_topics=unread_topics loadmoretopic_url=None %}
{% include "forum_conversation/topic_list.html" %} <!-- note vincentporte : to be optimized -->
{% endwith %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
{% for filter in filters %}
<li>
<button id="filtertopics-button"
hx-target="#topicsarea"
hx-swap="outerHTML"
hx-get="{% url 'forum_conversation_extension:publicforum' %}?filter={{ filter.0 }}"
class="dropdown-item matomo-event"
data-matomo-category="engagement"
data-matomo-action="filter"
data-matomo-option="topics">
hx-target="#topicsarea"
hx-swap="outerHTML"
hx-get="{% url 'forum_conversation_extension:publicforum' %}?filter={{ filter.0 }}"
class="dropdown-item matomo-event"
data-matomo-category="engagement"
data-matomo-action="filter"
data-matomo-option="topics">
{{ filter.1 }}
</button>
</li>
Expand Down
36 changes: 18 additions & 18 deletions lacommunaute/templates/forum_conversation/topic_list_newsfeed.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
</div>
<p class="h4 mb-0 flex-grow-1">
<a href="{% url 'forum_conversation:topic' topic.forum.slug topic.forum.pk topic.slug topic.pk %}"
class="matomo-event"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="news">
class="matomo-event"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="news">
{{ topic.subject }} {% if topic.is_locked %}&nbsp;<i class="fas fa-times-circle locked-indicator" aria-label="{% trans 'This topic is locked' %}"></i>{% endif %}
</a>
</p>
Expand All @@ -40,13 +40,13 @@
{{ topic.first_post.content.rendered|urlizetrunc_target_blank:30|img_fluid|truncatechars_html:200 }}
{% if topic.first_post.content.rendered|length > 200 %}
<a hx-get="{% url 'forum_conversation_extension:showmore_topic' topic.forum.slug topic.forum.pk topic.slug topic.pk %}"
id="showmoretopic-button{{topic.pk}}"
hx-target="#showmoretopicsarea{{topic.pk}}"
hx-swap="outerHTML"
class="btn btn-link p-0 mh-auto matomo-event"
data-matomo-category="engagement"
data-matomo-action="showmore"
data-matomo-option="news"
id="showmoretopic-button{{topic.pk}}"
hx-target="#showmoretopicsarea{{topic.pk}}"
hx-swap="outerHTML"
class="btn btn-link p-0 mh-auto matomo-event"
data-matomo-category="engagement"
data-matomo-action="showmore"
data-matomo-option="news"
>
{% trans "+ show more" %}
</a>
Expand Down Expand Up @@ -85,13 +85,13 @@
<div id="loadmoretopicsarea{{ loadmoretopic_suffix }}" class="row mx-3 mt-md-5 justify-content-center">
<div class="col-12 col-md-auto">
<a hx-get="{% url_add_query loadmoretopic_url page=page_obj.next_page_number %}"
id="loadmoretopics-button"
hx-target="#loadmoretopicsarea{{ loadmoretopic_suffix }}"
hx-swap="outerHTML"
class="btn btn-link btn-ico btn-block justify-content-center matomo-event"
data-matomo-category="engagement"
data-matomo-action="loadmore"
data-matomo-option="topic">
id="loadmoretopics-button"
hx-target="#loadmoretopicsarea{{ loadmoretopic_suffix }}"
hx-swap="outerHTML"
class="btn btn-link btn-ico btn-block justify-content-center matomo-event"
data-matomo-category="engagement"
data-matomo-action="loadmore"
data-matomo-option="topic">
<i class="ri-loop-right-line" aria-hidden="true"></i>
<span>{% trans "load more topics" %}</span>
</a>
Expand Down
24 changes: 12 additions & 12 deletions lacommunaute/templates/pages/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ <h3>Les dernières questions</h3>
{% for topic in topics_public %}
<li>
<a href="{% url 'forum_conversation:topic' topic.forum.slug topic.forum.pk topic.slug topic.pk %}"
class="matomo-event"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="topic">
class="matomo-event"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="topic">
{{ topic.subject }}
</a>
</li>
Expand All @@ -76,10 +76,10 @@ <h3>Les dernières fiches techniques</h3>
{% for forum in forums_category %}
<li>
<a href="{% url 'forum_extension:forum' forum.slug forum.pk %}"
class="matomo-event"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="forum">
class="matomo-event"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="forum">
[{{ forum.parent.name }}] {{ forum.name }}
</a>
</li>
Expand All @@ -94,10 +94,10 @@ <h3>Les dernières actus</h3>
{% for topic in topics_newsfeed %}
<li>
<a href="{% url 'forum_conversation:topic' topic.forum.slug topic.forum.pk topic.slug topic.pk %}"
class="matomo-event"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="news">
class="matomo-event"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="news">
{{ topic.subject }}
</a>
</li>
Expand Down
16 changes: 8 additions & 8 deletions lacommunaute/templates/partials/ask_a_question.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<div class="row">
<div class="col-12 col-lg-auto">
<a href="{% url 'forum_conversation:topic_create' forum.slug forum.pk %}"
class="btn btn-primary btn-ico matomo-event"
data-matomo-category="engagement"
data-matomo-action="contribute"
data-matomo-option="new_topic">
class="btn btn-primary btn-ico matomo-event"
data-matomo-category="engagement"
data-matomo-action="contribute"
data-matomo-option="new_topic">
<i class="ri-chat-new-line ri-lg"></i>
<span>{% trans "New topic" %}</span>
</a>
Expand All @@ -18,10 +18,10 @@
</div>
<div class="col-12 col-lg-auto">
<a href="{% url 'forum_search_extension:search' %}"
class="btn btn-outline-primary btn-ico matomo-event"
data-matomo-category="engagement"
data-matomo-action="search"
data-matomo-option="query">
class="btn btn-outline-primary btn-ico matomo-event"
data-matomo-category="engagement"
data-matomo-action="search"
data-matomo-option="query">
<i class="ri-chat-new-line ri-lg"></i>
<span>{% trans "Search forums" %}</span>
</a>
Expand Down
24 changes: 12 additions & 12 deletions lacommunaute/templates/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@
<ul>
<li>
<a href="/glossaire/"
target="_blank"
aria-label="glossaire des mots de l'inclusion"
class="matomo-event"
data-matomo-category="landing"
data-matomo-action="glossaire"
data-matomo-option="footer">
target="_blank"
aria-label="glossaire des mots de l'inclusion"
class="matomo-event"
data-matomo-category="landing"
data-matomo-action="glossaire"
data-matomo-option="footer">
Glossaire de l'inclusion
</a>
</li>
<li>
<a href="https://documentation.inclusion.beta.gouv.fr/aide/emplois/"
target="_blank"
aria-label="Posez votre question sur la page du support des emplois de l'inclusion (lien externe)"
class="matomo-event"
data-matomo-category="support"
data-matomo-action="site_emplois"
data-matomo-option="footer">
target="_blank"
aria-label="Posez votre question sur la page du support des emplois de l'inclusion (lien externe)"
class="matomo-event"
data-matomo-category="support"
data-matomo-action="site_emplois"
data-matomo-option="footer">
Support des emplois de l'inclusion
</a>
</li>
Expand Down

0 comments on commit 6463064

Please sign in to comment.