aliases/implications: remove dead approving/updating code.

Remove the edit, update, and approve endpoints for tag aliases and
implications. These have been useless since individual alias and
implication requests were removed. Aliases and implications could only
be edited or approved if they were in the pending state, which is no
longer possible.

Also remove unused new alias/implication request forms.
This commit is contained in:
evazion
2020-02-22 00:30:58 -06:00
parent 2f5255f6b7
commit d915009407
17 changed files with 9 additions and 289 deletions

View File

@@ -1,40 +0,0 @@
<div id="c-tag-alias-requests">
<div id="a-new">
<h1>Tag Alias Request</h1>
<%= error_messages_for :tag_alias_request %>
<p>You can request a new tag alias be created. This will create a corresponding forum topic for community review.</p>
<%= form_tag(tag_alias_request_path, :class => "simple_form") do %>
<div class="input">
<label>From</label>
<%= text_field "tag_alias_request", "antecedent_name", :data => { :autocomplete => "tag" } %>
</div>
<div class="input">
<label>To</label>
<%= text_field "tag_alias_request", "consequent_name", :data => { :autocomplete => "tag" } %>
</div>
<div class="input">
<%= dtext_field "tag_alias_request", "reason", :name => "Reason" %>
</div>
<div class="input">
<label class="checkbox optional" for="tag_alias_request_skip_secondary_validations">
<%= check_box "tag_alias_request", "skip_secondary_validations" %>
Skip validations
</label>
<p class="hint">You can ignore the wiki page and minimum count requirements</p>
</div>
<div class="input">
<%= submit_tag "Submit" %>
<%= dtext_preview_button "tag_alias_request", "reason" %>
</div>
<% end %>
</div>
</div>
<%= render "tag_aliases/secondary_links" %>

View File

@@ -21,16 +21,8 @@
<% t.column column: "control", width: "15%" do |tag_alias| %>
<%= link_to "Show", tag_alias_path(tag_alias) %>
<% if tag_alias.is_pending? && tag_alias.editable_by?(CurrentUser.user) %>
| <%= link_to "Edit", edit_tag_alias_path(tag_alias) %>
<% end %>
<% if tag_alias.deletable_by?(CurrentUser.user) %>
| <%= link_to "Delete", tag_alias_path(tag_alias), :remote => true, :method => :delete, :data => {:confirm => "Are you sure you want to delete this alias?"} %>
<% end %>
<% if CurrentUser.user.is_admin? && tag_alias.is_pending? %>
| <%= link_to "Approve", approve_tag_alias_path(tag_alias), :remote => true, :method => :post %>
<% end %>
<% end %>
<% end %>

View File

@@ -1 +0,0 @@
$("#tag-alias-status-for-<%= @tag_alias.id %>").html("queued");

View File

@@ -1,16 +0,0 @@
<div id="c-tag-aliases">
<div id="a-new">
<h1>Edit Tag Alias</h1>
<%= error_messages_for :tag_alias %>
<%= edit_form_for(@tag_alias) do |f| %>
<%= f.input :antecedent_name, :as => :string, :label => "From" %>
<%= f.input :consequent_name, :label => "To" %>
<%= f.input :forum_topic_id, :label => "Forum" %>
<%= f.button :submit, :data => { :disable_with => "Updating..." } %>
<% end %>
</div>
</div>
<%= render "secondary_links" %>

View File

@@ -19,10 +19,6 @@
</li>
<% end %>
<li><strong>Status</strong> <%= @tag_alias.status %></li>
<% if CurrentUser.is_admin? && @tag_alias.is_pending? %>
<li><strong>Commands</strong> <%= link_to "Approve", approve_tag_alias_path(@tag_alias), :method => :post %></li>
<% end %>
</ul>
</div>
</div>

View File

@@ -1,40 +0,0 @@
<div id="c-tag-implication-requests">
<div id="a-new">
<h1>Tag Implication Request</h1>
<%= error_messages_for :tag_implication_request %>
<p>You can request a new tag implication be created. This will create a corresponding forum topic for community review.</p>
<%= form_tag(tag_implication_request_path, :class => "simple_form") do %>
<div class="input">
<label>From</label>
<%= text_field "tag_implication_request", "antecedent_name", :data => { :autocomplete => "tag" } %>
</div>
<div class="input">
<label>To</label>
<%= text_field "tag_implication_request", "consequent_name", :data => { :autocomplete => "tag" } %>
</div>
<div class="input">
<%= dtext_field "tag_implication_request", "reason", :name => "Reason" %>
</div>
<div class="input">
<label class="checkbox optional" for="tag_implication_request_skip_secondary_validations">
<%= check_box "tag_implication_request", "skip_secondary_validations" %>
Skip validations
</label>
<p class="hint">You can ignore the wiki page and minimum count requirements</p>
</div>
<div class="input">
<%= submit_tag "Submit" %>
<%= dtext_preview_button "tag_implication_request", "reason" %>
</div>
<% end %>
</div>
</div>
<%= render "tag_implications/secondary_links" %>

View File

@@ -21,16 +21,8 @@
<% t.column column: "control", width: "15%" do |tag_implication| %>
<%= link_to "Show", tag_implication_path(tag_implication) %>
<% if tag_implication.is_pending? && tag_implication.editable_by?(CurrentUser.user) %>
| <%= link_to "Edit", edit_tag_implication_path(tag_implication) %>
<% end %>
<% if tag_implication.deletable_by?(CurrentUser.user) %>
| <%= link_to "Delete", tag_implication_path(tag_implication), :remote => true, :method => :delete, :data => {:confirm => "Are you sure you want to delete this implication?"} %>
<% end %>
<% if CurrentUser.user.is_admin? && tag_implication.is_pending? %>
| <%= link_to "Approve", approve_tag_implication_path(tag_implication), :remote => true, :method => :post %>
<% end %>
<% end %>
<% end %>

View File

@@ -1 +0,0 @@
$("#tag-implication-status-for-<%= @tag_implication.id %>").html("queued");

View File

@@ -1,16 +0,0 @@
<div id="c-tag-implications">
<div id="a-edit">
<h1>Edit Tag Implication</h1>
<%= error_messages_for :tag_implication %>
<%= edit_form_for(@tag_implication) do |f| %>
<%= f.input :antecedent_name, :label => "From" %>
<%= f.input :consequent_name, :label => "To" %>
<%= f.input :forum_topic_id, :label => "Forum" %>
<%= f.button :submit, :data => { :disable_with => "Updating..." } %>
<% end %>
</div>
</div>
<%= render "secondary_links" %>

View File

@@ -19,10 +19,6 @@
</li>
<% end %>
<li><strong>Status</strong>: <%= @tag_implication.status %></li>
<% if CurrentUser.is_admin? && @tag_implication.is_pending? %>
<li><strong>Commands</strong> <%= link_to "Approve", approve_tag_implication_path(@tag_implication), :method => :post %></li>
<% end %>
</ul>
</div>
</div>