fixes #2199
This commit is contained in:
25
app/views/bulk_update_requests/_form.html.erb
Normal file
25
app/views/bulk_update_requests/_form.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<%= simple_form_for(@bulk_update_request) do |f| %>
|
||||
<%= error_messages_for("bulk_update_request") %>
|
||||
|
||||
<%= f.input :title, :as => :string %>
|
||||
|
||||
<div class="input">
|
||||
<label class="text optional" for="bulk_update_request_script">Script</label>
|
||||
<pre class="hint">
|
||||
Use the following format:
|
||||
remove alias aaa -> bbb
|
||||
remove implication aaa -> bbb
|
||||
create alias aaa -> bbb
|
||||
create implication aaa -> bbb
|
||||
mass update aaa -> bbb
|
||||
</pre>
|
||||
<%= text_area :bulk_update_request, :script, :size => "50x10" %>
|
||||
</div>
|
||||
|
||||
<div class="input">
|
||||
<%= dtext_field "bulk_update_request", "reason", :name => "Reason" %>
|
||||
</div>
|
||||
|
||||
<%= f.button :submit, :value => "Submit" %>
|
||||
<%= dtext_preview_button "bulk_update_request", "reason" %>
|
||||
<% end %>
|
||||
12
app/views/bulk_update_requests/edit.html.erb
Normal file
12
app/views/bulk_update_requests/edit.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="bulk-update-requests">
|
||||
<div class="new">
|
||||
<h1>Edit Bulk Update Request</h1>
|
||||
<%= render "form" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "secondary_links" %>
|
||||
|
||||
<% content_for(:page_title) do %>
|
||||
Edit Bulk Update Request - <%= Danbooru.config.app_name %>
|
||||
<% end %>
|
||||
@@ -21,8 +21,11 @@
|
||||
<td><%= request.status %></td>
|
||||
<td>
|
||||
<% if CurrentUser.is_moderator? && request.status == "pending" %>
|
||||
<%= link_to "Approve", bulk_update_request_path(request, :status => "approved"), :method => :put %>
|
||||
| <%= link_to "Reject", bulk_update_request_path(request, :status => "rejected"), :method => :put %>
|
||||
<%= link_to "Approve", approve_bulk_update_request_path(request), :method => :post %> |
|
||||
<% end %>
|
||||
<% if request.editable?(CurrentUser.user) %>
|
||||
<%= link_to "Delete", bulk_update_request_path(request), :method => :delete %> |
|
||||
<%= link_to "Edit", edit_bulk_update_request_path(request) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,32 +1,8 @@
|
||||
<div class="bulk-update-requests">
|
||||
<div class="new">
|
||||
<h1>New Bulk Update Request</h1>
|
||||
<%= simple_form_for(@bulk_update_request) do |f| %>
|
||||
<%= error_messages_for("bulk_update_request") %>
|
||||
|
||||
<%= f.input :title, :as => :string %>
|
||||
|
||||
<div class="input">
|
||||
<label class="text optional" for="bulk_update_request_script">Script</label>
|
||||
<pre class="hint">
|
||||
Use the following format:
|
||||
remove alias aaa -> bbb
|
||||
remove implication aaa -> bbb
|
||||
create alias aaa -> bbb
|
||||
create implication aaa -> bbb
|
||||
mass update aaa -> bbb
|
||||
</pre>
|
||||
<%= text_area :bulk_update_request, :script, :size => "50x10", :required => true %>
|
||||
</div>
|
||||
|
||||
<div class="input">
|
||||
<%= dtext_field "bulk_update_request", "reason", :name => "Reason" %>
|
||||
</div>
|
||||
|
||||
<%= f.button :submit, :value => "Submit" %>
|
||||
<%= dtext_preview_button "bulk_update_request", "reason" %>
|
||||
<% end %>
|
||||
|
||||
<%= render "form" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user