mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57:59 +01:00
20 lines
703 B
Text
20 lines
703 B
Text
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
|
|
span#js-subscription-target
|
|
a.js-subscription-link href=watch_path class=watch_class data-remote="true" data-method="post"
|
|
i.fa.fa-bell>
|
|
' Subscribe
|
|
|
|
a.js-subscription-link href=unwatch_path class=unwatch_class data-remote="true" data-method="delete"
|
|
i.fa.fa-bell-slash>
|
|
' Unsubscribe
|
|
- else
|
|
a href=Routes.session_path(@conn, :new)
|
|
i.fa.fa-bell>
|
|
' Subscribe
|