From 71e451b91845297bbfb0920ecb068f67cfc0798f Mon Sep 17 00:00:00 2001 From: blued_gear Date: Thu, 30 Apr 2026 16:30:11 +0000 Subject: [PATCH] disable reply button for commenst on locked threads and posts --- templates/components/entry_comment.html.twig | 13 ++++++++++--- templates/components/post_comment.html.twig | 13 ++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/templates/components/entry_comment.html.twig b/templates/components/entry_comment.html.twig index fc0266120..a1e65484a 100644 --- a/templates/components/entry_comment.html.twig +++ b/templates/components/entry_comment.html.twig @@ -101,9 +101,16 @@ {% if comment.visibility in ['visible', 'private'] %}
  • - {{ 'reply'|trans }} + {% if not comment.entry.isLocked %} + {{ 'reply'|trans }} + {% else %} + + + {{ 'reply'|trans }} + + {% endif %}
  • {{ component('boost', {subject: comment}) }} diff --git a/templates/components/post_comment.html.twig b/templates/components/post_comment.html.twig index ad11dd832..e13183a28 100644 --- a/templates/components/post_comment.html.twig +++ b/templates/components/post_comment.html.twig @@ -98,9 +98,16 @@ {% if comment.visibility in ['visible', 'private'] %}
  • - {{ 'reply'|trans }} + {% if not comment.post.isLocked %} + {{ 'reply'|trans }} + {% else %} + + + {{ 'reply'|trans }} + + {% endif %}
  • {{ component('boost', {