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

24 lines
815 B
Text
Raw Normal View History

2019-11-17 19:05:50 +01:00
elixir:
watch_path = Routes.forum_topic_subscription_path(@conn, :create, @forum, @topic)
watch_class = if @watching, do: "hidden", else: ""
unwatch_path = Routes.forum_topic_subscription_path(@conn, :delete, @forum, @topic)
unwatch_class = if @watching, do: "", else: "hidden"
= if @conn.assigns.current_user do
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>
2023-11-23 17:07:49 +01:00
span.hidden--mobile
2019-11-17 19:05:50 +01:00
' Subscribe
a.js-subscription-link href=unwatch_path class=unwatch_class data-remote="true" data-method="delete"
i.fa.fa-bell-slash>
2023-11-23 17:07:49 +01:00
span.hidden--mobile
2019-11-17 19:05:50 +01:00
' Unsubscribe
- else
a href=Routes.session_path(@conn, :new)
2019-11-17 19:05:50 +01:00
i.fa.fa-bell>
2023-11-23 17:07:49 +01:00
span.hidden--mobile
' Subscribe