Skip to content

Commit

Permalink
fix(forum_conversation) deduplicate social_share_buttons ids
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentporte committed Sep 18, 2023
1 parent 59211b5 commit 1c70723
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lacommunaute/templates/forum/forum_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h2 class="mt-3">
</div>
<div class="col-12 col-sm-auto">
{% include "partials/upvotes.html" with obj=forum kind="forum"%}
{% include "partials/social_share_buttons.html" with text=forum.name instance=forum %}
{% include "partials/social_share_buttons.html" with text=forum.name instance=forum id=forum.pk %}
</div>
</div>
{{forum.description.rendered|urlizetrunc_target_blank:30}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h1>{{ topic.subject }}</h1>
{% include "forum_conversation/partials/topic_detail_actions.html" %}
</div>
<div class="col-12 col-sm-auto">
{% include "partials/social_share_buttons.html" with text=topic.subject instance=topic %}
{% include "partials/social_share_buttons.html" with text=topic.subject instance=topic id=topic.pk %}
</div>
</div>
<div class="row mt-5 mb-5">
Expand Down
2 changes: 1 addition & 1 deletion lacommunaute/templates/forum_conversation/topic_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
{% include "forum_conversation/partials/topic_detail_actions.html" with posts_count=topic.posts_count %}
</div>
<div class="col-12 col-sm-auto">
{% include "partials/social_share_buttons.html" with text=topic.subject instance=topic %}
{% include "partials/social_share_buttons.html" with text=topic.subject instance=topic id=topic.pk %}
</div>
</div>
{% empty %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</a>
</p>
<div>
{% include "partials/social_share_buttons.html" with text=topic.subject instance=topic %}
{% include "partials/social_share_buttons.html" with text=topic.subject instance=topic id=topic.pk %}
</div>
</div>
<div class="card-body pt-0">
Expand Down
2 changes: 1 addition & 1 deletion lacommunaute/templates/partials/social_share_buttons.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% load i18n %}
{% load social_share %}

<button class="btn btn-sm btn-ico-only btn-secondary" type="button" id="dropdownMenuSocialShare" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<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">
<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">
Expand Down

0 comments on commit 1c70723

Please sign in to comment.