summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-11 17:14:56 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-11 17:14:56 +0000
commit8ddcc4caf51c3ae911f7789ad21dcb456ebcf193 (patch)
treea39169476ba2de37a9753bb373baffc1424bf467 /app/views
parent9678e335a46da29ff567a750edf3b6480ca6f844 (diff)
downloadredmine-8ddcc4caf51c3ae911f7789ad21dcb456ebcf193.tar.gz
redmine-8ddcc4caf51c3ae911f7789ad21dcb456ebcf193.zip
Adds a News#commentable? method to easily specific additional rules.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8854 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r--app/views/news/show.html.erb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/news/show.html.erb b/app/views/news/show.html.erb
index 72c18d9a6..b0b5f023e 100644
--- a/app/views/news/show.html.erb
+++ b/app/views/news/show.html.erb
@@ -53,7 +53,7 @@
<% end if @comments.any? %>
</div>
-<% if authorize_for 'comments', 'create' %>
+<% if @news.commentable? %>
<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
<% form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
<div class="box">