2019-12-04 23:27:40 -05:00
|
|
|
elixir:
|
2024-04-28 20:55:27 -04:00
|
|
|
watch_path = ~p"/channels/#{@channel}/subscription"
|
2019-12-04 23:27:40 -05:00
|
|
|
watch_class = if @watching, do: "hidden", else: ""
|
|
|
|
|
2024-04-28 20:55:27 -04:00
|
|
|
unwatch_path = ~p"/channels/#{@channel}/subscription"
|
2019-12-04 23:27:40 -05:00
|
|
|
unwatch_class = if @watching, do: "", else: "hidden"
|
|
|
|
|
|
|
|
= if @conn.assigns.current_user do
|
2024-03-03 00:31:06 -05:00
|
|
|
span.js-subscription-target
|
2019-12-04 23:32:01 -05: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-04 23:27:40 -05:00
|
|
|
i.fa.fa-bell>
|
|
|
|
span.hide-mobile
|
|
|
|
' Subscribe
|
|
|
|
|
2019-12-04 23:32:01 -05: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-04 23:27:40 -05:00
|
|
|
i.fa.fa-bell-slash>
|
|
|
|
span.hide-mobile
|
|
|
|
' Unsubscribe
|
|
|
|
- else
|
2024-04-28 20:55:27 -04:00
|
|
|
a.media-box__header.media-box__header--channel.media-box__header--link href=~p"/sessions/new"
|
2019-12-04 23:32:01 -05:00
|
|
|
i.fa.fa-bell>
|
|
|
|
span.hide-mobile
|
2020-07-28 16:56:26 -04:00
|
|
|
' Subscribe
|