fixes #1929
This commit is contained in:
@@ -2,6 +2,11 @@ class TagAliasesController < ApplicationController
|
||||
before_filter :admin_only, :only => [:approve, :new, :create]
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
def show
|
||||
@tag_alias = TagAlias.find(params[:id])
|
||||
respond_with(@tag_alias)
|
||||
end
|
||||
|
||||
def new
|
||||
@tag_alias = TagAlias.new(params[:tag_alias])
|
||||
respond_with(@tag_alias)
|
||||
|
||||
@@ -2,6 +2,11 @@ class TagImplicationsController < ApplicationController
|
||||
before_filter :admin_only, :only => [:new, :create, :approve]
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
def show
|
||||
@tag_implication = TagImplication.find(params[:id])
|
||||
respond_with(@tag_implication)
|
||||
end
|
||||
|
||||
def new
|
||||
@tag_implication = TagImplication.new
|
||||
respond_with(@tag_implication)
|
||||
|
||||
@@ -32,8 +32,9 @@
|
||||
<%= tag_alias.status %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to "Show", tag_alias_path(tag_alias) %>
|
||||
<% if tag_alias.deletable_by?(CurrentUser.user) %>
|
||||
<%= link_to "Delete", tag_alias_path(tag_alias), :remote => true, :method => :delete, :confirm => "Are you sure you want to delete this alias?" %>
|
||||
| <%= link_to "Delete", tag_alias_path(tag_alias), :remote => true, :method => :delete, :confirm => "Are you sure you want to delete this alias?" %>
|
||||
<% end %>
|
||||
|
||||
<% if CurrentUser.is_admin? && tag_alias.is_pending? %>
|
||||
|
||||
20
app/views/tag_aliases/show.html.erb
Normal file
20
app/views/tag_aliases/show.html.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<h1>Tag Alias: <%= @tag_alias.antecedent_name %> -> <%= @tag_alias.consequent_name %></h1>
|
||||
|
||||
<ul>
|
||||
<li><strong>From</strong> <%= link_to @tag_alias.antecedent_name, posts_path(:tags => @tag_alias.antecedent_name) %></li>
|
||||
<li><strong>To</strong> <%= link_to @tag_alias.consequent_name, posts_path(:tags => @tag_alias.consequent_name) %></li>
|
||||
<% if @tag_alias.forum_topic_id %>
|
||||
<li><strong>Reference</strong> <%= link_to @tag_alias.forum_topic_id, forum_topic_path(@tag_alias.forum_topic_id) %></li>
|
||||
<% end %>
|
||||
<li><strong>Creator</strong> <%= link_to @tag_alias.creator.name, user_path(@tag_alias.creator) %></li>
|
||||
<li><strong>Date</strong> <%= @tag_alias.created_at %></li>
|
||||
<% if @tag_alias.respond_to?(:reason) %>
|
||||
<li><strong>Reason</strong> <%= format_text @tag_alias.reason %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<%= render "tag_aliases/secondary_links" %>
|
||||
|
||||
<% content_for(:page_title) do %>
|
||||
Tag Alias - <%= Danbooru.config.app_name %>
|
||||
<% end %>
|
||||
@@ -30,8 +30,9 @@
|
||||
</td>
|
||||
<td id="tag-implication-status-for-<%= tag_implication.id %>"><%= tag_implication.status %></td>
|
||||
<td>
|
||||
<%= link_to "Show", tag_implication_path(tag_implication) %>
|
||||
<% if tag_implication.deletable_by?(CurrentUser.user) %>
|
||||
<%= link_to "Delete", tag_implication_path(tag_implication), :remote => true, :method => :delete, :confirm => "Are you sure you want to delete this implication?" %>
|
||||
| <%= link_to "Delete", tag_implication_path(tag_implication), :remote => true, :method => :delete, :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 %>
|
||||
|
||||
20
app/views/tag_implications/show.html.erb
Normal file
20
app/views/tag_implications/show.html.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<h1>Tag Implication: <%= @tag_implication.antecedent_name %> -> <%= @tag_implication.consequent_name %></h1>
|
||||
|
||||
<ul>
|
||||
<li><strong>From</strong> <%= link_to @tag_implication.antecedent_name, posts_path(:tags => @tag_implication.antecedent_name) %></li>
|
||||
<li><strong>To</strong> <%= link_to @tag_implication.consequent_name, posts_path(:tags => @tag_implication.consequent_name) %></li>
|
||||
<% if @tag_implication.forum_topic_id %>
|
||||
<li><strong>Reference</strong> <%= link_to @tag_implication.forum_topic_id, forum_topic_path(@tag_implication.forum_topic_id) %></li>
|
||||
<% end %>
|
||||
<li><strong>Creator</strong> <%= link_to @tag_implication.creator.name, user_path(@tag_implication.creator) %></li>
|
||||
<li><strong>Date</strong> <%= @tag_implication.created_at %></li>
|
||||
<% if @tag_implication.respond_to?(:reason) %>
|
||||
<li><strong>Reason</strong> <%= format_text @tag_implication.reason %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<%= render "tag_implications/secondary_links" %>
|
||||
|
||||
<% content_for(:page_title) do %>
|
||||
Tag Implication - <%= Danbooru.config.app_name %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user