From 686fff945e0b4697aa74da404ce90534bb7b121d Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Thu, 26 Dec 2024 20:12:34 +0100 Subject: Add async email and topic subscribing --- src/application/templates/old/view_topic.twig | 29 ++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'src/application/templates/old/view_topic.twig') diff --git a/src/application/templates/old/view_topic.twig b/src/application/templates/old/view_topic.twig index 613de49..70d0d67 100644 --- a/src/application/templates/old/view_topic.twig +++ b/src/application/templates/old/view_topic.twig @@ -30,6 +30,12 @@ or currentUser.hasPermission(permission("DELETE_OTHER_TOPIC")) ) %} +{% set canSubscribe = currentUser is not null %} + +{% set isSubscribed = + currentUser is not null + and ctx.subscription is not null %} + {% set title = ctx.topic.title %} {% extends "base.twig" %} @@ -76,6 +82,16 @@ #} {%- endif -%} {%- endif -%} + {%- if canSubscribe -%} +
+ {%- endif -%} {%- if canDelete -%} {% else %} -- cgit v1.2.3