summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-20 09:38:54 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-20 09:38:54 +0000
commit0f55adf31af64d0c2b64db62c899b2da89da2036 (patch)
treec975579c4f2e389f33dce538eb6c2c8ba914e5c5
parent8bb75da1acf91af4866d4b4e10612c2fb82a0b48 (diff)
downloadredmine-0f55adf31af64d0c2b64db62c899b2da89da2036.tar.gz
redmine-0f55adf31af64d0c2b64db62c899b2da89da2036.zip
Fixed: links to edit/delete a news broken by r4214 (#6944).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4412 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/views/news/show.rhtml16
1 files changed, 10 insertions, 6 deletions
diff --git a/app/views/news/show.rhtml b/app/views/news/show.rhtml
index 119436d5d..0dc3fe358 100644
--- a/app/views/news/show.rhtml
+++ b/app/views/news/show.rhtml
@@ -1,10 +1,14 @@
<div class="contextual">
-<%= link_to_if_authorized l(:button_edit),
- edit_news_path(@news),
- :class => 'icon icon-edit',
- :accesskey => accesskey(:edit),
- :onclick => 'Element.show("edit-news"); return false;' %>
-<%= link_to_if_authorized l(:button_delete), news_path(@news), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
+<%= link_to(l(:button_edit),
+ edit_news_path(@news),
+ :class => 'icon icon-edit',
+ :accesskey => accesskey(:edit),
+ :onclick => 'Element.show("edit-news"); return false;') if User.current.allowed_to?(:manage_news, @project) %>
+<%= link_to(l(:button_delete),
+ news_path(@news),
+ :confirm => l(:text_are_you_sure),
+ :method => :delete,
+ :class => 'icon icon-del') if User.current.allowed_to?(:manage_news, @project) %>
</div>
<h2><%= avatar(@news.author, :size => "24") %><%=h @news.title %></h2>