fixes #2190
This commit is contained in:
6
app/views/bulk_update_requests/_secondary_links.html.erb
Normal file
6
app/views/bulk_update_requests/_secondary_links.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= link_to "Listing", bulk_update_requests_path %></li>
|
||||
<li><%= link_to "New", new_bulk_update_request_path %></li>
|
||||
</menu>
|
||||
<% end %>
|
||||
39
app/views/bulk_update_requests/index.html.erb
Normal file
39
app/views/bulk_update_requests/index.html.erb
Normal file
@@ -0,0 +1,39 @@
|
||||
<div class="bans">
|
||||
<div class="index">
|
||||
<h1>Bulk Update Requests</h1>
|
||||
|
||||
<table class="striped" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Creator</th>
|
||||
<th>Script</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @bulk_update_requests.each do |request| %>
|
||||
<tr id="request-<%= request.id %>">
|
||||
<td><%= link_to_user(request.user) %></td>
|
||||
<td><%= request.script %></td>
|
||||
<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 %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= numbered_paginator(@bulk_update_requests) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "secondary_links" %>
|
||||
|
||||
<% content_for(:page_title) do %>
|
||||
Bulk Update Requests - <%= Danbooru.config.app_name %>
|
||||
<% end %>
|
||||
29
app/views/bulk_update_requests/new.html.erb
Normal file
29
app/views/bulk_update_requests/new.html.erb
Normal file
@@ -0,0 +1,29 @@
|
||||
<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") %>
|
||||
|
||||
<pre>
|
||||
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>
|
||||
|
||||
<%= f.input :script, :as => :text %>
|
||||
<%= f.input :forum_topic_id %>
|
||||
<%= f.button :submit, :value => "Submit" %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "secondary_links" %>
|
||||
|
||||
<% content_for(:page_title) do %>
|
||||
New Bulk Update Request - <%= Danbooru.config.app_name %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user