- display_mod_tools = can?(:hide, post) #image_options_area .block__header.block__header--js-tabbed a href="#" data-click-tab="reporting" data-load-tab=post_reporting_path(post) i.fa.fa-exclamation-triangle> | Report a href="#" data-click-tab="sharing" i.fa.fa-share> | Share - if !Booru::CONFIG.settings[:force_anonymous] || current_user&.staff? a href="#" data-click-tab="favoriters" data-load-tab=post_favorites_path(post) i.fa.fa-star> | List favoriters - if can?(:hide, post) a href="#" data-click-tab="replace" i.fa.fa-upload> | Replace a href="#" data-click-tab="administration" i.fa.fa-toolbox> | Administrate - if post.scratchpad.present? i.fa.fa-sticky-note.fa--important< i.fa.fa-exclamation.fa--important a href="#" data-click-tab="logs" i.fa.fa-book-open> | Processing Logs .block__tab.hidden data-tab="favoriters" p Loading... .block__tab.hidden data-tab="reporting" p Loading... .block__tab.hidden data-tab="sharing" - tumblr_desc = "Shared from #{short_post_url(post) || 'an unknown source'}" a href="//www.tumblr.com/share/photo?source=#{post.media.url(:medium)}&caption=#{u(tumblr_desc)}&click_thru=#{u(short_post_url(post))}" button.button.button--link i.fa.fa-share> | Share on Tumblr #embed_options - source_link = post.source_url.blank? ? ' (Original source unknown at time of posting)' : " - [url=#{post.source_url}]Original source[/url]" h5 = t('booru.name') p strong> Small thumbnail input.input#embed_small_thumbnail_tag type="text" value=">>#{post.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=">>#{post.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=">>#{post.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" = "[img]#{post.media.url(:full)}[/img]\n[url=#{short_post_url(post)}]View on #{t('booru.name')}[/url]#{source_link}" 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" = "[img]#{post.media.url(:medium)}[/img]\n[url=#{short_post_url(post)}]View on #{t('booru.name')}[/url]#{source_link}" - if display_mod_tools .block__tab.hidden data-tab="replace" = form_tag post_file_path(post), method: :put, multipart: true do = render partial: 'layouts/image_upload', locals: { form: nil, field: :file, show_paste_field: true } = submit_tag 'Save changes', class: 'button', autocomplete: 'off', data: { disable_with: 'Replacing...' } .block__tab.hidden data-tab="administration" .block.block--danger a.button.button--link> href=edit_post_scratchpad_path(post) i.far.fa-edit - if post.scratchpad.present? strong> Mod notes: = render_markdown post.scratchpad.to_s - else em No mod notes present - if can? :hide, post - if !post.hidden_from_users = form_tag post_hide_path(post), method: :post do .field = label_tag :deletion_reason, 'Deletion reason (cannot be empty)' .field / This just adds the data-set-value attr needed to each select tag so that data-change-select works. = select_tag :category, options_for_select(Booru::CONFIG.reports[:categories].invert.to_a.map { |a| a + [{ 'data-set-value': a[0] }] }), class: 'input', 'data-change-selectvalue': '#deletion_reason' .field.field--inline = text_field_tag :deletion_reason, '', class: 'input input--wide', placeholder: 'Rule violation', required: true = submit_tag 'Delete', class: 'button button--state-danger button--separate-left' - else = form_tag post_hide_path(post), method: :put do = label_tag :deletion_reason, 'Deletion reason (cannot be empty)' .field.field--inline = text_field_tag :deletion_reason, '', class: 'input input--wide', placeholder: 'New reason', required: true = submit_tag 'Change deletion reason', class: 'button button--state-warning button--separate-left' .flex.flex--not-too-spaced-out - if !post.destroyed_content && can?(:repair, post) = form_tag post_repair_path(post), method: :post do .field = submit_tag 'Repair', class: 'button button--state-success' .flex.flex--not-too-spaced-out - if !post.hidden_from_users && can?(:feature, post) = form_tag post_feature_path(post), method: :post do .field = submit_tag 'Feature (also tags "featured image")', data: { confirm: t('are_you_sure') }, class: 'button button--state-primary' - elsif !post.destroyed_content - if can? :destroy, post = form_tag post_path(post), method: :delete do .field p ' ONLY if strong> ILLEGAL TO STORE (ie: child pornography) = submit_tag 'Hard-delete', data: { confirm: t('are_you_sure_destroy_image') }, class: 'button button--state-danger' - if can? :undelete, post = form_tag post_hide_path(post), method: :delete do .field = submit_tag 'Restore', class: 'button button--state-success' = form_tag post_hash_path(post), method: :delete do .field .flex.flex--end-bunched = submit_tag 'Clear hash (allows reuploading)', data: { confirm: t('are_you_sure') }, class: 'button button--state-danger' br .flex.flex--not-too-spaced-out - if post.commenting_allowed = button_to 'Lock comment editing', post_comment_lock_path(post), method: :post, class: 'button' - else = button_to 'Unlock comment editing', post_comment_lock_path(post), method: :delete, class: 'button' - if post.description_editing_allowed = button_to 'Lock description editing', post_description_lock_path(post), method: :post, class: 'button' - else = button_to 'Unlock description editing', post_description_lock_path(post), method: :delete, class: 'button' - if post.tag_editing_allowed = button_to 'Lock tag editing', post_tag_lock_path(post), method: :post, class: 'button' - else = button_to 'Unlock tag editing', post_tag_lock_path(post), method: :delete, class: 'button' .block__tab.hidden data-tab="logs" - if post.processing_logs.present? - post.processing_logs.order('begin_time DESC').limit(20).each do |log| .post-processing-log input.toggle-box id="image-log-#{log.id}" type="checkbox" label for="image-log-#{log.id}"= log.begin_time .toggle-box-container .toggle-box-container__content pre= log.text - else p No processing logs found.