This commit is contained in:
r888888888
2013-07-26 16:49:50 -07:00
parent aede1c347a
commit a6329174c4
7 changed files with 45 additions and 23 deletions

View File

@@ -32,16 +32,16 @@
<%= tag_alias.status %>
</td>
<td>
<% if CurrentUser.is_admin? %>
<% 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?" %>
<% end %>
<% if tag_alias.is_pending? %>
| <%= link_to "Approve", approve_tag_alias_path(tag_alias), :remote => true, :method => :post %>
<% end %>
<% if CurrentUser.is_admin? && tag_alias.is_pending? %>
| <%= link_to "Approve", approve_tag_alias_path(tag_alias), :remote => true, :method => :post %>
<% end %>
<% if CurrentUser.is_moderator? %>
| <%= link_to "Fix", tag_alias_correction_path(:tag_alias_id => tag_alias.id) %>
<% end %>
<% if CurrentUser.is_janitor? %>
| <%= link_to "Fix", tag_alias_correction_path(:tag_alias_id => tag_alias.id) %>
<% end %>
</td>
</tr>

View File

@@ -30,11 +30,11 @@
</td>
<td id="tag-implication-status-for-<%= tag_implication.id %>"><%= tag_implication.status %></td>
<td>
<% if CurrentUser.is_admin? %>
<% if CurrentUser.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?" %>
<% if tag_implication.is_pending? %>
| <%= link_to "Approve", approve_tag_implication_path(tag_implication), :remote => true, :method => :post %>
<% end %>
<% end %>
<% if CurrentUser.user.is_admin? && tag_implication.is_pending? %>
| <%= link_to "Approve", approve_tag_implication_path(tag_implication), :remote => true, :method => :post %>
<% end %>
</td>
</tr>