fixes #2190
This commit is contained in:
@@ -10,6 +10,7 @@ remove alias aaa -> bbb
|
||||
remove implication aaa -> bbb
|
||||
create alias aaa -> bbb
|
||||
create implication aaa -> bbb
|
||||
mass update aaa -> bbb
|
||||
</pre>
|
||||
|
||||
<div class="input">
|
||||
|
||||
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 %>
|
||||
@@ -106,18 +106,19 @@
|
||||
<li><h1>Admin</h1></li>
|
||||
<li><%= link_to("Mod Actions", mod_actions_path) %></li>
|
||||
<li><%= link_to("Jobs", delayed_jobs_path) %></li>
|
||||
<li><%= link_to("Bulk Update Requests", new_bulk_update_request_path) %></li>
|
||||
|
||||
<% if CurrentUser.is_admin? %>
|
||||
<li><%= link_to("Janitor Trials", janitor_trials_path) %></li>
|
||||
<li><%= link_to("IP Bans", ip_bans_path) %></li>
|
||||
<li><%= link_to("News Updates", news_updates_path) %></li>
|
||||
<li><%= link_to("Alias & Implication Import", new_admin_alias_and_implication_import_path) %></li>
|
||||
<% end %>
|
||||
<% if CurrentUser.is_admin? %>
|
||||
<li><%= link_to("Janitor Trials", janitor_trials_path) %></li>
|
||||
<li><%= link_to("IP Bans", ip_bans_path) %></li>
|
||||
<li><%= link_to("News Updates", news_updates_path) %></li>
|
||||
<li><%= link_to("Alias & Implication Import", new_admin_alias_and_implication_import_path) %></li>
|
||||
<% end %>
|
||||
|
||||
<% if Danbooru.config.is_user_advertiser?(CurrentUser.user) %>
|
||||
<li><%= link_to("Advertisements", advertisements_path) %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% if Danbooru.config.is_user_advertiser?(CurrentUser.user) %>
|
||||
<li><%= link_to("Advertisements", advertisements_path) %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user