philomena/lib/philomena_web/templates/topic/subscription/_subscription.html.slime

24 lines
757 B
Text
Raw Normal View History

2019-11-17 19:05:50 +01:00
elixir:
watch_path = ~p"/forums/#{@forum}/topics/#{@topic}/subscription"
2019-11-17 19:05:50 +01:00
watch_class = if @watching, do: "hidden", else: ""
unwatch_path = ~p"/forums/#{@forum}/topics/#{@topic}/subscription"
2019-11-17 19:05:50 +01:00
unwatch_class = if @watching, do: "", else: "hidden"
= if @conn.assigns.current_user do
2024-03-16 19:15:30 +01:00
span.js-subscription-target
2019-11-17 19:05:50 +01:00
a.js-subscription-link href=watch_path class=watch_class data-remote="true" data-method="post"
i.fa.fa-bell>
span.hide-mobile
' Subscribe
a.js-subscription-link href=unwatch_path class=unwatch_class data-remote="true" data-method="delete"
i.fa.fa-bell-slash>
span.hide-mobile
' Unsubscribe
- else
a href=~p"/sessions/new"
2019-11-17 19:05:50 +01:00
i.fa.fa-bell>
span.hide-mobile
' Subscribe