mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 23:08:00 +01:00
23 lines
No EOL
988 B
Text
23 lines
No EOL
988 B
Text
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
|
|
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"
|
|
i.fa.fa-bell>
|
|
span.hide-mobile
|
|
' Subscribe
|
|
|
|
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"
|
|
i.fa.fa-bell-slash>
|
|
span.hide-mobile
|
|
' Unsubscribe
|
|
- else
|
|
a.media-box__header.media-box__header--channel.media-box__header--link href=Routes.pow_session_path(@conn, :new)
|
|
i.fa.fa-bell>
|
|
span.hide-mobile
|
|
' Subscribe |