Skip to content

Commit

Permalink
[linters] djhtml quality
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentporte committed Jun 29, 2023
1 parent 4aaf6d3 commit 60cba6b
Show file tree
Hide file tree
Showing 27 changed files with 177 additions and 177 deletions.
2 changes: 1 addition & 1 deletion lacommunaute/templates/event/event_calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h1 class="s-title-01__title h1"><strong>Les évènements à venir</strong></h1>
<div class="s-section__col col-12">
{% if user.is_authenticated %}
<a href="{% url 'event:create' %}"
role="button" class="btn btn-primary">
role="button" class="btn btn-primary">
{% trans "Post a new Public Event" %}
</a>
{% else %}
Expand Down
6 changes: 3 additions & 3 deletions lacommunaute/templates/event/event_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ <h1 class="s-title-01__title h1"><strong>{% trans "Post a new Public Event" %}</
<div class="form-actions form-row">
<div class="form-group col-auto">
<input type="submit" class="btn btn-primary matomo-event" value="{% trans "Submit" %}"
data-matomo-category="engagement"
data-matomo-action="contribute"
data-matomo-option="event">
data-matomo-category="engagement"
data-matomo-action="contribute"
data-matomo-option="event">
{% if event %}
<a href="{% url 'event:delete' pk=event.pk %}" role="button" class="btn btn-outline-danger" value="{% trans "Delete" %}">{% trans "Delete" %}</a>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion lacommunaute/templates/event/event_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h1 class="s-title-01__title h1"><strong>{% trans "Manage My Events" %}</strong>
<div class="s-title-01__row row">
<div class="col-12 col-md-auto">
<a href="{% url 'event:create' %}"
role="button" class="btn btn-primary">
role="button" class="btn btn-primary">
{% trans "Post a new Public Event" %}
</a>
</div>
Expand Down
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 @@ -17,10 +17,10 @@
</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
32 changes: 16 additions & 16 deletions lacommunaute/templates/forum/forum_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
<div class="flex-grow-1">
<h3 class="h3 mb-0">
<a href="{% url 'forum_extension:forum' node.obj.slug node.obj.id %}"
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">
{{ node.obj.name }}
</a>
</h3>
Expand All @@ -50,10 +50,10 @@ <h3 class="h3 mb-0">
<li class="list-group-item list-group-item-action d-flex flex-column flex-md-row justify-content-md-between">
<div class="flex-grow-1">
<a href="{% url 'forum_extension:forum' child.obj.slug child.obj.id %}"
class="h5 d-block mb-0 matomo-event"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="forum">
class="h5 d-block mb-0 matomo-event"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="forum">
{{ child.obj.name }}
</a>
<small class="text-muted">
Expand Down Expand Up @@ -94,10 +94,10 @@ <h3 class="h3 mb-0">
</div>
<div class="card-footer text-right">
<a href="{% url 'forum_extension:forum' node.obj.slug node.obj.id %}"
class="btn btn-ico btn-link stretched-link matomo-event"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="fiches_techniques">
class="btn btn-ico btn-link stretched-link matomo-event"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="fiches_techniques">
<span>Consulter la fiche</span>
<i class="ri-arrow-right-up-line ri-lg"></i>
</a>
Expand All @@ -112,10 +112,10 @@ <h3 class="h3 mb-0">
<li class="list-group-item list-group-item-action d-flex flex-column flex-md-row justify-content-md-between">
<div class="flex-grow-1">
<a href="{% url 'forum_extension:forum' node.obj.slug node.obj.id %}"
class="matomo-event h4 d-block mb-0"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="forum">
class="matomo-event h4 d-block mb-0"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="forum">
{{ node.obj.name }}
</a>
<small class="text-muted">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
{% elif can_be_completed and has_been_completed and not change_vote_action %}
<div class="form-actions">
<a href="{% url 'forum_conversation:topic' poll.topic.forum.slug poll.topic.forum.pk poll.topic.slug poll.topic.pk %}?change_vote=true"
class="btn btn-sm btn-link pl-0 matomo-event"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="topic">
class="btn btn-sm btn-link pl-0 matomo-event"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="topic">
{% trans "Change your vote" %}
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{% load i18n %}

<form method="post"
action=""
hx-post="{% url 'forum_polls_extension:topic_poll_vote' poll.topic.forum.slug poll.topic.forum.pk poll.pk %}"
id="poll-form{{poll.pk}}"
hx-target="#pollarea{{poll.pk}}"
hx-swap="outerHTML"
novalidate>
action=""
hx-post="{% url 'forum_polls_extension:topic_poll_vote' poll.topic.forum.slug poll.topic.forum.pk poll.pk %}"
id="poll-form{{poll.pk}}"
hx-target="#pollarea{{poll.pk}}"
hx-swap="outerHTML"
novalidate>
{% csrf_token %}

<ul class="list-unstyled mb-3">
Expand All @@ -28,9 +28,9 @@
</ul>
<div class="form-actions">
<input type="submit" class="btn btn-sm btn-secondary matomo-event"
value="{% trans "Submit" %}"
data-matomo-category="engagement"
data-matomo-action="vote"
data-matomo-option="poll"/>
value="{% trans "Submit" %}"
data-matomo-category="engagement"
data-matomo-action="vote"
data-matomo-option="poll"/>
</div>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
{{ post.content.rendered|urlizetrunc_target_blank:30|img_fluid|truncatechars_html:200 }}
{% if post.content.rendered|length > 200 %}
<a hx-get="{% url 'forum_conversation_extension:showmore_certified' topic.forum.slug topic.forum.pk topic.slug topic.pk %}"
id="showmorecertified-button{{topic.pk}}"
hx-target="#showmorecertifiedpostsarea{{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="certified"
id="showmorecertified-button{{topic.pk}}"
hx-target="#showmorecertifiedpostsarea{{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="certified"
>
{% trans "+ show more" %}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
{% if not topic.is_certified or post.is_certified %}
- <i class="ri-award-line small" aria-hidden="true"></i>
<form hx-post="{% url 'forum_upvote:certify' %}"
id="certifiedpost-button{{post.pk}}"
class="d-inline-block"
hx-target="#showmorepostsarea{{topic.pk}}"
hx-confirm="Êtes-vous sûr de vouloir {% if post.is_certified %}retirer la certification de{% else %}certifier{% endif %} cette réponse ?"
hx-swap="outerHTML">
id="certifiedpost-button{{post.pk}}"
class="d-inline-block"
hx-target="#showmorepostsarea{{topic.pk}}"
hx-confirm="Êtes-vous sûr de vouloir {% if post.is_certified %}retirer la certification de{% else %}certifier{% endif %} cette réponse ?"
hx-swap="outerHTML">
<input type='hidden' name='post_pk' value="{{post.pk}}"/>
<button type="submit"
class="btn-poster small text-muted text-nowrap text-decoration-underline matomo-event"
data-matomo-category="engagement"
data-matomo-action="certify"
data-matomo-option="post"
class="btn-poster small text-muted text-nowrap text-decoration-underline matomo-event"
data-matomo-category="engagement"
data-matomo-action="certify"
data-matomo-option="post"
>
{% if post.is_certified %}
Retirer la certification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
<div class="row">
<div class="col-12 post-content-wrapper">
<form hx-post="{% url 'forum_conversation_extension:post_create' topic.forum.slug topic.forum.pk topic.slug topic.pk %}"
hx-target="#postinfeedarea{{topic.pk}}"
hx-swap="outerHTML"
class="majorpoints matomo-event"
data-matomo-category="engagement"
data-matomo-action="contribute"
data-matomo-option="post">
hx-target="#postinfeedarea{{topic.pk}}"
hx-swap="outerHTML"
class="majorpoints matomo-event"
data-matomo-category="engagement"
data-matomo-action="contribute"
data-matomo-option="post">
{% csrf_token %}

{% if post_form.non_field_errors %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
{% with post.upvotes_count as counter %}
{% if user.is_authenticated %}
<form hx-post="{% url 'forum_upvote:upvote' %}"
id="upvote-button{{post.pk}}"
hx-target="#upvotesarea{{post.pk}}"
hx-swap="outerHTML">
id="upvote-button{{post.pk}}"
hx-target="#upvotesarea{{post.pk}}"
hx-swap="outerHTML">
<input type='hidden' name='post_pk' value="{{post.pk}}"/>
<input type='hidden' name='pk' value="{{post.topic.pk}}"/>

<button type="submit"
class="btn btn-ico btn-link px-0 text-nowrap matomo-event"
data-matomo-category="engagement"
data-matomo-action="upvote"
data-matomo-option="post"
class="btn btn-ico btn-link px-0 text-nowrap matomo-event"
data-matomo-category="engagement"
data-matomo-action="upvote"
data-matomo-option="post"
>
<span class="mr-1">{% trans "UpVotes" %}</span>
<i class="{% if post.has_upvoted %}ri-star-fill{% else %}ri-star-line{% endif %}" aria-hidden="true"></i><span class="ml-1">{{counter}}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
{% blocktrans trimmed with poster_url=poster_url poster=post.poster_display_name creation_date=post.created %}
By:
<a href="{{ poster_url }}"
class="matomo-event"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="member">
class="matomo-event"
data-matomo-category="engagement"
data-matomo-action="view"
data-matomo-option="member">
{{ poster }}
</a>,
{% endblocktrans %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div id="showmorepostsarea{{topic.pk}}">
{% for post in posts %}
<div class="card post mb-3 {% if post.is_certified %}bg-communaute-lighter border-communaute {% else %}bg-light {% endif %} has-links-inside ml-3"
id="certifiedpostsarea{{post.pk}}">
id="certifiedpostsarea{{post.pk}}">
<div class="card-body">
<div class="row">
<div class="col-12 post-content-wrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@

{% if posts_count > 1 %}
<a hx-get="{% url 'forum_conversation_extension:showmore_posts' topic.forum.slug topic.forum.pk topic.slug topic.pk %}"
id="showmoreposts-button{{topic.pk}}"
hx-target="#showmorepostsarea{{topic.pk}}"
hx-swap="outerHTML"
class="btn btn-secondary btn-sm btn-ico matomo-event justify-content-center w-100 w-sm-auto mr-sm-1 mb-2 mb-sm-0"
data-matomo-category="engagement"
data-matomo-action="showmore"
data-matomo-option="post"
onclick=DisabledMe("showmoreposts-button{{topic.pk}}")
aria-label="{% trans "Show me the comment" %}"
role="button"
id="showmoreposts-button{{topic.pk}}"
hx-target="#showmorepostsarea{{topic.pk}}"
hx-swap="outerHTML"
class="btn btn-secondary btn-sm btn-ico matomo-event justify-content-center w-100 w-sm-auto mr-sm-1 mb-2 mb-sm-0"
data-matomo-category="engagement"
data-matomo-action="showmore"
data-matomo-option="post"
onclick=DisabledMe("showmoreposts-button{{topic.pk}}")
aria-label="{% trans "Show me the comment" %}"
role="button"
>
<i class="ri-eye-line font-weight-normal" aria-hidden="true"></i>
<span>
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:home' %}?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:home' %}?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
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@
<div class="form-actions form-row">
<div class="form-group col-auto">
<input type="submit" class="btn btn-primary matomo-event" value="{% trans "Submit" %}"
data-matomo-category="engagement"
data-matomo-action="contribute"
data-matomo-option="submit_topic" />
data-matomo-category="engagement"
data-matomo-action="contribute"
data-matomo-option="submit_topic" />
</div>
{% if post %}
{% get_permission 'can_delete_post' post request.user as user_can_delete_post %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
{% with topic.likes as counter %}
{% if user.is_authenticated %}
<button hx-post="{% url 'forum_conversation_extension:like_topic' topic.forum.slug topic.forum.pk topic.slug topic.pk %}" id="like-button{{topic.pk}}"
hx-target="#likesarea{{topic.pk}}"
hx-swap="outerHTML"
class="btn btn-ico btn-link btn-like px-0 text-nowrap matomo-event"
data-matomo-category="engagement"
data-matomo-action="like"
data-matomo-option="topic"
hx-target="#likesarea{{topic.pk}}"
hx-swap="outerHTML"
class="btn btn-ico btn-link btn-like px-0 text-nowrap matomo-event"
data-matomo-category="engagement"
data-matomo-action="like"
data-matomo-option="topic"
>
<span class="mr-1">{% trans "Likes" %}</span>
<i class="{% if topic.has_liked %}ri-heart-3-fill{% else %}ri-heart-3-line{% endif %}" aria-hidden="true"></i><span class="ml-1">{{counter}}</span>
Expand Down
Loading

0 comments on commit 60cba6b

Please sign in to comment.