Remove the 'Similar' button next to the source field in the post edit form. Removed for multiple reasons: * It doesn't make sense to have to open the edit form to do a reverse image search. * The 'Similar' button tries to redownload the file from the source, which has various problems: the source might have been deleted, it might have been changed or revised, it might be a format that iqdb can't handle (ugoira/webm/mp4), or it might otherwise not match the the actual post. * The 'Find similar' button already exists in the sidebar and it does the right thing by using the preview image from Danbooru, which avoids all the above issues.
96 lines
2.9 KiB
Plaintext
96 lines
2.9 KiB
Plaintext
<% unless CurrentUser.user.is_builder? %>
|
|
<div style="margin-bottom: 1em;">
|
|
<p>Before editing, read the <%= link_to "how to tag guide", wiki_page_path(:id => "howto:tag") %>.</p>
|
|
</div>
|
|
<% end %>
|
|
|
|
<%= render "sources/info" %>
|
|
|
|
<%= form_for(post, :html => {:class => "simple_form", :id => "form"}) do |f| %>
|
|
<%= hidden_field_tag :tags_query, params[:q] %>
|
|
<%= hidden_field_tag :pool_id, params[:pool_id] %>
|
|
<%= hidden_field_tag :favgroup_id, params[:favgroup_id] %>
|
|
<%= f.hidden_field :old_tag_string, :value => post.tag_string %>
|
|
<%= f.hidden_field :old_parent_id, :value => post.parent_id %>
|
|
<%= f.hidden_field :old_source, :value => post.source %>
|
|
<%= f.hidden_field :old_rating, :value => post.rating %>
|
|
|
|
<div class="input">
|
|
<% if post.is_rating_locked? %>
|
|
This post is rating locked.
|
|
<% else %>
|
|
<%= f.label :blank, "Rating" %>
|
|
|
|
<fieldset class="ratings">
|
|
<%= f.radio_button :rating, :e %>
|
|
<%= f.label :rating_e, "Explicit" %>
|
|
|
|
<%= f.radio_button :rating, :q %>
|
|
<%= f.label :rating_q, "Questionable" %>
|
|
|
|
<%= f.radio_button :rating, :s %>
|
|
<%= f.label :rating_s, "Safe" %>
|
|
</fieldset>
|
|
<% end %>
|
|
</div>
|
|
|
|
<% unless post.is_note_locked? %>
|
|
<div class="input">
|
|
<%= f.label :has_embedded_notes, "Embed notes" %>
|
|
<%= f.check_box :has_embedded_notes %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if CurrentUser.is_builder? %>
|
|
<div class="input">
|
|
<%= f.label :blank, "Lock" %>
|
|
|
|
<fieldset class="locks">
|
|
<%= f.check_box :is_note_locked %>
|
|
<%= f.label :is_note_locked, "Notes" %>
|
|
|
|
<%= f.check_box :is_rating_locked %>
|
|
<%= f.label :is_rating_locked, "Rating" %>
|
|
|
|
<% if CurrentUser.is_admin? %>
|
|
<%= f.check_box :is_status_locked %>
|
|
<%= f.label :is_status_locked, "Status" %>
|
|
<% end %>
|
|
</fieldset>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="input">
|
|
<%= f.label :parent_id, "Parent" %>
|
|
<%= f.text_field :parent_id, size: 60 %>
|
|
</div>
|
|
|
|
<div class="input">
|
|
<%= f.label :source %>
|
|
<%= f.text_field :source, size: 60 %>
|
|
</div>
|
|
|
|
<div class="input fixed-width-container" id="tags-container">
|
|
<div class="header">
|
|
<%= f.label :tag_string, "Tags" %>
|
|
|
|
<span class="options">
|
|
<i id="face" class="fas"></i>
|
|
<span class="count"></span>
|
|
<a href="javascript:void(0)"><i id="open-edit-dialog" class="fas fa-arrows-alt" title="detach" data-shortcut="shift+e"></i></a>
|
|
</span>
|
|
</div>
|
|
|
|
<div>
|
|
<%= f.text_area :tag_string, :size => "60x5", :spellcheck => false, :"data-autocomplete" => "tag-edit", :"data-shortcut" => "e", :value => post.presenter.split_tag_list_text + " " %>
|
|
</div>
|
|
<%= render "related_tags/buttons" %>
|
|
</div>
|
|
|
|
<div class="input">
|
|
<%= submit_tag "Submit", :class => "ui-button ui-widget ui-corner-all" %>
|
|
</div>
|
|
|
|
<%= render "related_tags/container" %>
|
|
<% end %>
|