Remove single alias/implication requests.

* Remove the single alias and implication request forms. From now
  on, bulk update requests are the only way to request aliases or
  implications.

* Remove the forum topic ID field from the bulk update request form.
  Instead, to attach a BUR to an existing topic you go to the topic then
  you click "Request alias/implication" at the top of the page.

* Update the bulk update request form to give better examples for the
  script format and to explain the difference between aliases and
  implications.
This commit is contained in:
evazion
2019-10-28 00:38:58 -05:00
parent b5a40aa233
commit dfbf4f3f0a
20 changed files with 48 additions and 418 deletions

View File

@@ -5,7 +5,7 @@ class BulkUpdateRequestsController < ApplicationController
before_action :load_bulk_update_request, :except => [:new, :create, :index]
def new
@bulk_update_request = BulkUpdateRequest.new
@bulk_update_request = BulkUpdateRequest.new(bur_params(:create))
respond_with(@bulk_update_request)
end
@@ -57,6 +57,6 @@ class BulkUpdateRequestsController < ApplicationController
permitted_params += %i[title reason forum_topic_id] if context == :create
permitted_params += %i[forum_topic_id forum_post_id] if context == :update && CurrentUser.is_admin?
params.require(:bulk_update_request).permit(permitted_params)
params.fetch(:bulk_update_request, {}).permit(permitted_params)
end
end

View File

@@ -1,23 +0,0 @@
class TagAliasRequestsController < ApplicationController
before_action :member_only
def new
end
def create
@tag_alias_request = TagAliasRequest.new(tar_params)
@tag_alias_request.create
if @tag_alias_request.invalid?
render :action => "new"
else
redirect_to forum_topic_path(@tag_alias_request.forum_topic)
end
end
private
def tar_params
params.require(:tag_alias_request).permit(:antecedent_name, :consequent_name, :reason, :skip_secondary_validations)
end
end

View File

@@ -1,23 +0,0 @@
class TagImplicationRequestsController < ApplicationController
before_action :member_only
def new
end
def create
@tag_implication_request = TagImplicationRequest.new(tir_params)
@tag_implication_request.create
if @tag_implication_request.invalid?
render :action => "new"
else
redirect_to forum_topic_path(@tag_implication_request.forum_topic)
end
end
private
def tir_params
params.require(:tag_implication_request).permit(:antecedent_name, :consequent_name, :reason, :skip_secondary_validations)
end
end