From 3035cd3c64fc29ce32c6043e586d362541fcf56a Mon Sep 17 00:00:00 2001 From: Toks Date: Mon, 27 Oct 2014 22:29:49 -0400 Subject: [PATCH] Fix edit link being visible for active aliases/implications They can't actually be edited unless they're pending --- app/views/tag_aliases/index.html.erb | 2 +- app/views/tag_implications/index.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/tag_aliases/index.html.erb b/app/views/tag_aliases/index.html.erb index 60873b5af..549c55a1a 100644 --- a/app/views/tag_aliases/index.html.erb +++ b/app/views/tag_aliases/index.html.erb @@ -37,7 +37,7 @@ | <%= link_to "Edit", edit_tag_alias_path(tag_alias) %> <% 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?"} %> <% end %> diff --git a/app/views/tag_implications/index.html.erb b/app/views/tag_implications/index.html.erb index cd0727b71..a1b5fde24 100644 --- a/app/views/tag_implications/index.html.erb +++ b/app/views/tag_implications/index.html.erb @@ -31,7 +31,7 @@ <%= 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) %> <% end %>