diff --git a/lacommunaute/forum/tests/tests_views.py b/lacommunaute/forum/tests/tests_views.py index 7eeaef259..ab16c1d6e 100644 --- a/lacommunaute/forum/tests/tests_views.py +++ b/lacommunaute/forum/tests/tests_views.py @@ -346,3 +346,14 @@ def test_next_url_in_context(self): response = self.client.get(self.url) self.assertEqual(response.status_code, 200) self.assertEqual(response.context_data["next_url"], self.url) + + def test_share_buttons(self): + forum = CategoryForumFactory(with_public_perms=True, with_child=True) + child_forum = forum.get_children().first() + url = reverse("forum_extension:forum", kwargs={"pk": child_forum.pk, "slug": child_forum.slug}) + + response = self.client.get(url) + self.assertEqual(response.status_code, 200) + self.assertContains( + response, 'div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuSocialShare">' + ) diff --git a/lacommunaute/templates/forum/forum_detail.html b/lacommunaute/templates/forum/forum_detail.html index 73c6c1316..1ed156b09 100644 --- a/lacommunaute/templates/forum/forum_detail.html +++ b/lacommunaute/templates/forum/forum_detail.html @@ -32,8 +32,18 @@

{% if forums %}
+
+
+ + + Certifié par la Plateforme de l'Inclusion le {{ forum.updated|date:"d/m/Y" }} + +
+
+ {% include "partials/social_share_buttons.html" with text=forum.name instance=forum %} +
+
{{forum.description.rendered|urlizetrunc_target_blank:30}} - dernière mise à jour le : {{ forum.updated|date:"d/m/Y" }}