2019-11-17 18:50:42 +01:00
|
|
|
elixir:
|
|
|
|
watch_path = Routes.image_subscription_path(@conn, :create, @image)
|
|
|
|
watch_class = if @watching, do: "hidden", else: ""
|
|
|
|
|
|
|
|
unwatch_path = Routes.image_subscription_path(@conn, :delete, @image)
|
|
|
|
unwatch_class = if @watching, do: "", else: "hidden"
|
|
|
|
|
|
|
|
= if @conn.assigns.current_user do
|
2019-11-29 20:29:01 +01:00
|
|
|
span#js-subscription-target
|
2019-11-17 18:50:42 +01:00
|
|
|
a.js-subscription-link href=watch_path class=watch_class data-remote="true" data-method="post"
|
2023-11-23 17:07:49 +01:00
|
|
|
i.fa.fa-bell
|
|
|
|
span.hidden--phone< Subscribe
|
2019-11-17 18:50:42 +01:00
|
|
|
|
|
|
|
a.js-subscription-link href=unwatch_path class=unwatch_class data-remote="true" data-method="delete"
|
2023-11-23 17:07:49 +01:00
|
|
|
i.fa.fa-bell-slash
|
|
|
|
span.hidden--phone< Unsubscribe
|
2019-11-17 18:50:42 +01:00
|
|
|
- else
|
2020-07-28 22:56:26 +02:00
|
|
|
a href=Routes.session_path(@conn, :new)
|
2023-11-23 17:07:49 +01:00
|
|
|
i.fa.fa-bell
|
|
|
|
span.hidden--phone< Subscribe
|