mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57:59 +01:00
phoenix_html doesn't like booleans in data tags
This commit is contained in:
parent
f954ce2951
commit
59029c24e2
6 changed files with 9 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
.block
|
||||
= form_for @changeset, Routes.image_source_path(@conn, :update, @image), [method: "put", class: "hidden", id: "source-form", data: [remote: true]], fn f ->
|
||||
= form_for @changeset, Routes.image_source_path(@conn, :update, @image), [method: "put", class: "hidden", id: "source-form", data: [remote: "true"]], fn f ->
|
||||
= if can?(@conn, :edit_metadata, @image) and !@conn.assigns.current_ban do
|
||||
|
||||
= if @changeset.action do
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
' The following tags have been restricted on this image:
|
||||
code= Enum.map_join(@image.locked_tags, ", ", & &1.name)
|
||||
|
||||
= form_for @changeset, Routes.image_tag_path(@conn, :update, @image), [id: "tags-form", method: "put", data: [remote: true]], fn f ->
|
||||
= form_for @changeset, Routes.image_tag_path(@conn, :update, @image), [id: "tags-form", method: "put", data: [remote: "true"]], fn f ->
|
||||
= if @changeset.action do
|
||||
.alert.alert-danger
|
||||
p Oops, something went wrong! Please check the errors below.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
= form_for @changeset, Routes.image_description_path(@conn, :update, @image), [class: "block hidden", id: "description-form", data: [remote: true]], fn f ->
|
||||
= form_for @changeset, Routes.image_description_path(@conn, :update, @image), [class: "block hidden", id: "description-form", data: [remote: "true"]], fn f ->
|
||||
= if @changeset.action do
|
||||
.alert.alert-danger
|
||||
p Oops, something went wrong! Please check the errors below.
|
||||
|
|
|
@ -55,4 +55,4 @@
|
|||
= link "Edit item", to: Routes.profile_commission_item_path(@conn, :edit, @user, item)
|
||||
br
|
||||
br
|
||||
= link "Delete item", to: Routes.profile_commission_item_path(@conn, :delete, @user, item), data: [confirm: "Are you really, really sure?", method: :delete]
|
||||
= link "Delete item", to: Routes.profile_commission_item_path(@conn, :delete, @user, item), data: [confirm: "Are you really, really sure?", method: "delete"]
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
= if can?(@conn, :edit, @commission) do
|
||||
= link "Edit this listing", to: Routes.profile_commission_path(@conn, :edit, @user)
|
||||
br
|
||||
= link "Delete this listing", to: Routes.profile_commission_path(@conn, :delete, @user), data: [confirm: "Are you really, really sure about that?", method: :delete]
|
||||
= link "Delete this listing", to: Routes.profile_commission_path(@conn, :delete, @user), data: [confirm: "Are you really, really sure about that?", method: "delete"]
|
||||
br
|
||||
= link "Report this listing", to: Routes.profile_commission_report_path(@conn, :new, @user)
|
||||
|
||||
|
|
|
@ -44,12 +44,12 @@ defmodule PhilomenaWeb.LayoutView do
|
|||
user_id: if(user, do: user.id, else: nil),
|
||||
user_name: if(user, do: user.name, else: nil),
|
||||
user_slug: if(user, do: user.slug, else: nil),
|
||||
user_is_signed_in: !!user,
|
||||
user_can_edit_filter: if(user, do: filter.user_id == user.id, else: false),
|
||||
user_is_signed_in: if(user, do: "true", else: "false"),
|
||||
user_can_edit_filter: if(user, do: filter.user_id == user.id, else: "false"),
|
||||
spoiler_type: if(user, do: user.spoiler_type, else: "static"),
|
||||
watched_tag_list: Jason.encode!(if(user, do: user.watched_tag_ids, else: [])),
|
||||
fancy_tag_edit: if(user, do: user.fancy_tag_field_on_edit, else: true),
|
||||
fancy_tag_upload: if(user, do: user.fancy_tag_field_on_upload, else: true),
|
||||
fancy_tag_edit: if(user, do: user.fancy_tag_field_on_edit, else: "true"),
|
||||
fancy_tag_upload: if(user, do: user.fancy_tag_field_on_upload, else: "true"),
|
||||
interactions: Jason.encode!(interactions),
|
||||
ignored_tag_list: Jason.encode!(ignored_tag_list(conn.assigns[:tags])),
|
||||
hide_staff_tools: conn.cookies["hide_staff_tools"]
|
||||
|
|
Loading…
Reference in a new issue