Fix edit link being visible for active aliases/implications
They can't actually be edited unless they're pending
This commit is contained in:
@@ -37,7 +37,7 @@
|
|||||||
| <%= link_to "Edit", edit_tag_alias_path(tag_alias) %>
|
| <%= link_to "Edit", edit_tag_alias_path(tag_alias) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if tag_alias.deletable_by?(CurrentUser.user) %>
|
<% if tag_alias.is_pending? && tag_alias.editable_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?"} %>
|
| <%= link_to "Delete", tag_alias_path(tag_alias), :remote => true, :method => :delete, :data => {:confirm => "Are you sure you want to delete this alias?"} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<%= link_to "Show", tag_implication_path(tag_implication) %>
|
<%= link_to "Show", tag_implication_path(tag_implication) %>
|
||||||
|
|
||||||
<% if tag_implication.editable_by?(CurrentUser.user) %>
|
<% if tag_implication.is_pending? && tag_implication.editable_by?(CurrentUser.user) %>
|
||||||
| <%= link_to "Edit", edit_tag_implication_path(tag_implication) %>
|
| <%= link_to "Edit", edit_tag_implication_path(tag_implication) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user