2019-12-05 05:27:40 +01:00
|
|
|
elixir:
|
|
|
|
watch_path = Routes.channel_subscription_path(@conn, :create, @channel)
|
|
|
|
watch_class = if @watching, do: "hidden", else: ""
|
|
|
|
|
|
|
|
unwatch_path = Routes.channel_subscription_path(@conn, :delete, @channel)
|
|
|
|
unwatch_class = if @watching, do: "", else: "hidden"
|
|
|
|
|
|
|
|
= if @conn.assigns.current_user do
|
|
|
|
span#js-subscription-target
|
2019-12-05 05:32:01 +01:00
|
|
|
a.js-subscription-link.media-box__header.media-box__header--channel.media-box__header--link href=watch_path class=watch_class data-remote="true" data-method="post"
|
2019-12-05 05:27:40 +01:00
|
|
|
i.fa.fa-bell>
|
2023-11-23 17:07:49 +01:00
|
|
|
span.hidden--mobile
|
2019-12-05 05:27:40 +01:00
|
|
|
' Subscribe
|
|
|
|
|
2019-12-05 05:32:01 +01:00
|
|
|
a.js-subscription-link.media-box__header.media-box__header--channel.media-box__header--link href=unwatch_path class=unwatch_class data-remote="true" data-method="delete"
|
2019-12-05 05:27:40 +01:00
|
|
|
i.fa.fa-bell-slash>
|
2023-11-23 17:07:49 +01:00
|
|
|
span.hidden--mobile
|
2019-12-05 05:27:40 +01:00
|
|
|
' Unsubscribe
|
|
|
|
- else
|
2020-07-28 22:56:26 +02:00
|
|
|
a.media-box__header.media-box__header--channel.media-box__header--link href=Routes.session_path(@conn, :new)
|
2019-12-05 05:32:01 +01:00
|
|
|
i.fa.fa-bell>
|
2023-11-23 17:07:49 +01:00
|
|
|
span.hidden--mobile
|
2020-07-28 22:56:26 +02:00
|
|
|
' Subscribe
|