2019-12-08 05:53:18 +01:00
- display_mod_tools? = can?(@conn, :hide, @image)
2019-12-04 05:14:56 +01:00
#image_options_area
.block__header.block__header--js-tabbed
2024-06-06 22:28:35 +02:00
a.button.button--primary href="#" data-click-tab="reporting" data-load-tab=~p"/images/#{@image}/reporting"
2019-12-04 05:14:56 +01:00
i.fa.fa-exclamation-triangle>
| Report
2024-05-01 00:10:05 +02:00
a.button.button--primary href="#" data-click-tab="sharing"
2019-12-04 05:14:56 +01:00
i.fa.fa-share>
| Share
2024-06-06 22:28:35 +02:00
a.button.button--primary href="#" data-click-tab="favoriters" data-load-tab=~p"/images/#{@image}/favorites"
2019-12-04 05:14:56 +01:00
i.fa.fa-star>
2024-05-01 00:10:05 +02:00
span.hidden--phone
| List favoriters
span.hidden--desktop.hidden--tablet
| Faves
2019-12-20 23:35:46 +01:00
= if display_mod_tools? and not hide_staff_tools?(@conn) do
2024-05-01 00:10:05 +02:00
a.button.button--danger href="#" data-click-tab="replace"
i.fa.fa-upload
span.hidden--phone Replace
a.button.button--warning href="#" data-click-tab="administration"
i.fa.fa-toolbox
span.hidden--phone Manage
2019-12-08 05:53:18 +01:00
= if present?(@image.scratchpad) do
i.fa.fa-sticky-note.fa--important<
i.fa.fa-exclamation.fa--important
2019-12-04 05:14:56 +01:00
.block__tab.hidden data-tab="favoriters"
p Loading...
.block__tab.hidden data-tab="reporting"
p Loading...
.block__tab.hidden data-tab="sharing"
#embed_options
2023-05-29 13:06:41 +02:00
- source_link = if image_has_sources(@image), do: " - [url=#{image_first_source(@image)}]Original source[/url]", else: " (Original source unknown at time of posting)"
2024-05-20 19:04:12 +02:00
h5
= site_name()
2019-12-04 05:14:56 +01:00
p
strong> Small thumbnail
input.input#embed_small_thumbnail_tag type="text" value=">>#{@image.id}s" cols="10" readonly="readonly"
a< href="#" data-click-copy="#embed_small_thumbnail_tag"
i.fa.fa-clipboard>
| Copy
p
strong> Thumbnail
input.input#embed_thumbnail_tag type="text" value=">>#{@image.id}t" cols="10" readonly="readonly"
a< href="#" data-click-copy="#embed_thumbnail_tag"
i.fa.fa-clipboard>
| Copy
p
strong> Preview
input.input#embed_preview_tag type="text" value=">>#{@image.id}p" cols="10" readonly="readonly"
a< href="#" data-click-copy="#embed_preview_tag"
i.fa.fa-clipboard>
| Copy
h5 BBCode
p
strong> Full size BBcode
a href="#" data-click-copy="#bbcode_embed_full_tag"
i.fa.fa-clipboard>
| Copy
br
textarea.input.input--wide.input--separate-top#bbcode_embed_full_tag rows="2" cols="100" readonly="readonly"
2024-06-06 22:28:35 +02:00
= "[img]#{thumb_url(@image, false, :full)}[/img]\n[url=#{url(~p"/images/#{@image}")}]View on #{site_name()}[/url]#{source_link}"
2019-12-04 05:14:56 +01:00
p
strong> Thumbnailed BBcode
a href="#" data-click-copy="#bbcode_embed_thumbnail_tag"
i.fa.fa-clipboard>
| Copy
br
textarea.input.input--wide.input--separate-top#bbcode_embed_thumbnail_tag rows="2" cols="100" readonly="readonly"
2024-06-06 22:28:35 +02:00
= "[img]#{thumb_url(@image, false, :medium)}[/img]\n[url=#{url(~p"/images/#{@image}")}]View on #{site_name()}[/url]#{source_link}"
2019-12-16 06:25:06 +01:00
2019-12-08 05:53:18 +01:00
= if display_mod_tools? do
.block__tab.hidden data-tab="replace"
2024-06-06 22:28:35 +02:00
= form_for @changeset, ~p"/images/#{@image}/file", [method: "put", multipart: true], fn f ->
2019-12-16 06:25:06 +01:00
#js-image-upload-previews
p Upload a file from your computer
2020-05-02 05:02:20 +02:00
.field
= file_input f, :image, class: "input js-scraper"
.field.field--inline
= url_input f, :scraper_url, class: "input input--wide js-scraper", placeholder: "Link a deviantART page, a Tumblr post, or the image directly"
button.button.button--separate-left#js-scraper-preview(type="button" title="Fetch the image at the specified URL" data-disable-with="Fetch" disabled)
' Fetch
.field-error-js.hidden.js-scraper
2019-12-16 06:25:06 +01:00
= submit "Save changes", class: "button", data: [disable_with: raw("Replacing…")]
2019-12-08 05:53:18 +01:00
.block__tab.hidden data-tab="administration"
.block.block--danger
2024-06-06 22:28:35 +02:00
a.button> href=~p"/images/#{@image}/scratchpad/edit"
2019-12-08 05:53:18 +01:00
i.far.fa-edit
= if present?(@image.scratchpad) do
strong> Mod notes:
= escape_nl2br @image.scratchpad
- else
em No mod notes present
= if not @image.hidden_from_users do
2024-06-06 22:28:35 +02:00
= form_for @changeset, ~p"/images/#{@image}/delete", [method: "post"], fn f ->
2019-12-08 05:53:18 +01:00
= label f, :deletion_reason, "Deletion reason (cannot be empty)"
.field.field--inline
= text_input f, :deletion_reason, class: "input input--wide", placeholder: "Rule violation", required: true
2024-04-28 18:51:40 +02:00
= submit "Delete", class: "button button--danger button--separate-left"
2020-02-01 00:50:50 +01:00
- else
2024-06-06 22:28:35 +02:00
= form_for @changeset, ~p"/images/#{@image}/delete", [method: "put"], fn f ->
2020-02-01 00:50:50 +01:00
= label f, :deletion_reason, "Deletion reason (cannot be empty)"
.field.field--inline
= text_input f, :deletion_reason, class: "input input--wide", placeholder: "Rule violation", required: true
2024-04-28 18:51:40 +02:00
= submit "Change hide reason", class: "button button--danger button--separate-left"
2019-12-08 05:53:18 +01:00
2019-12-16 06:25:06 +01:00
.flex.flex--spaced-out.flex--wrap
= if not @image.hidden_from_users do
2024-06-06 22:28:35 +02:00
= form_for @changeset, ~p"/images/#{@image}/feature", [method: "post"], fn _f ->
2019-12-16 06:25:06 +01:00
.field
2020-09-15 02:20:10 +02:00
p Marks the image as featured
2024-04-28 18:51:40 +02:00
= submit "Feature", data: [confirm: "Are you really, really sure?"], class: "button button--success"
2020-01-31 21:10:15 +01:00
- else
2024-06-06 22:28:35 +02:00
= button_to "Restore", ~p"/images/#{@image}/delete", method: "delete", class: "button button--success"
2019-12-16 06:25:06 +01:00
2024-06-06 22:28:35 +02:00
= form_for @changeset, ~p"/images/#{@image}/repair", [method: "post"], fn _f ->
2020-01-31 21:10:15 +01:00
.field
2024-04-28 18:51:40 +02:00
= submit "Repair", class: "button button--success"
2019-12-16 06:25:06 +01:00
2024-06-06 22:28:35 +02:00
= form_for @changeset, ~p"/images/#{@image}/hash", [method: "delete"], fn _f ->
2019-12-16 06:25:06 +01:00
.field
p Allows reuploading the image
.flex.flex--end-bunched
2024-04-28 18:51:40 +02:00
= submit "Clear hash", data: [confirm: "Are you really, really sure?"], class: "button button--danger"
2019-12-16 06:25:06 +01:00
br
.flex.flex--spaced-out
= if @image.commenting_allowed do
2024-06-06 22:28:35 +02:00
= button_to "Lock commenting", ~p"/images/#{@image}/comment_lock", method: "post", class: "button"
2019-12-16 06:25:06 +01:00
- else
2024-06-06 22:28:35 +02:00
= button_to "Unlock commenting", ~p"/images/#{@image}/comment_lock", method: "delete", class: "button"
2019-12-16 06:25:06 +01:00
= if @image.description_editing_allowed do
2024-06-06 22:28:35 +02:00
= button_to "Lock description editing", ~p"/images/#{@image}/description_lock", method: "post", class: "button"
2019-12-16 06:25:06 +01:00
- else
2024-06-06 22:28:35 +02:00
= button_to "Unlock description editing", ~p"/images/#{@image}/description_lock", method: "delete", class: "button"
2019-12-16 06:25:06 +01:00
= if @image.tag_editing_allowed do
2024-06-06 22:28:35 +02:00
= button_to "Lock tag editing", ~p"/images/#{@image}/tag_lock", method: "post", class: "button"
2019-12-16 06:25:06 +01:00
- else
2024-06-06 22:28:35 +02:00
= button_to "Unlock tag editing", ~p"/images/#{@image}/tag_lock", method: "delete", class: "button"
2020-08-05 20:23:11 +02:00
2021-03-01 18:01:27 +01:00
br
.flex.flex--spaced-out
2024-06-06 22:28:35 +02:00
= link "Lock specific tags", to: ~p"/images/#{@image}/tag_lock", class: "button"
2022-03-24 17:31:57 +01:00
= if not @image.approved and can?(@conn, :approve, @image) do
2024-06-06 22:28:35 +02:00
= button_to "Approve image", ~p"/images/#{@image}/approve", method: "post", class: "button button--success", data: [confirm: "Are you sure?"]
2021-03-01 18:01:27 +01:00
= if @image.hidden_from_users and can?(@conn, :destroy, @image) do
2024-06-06 22:28:35 +02:00
= button_to "Destroy image", ~p"/images/#{@image}/destroy", method: "post", class: "button button--danger", data: [confirm: "This action is IRREVERSIBLE. Are you sure?"]