* On posts, automatically trigger "Fetch source data" when clicking the Edit tab, instead of triggering the artist finder button. This way we find both the artist and the translated tags in one ajax call. * Remove the "Artist" finder button next to the source field. This isn't necessary given that "Fetch source data" finds the artist itself. * Remove the /artists/finder.json API endpoint. This is no longer used after removing the "Artist" finder button.
102 lines
3.4 KiB
Plaintext
102 lines
3.4 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[:tags] %>
|
|
<%= 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 => 5 %>
|
|
</div>
|
|
|
|
<div class="input">
|
|
<%= f.label :source %>
|
|
<%= f.text_field :source %>
|
|
<%= button_tag "Similar", :id => "similar-button", :type => "button", :class => "ui-button ui-widget ui-corner-all sub gradient" %>
|
|
</div>
|
|
|
|
<% if Danbooru.config.iqdbs_server %>
|
|
<div class="input" id="iqdb-similar" style="display: none;"></div>
|
|
<% end %>
|
|
|
|
<div class="input">
|
|
<div>
|
|
<%= f.label :tag_string, "Tags" %>
|
|
<%= f.text_area :tag_string, :size => "50x5", :value => post.presenter.categorized_tag_string + " ", :data => { :autocomplete => "tag-edit" } %>
|
|
<span id="open-edit-dialog" class="ui-icon ui-icon-arrow-1-ne" title="detach" style="display: none;" data-shortcut="shift+e"/>
|
|
</div>
|
|
|
|
<%= button_tag "Related tags", :id => "related-tags-button", :type => "button", :class => "ui-button ui-widget ui-corner-all sub gradient" %>
|
|
|
|
<% TagCategory.related_button_list.each do |category| %>
|
|
<%= button_tag "#{TagCategory.related_button_mapping[category]}", :id => "related-#{category}-button", :type => "button", :class => "ui-button ui-widget ui-corner-all sub gradient" %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="input">
|
|
<%= submit_tag "Submit", :class => "ui-button ui-widget ui-corner-all" %>
|
|
</div>
|
|
|
|
<div id="related-tags-container">
|
|
<h1>Related Tags <a href="#" id="toggle-related-tags-link" style="display: none;">«</a></h1>
|
|
<div id="related-tags" class="related-tags">
|
|
</div>
|
|
</div>
|
|
<% end %>
|