admins: remove ability to manually process BURs.
Remove the ability for admins to manually submit BURs without going through the forum.
This commit is contained in:
@@ -1,15 +0,0 @@
|
|||||||
module Admin
|
|
||||||
class AliasAndImplicationImportsController < ApplicationController
|
|
||||||
before_action :admin_only
|
|
||||||
|
|
||||||
def new
|
|
||||||
end
|
|
||||||
|
|
||||||
def create
|
|
||||||
@importer = AliasAndImplicationImporter.new(params[:batch][:text], params[:batch][:forum_id], params[:batch][:rename_aliased_pages])
|
|
||||||
@importer.process!
|
|
||||||
flash[:notice] = "Import queued"
|
|
||||||
redirect_to new_admin_alias_and_implication_import_path
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
<% page_title "Alias & Implication Import" %>
|
|
||||||
|
|
||||||
<div id="c-admin-alias-and-implication-imports">
|
|
||||||
<div id="a-new">
|
|
||||||
<h1>Alias & Implication Import</h1>
|
|
||||||
|
|
||||||
<%= simple_form_for(:batch, url: admin_alias_and_implication_import_path) do |f| %>
|
|
||||||
<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 :text, label: "Script", as: :text, input_html: { size: "60x20" } %>
|
|
||||||
<%= f.input :forum_id, label: "Forum ID" %>
|
|
||||||
<%= f.input :rename_aliased_pages, label: "Renamed aliased wiki pages and artists", as: :boolean, checked: true %>
|
|
||||||
<%= f.submit "Submit" %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@@ -162,7 +162,6 @@
|
|||||||
|
|
||||||
<% if CurrentUser.is_admin? %>
|
<% if CurrentUser.is_admin? %>
|
||||||
<li><%= link_to("News Updates", news_updates_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>
|
|
||||||
<li><%= link_to("Admin Dashboard", admin_dashboard_path) %></li>
|
<li><%= link_to("Admin Dashboard", admin_dashboard_path) %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
namespace :admin do
|
namespace :admin do
|
||||||
resources :users, :only => [:edit, :update]
|
resources :users, :only => [:edit, :update]
|
||||||
resource :alias_and_implication_import, :only => [:new, :create]
|
|
||||||
resource :dashboard, :only => [:show]
|
resource :dashboard, :only => [:show]
|
||||||
end
|
end
|
||||||
namespace :moderator do
|
namespace :moderator do
|
||||||
|
|||||||
Reference in New Issue
Block a user