philomena/lib/philomena_web/templates/image/show.html.slime
2019-11-29 01:28:04 -05:00

31 lines
No EOL
1.4 KiB
Text

= render PhilomenaWeb.ImageView, "_image_meta.html", image: @image, watching: @watching, conn: @conn
= render PhilomenaWeb.ImageView, "_image_page.html", image: @image, conn: @conn
.layout--narrow
= if @conn.assigns.advert do
= render PhilomenaWeb.AdvertView, "_box.html", advert: @conn.assigns.advert, conn: @conn
.image-description
= render PhilomenaWeb.ImageView, "_description.html", image: @image, body: @description, conn: @conn
= render PhilomenaWeb.Image.DescriptionView, "_form.html", image: @image, changeset: @image_changeset, conn: @conn
= render PhilomenaWeb.ImageView, "_tags.html", image: @image, changeset: @image_changeset, conn: @conn
= render PhilomenaWeb.ImageView, "_source.html", image: @image, changeset: @image_changeset, conn: @conn
h4 Comments
= cond do
- @conn.assigns.current_ban ->
.block.block--fixed.block--warning
h4 You've been banned!
p
' You cannnot post comments or update metadata (or do anything but
' read, really) until
= pretty_time(@conn.assigns.current_ban.valid_until)
- @image.commenting_allowed ->
= render PhilomenaWeb.Image.CommentView, "_form.html", image: @image, changeset: @comment_changeset, conn: @conn
- true ->
#comments data-current-url=Routes.image_comment_path(@conn, :index, @image, page: 1) data-loaded="true"
= render PhilomenaWeb.Image.CommentView, "index.html", image: @image, comments: @comments, conn: @conn