summaryrefslogtreecommitdiffstats
path: root/app/views/news
diff options
context:
space:
mode:
authorJean-Baptiste Barth <jeanbaptiste.barth@gmail.com>2010-08-08 07:07:20 +0000
committerJean-Baptiste Barth <jeanbaptiste.barth@gmail.com>2010-08-08 07:07:20 +0000
commita1b607480abc6649f9531b1fd8a7d20c3c656084 (patch)
treec23e04bd9922308d8c00f9e3962a02bdcb120248 /app/views/news
parent5b64f0ff969db3f0a99c1c780ab03d842da6b59d (diff)
downloadredmine-a1b607480abc6649f9531b1fd8a7d20c3c656084.tar.gz
redmine-a1b607480abc6649f9531b1fd8a7d20c3c656084.zip
Refactor: added link_to_project helper to handle links to projects
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3924 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/news')
-rw-r--r--app/views/news/_news.rhtml2
-rw-r--r--app/views/news/index.rhtml2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/news/_news.rhtml b/app/views/news/_news.rhtml
index e95e8a557..8f481f09c 100644
--- a/app/views/news/_news.rhtml
+++ b/app/views/news/_news.rhtml
@@ -1,4 +1,4 @@
-<p><%= link_to(h(news.project.name), :controller => 'projects', :action => 'show', :id => news.project) + ': ' unless @project %>
+<p><%= link_to_project(news.project) + ': ' unless @project %>
<%= link_to h(news.title), :controller => 'news', :action => 'show', :id => news %>
<%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %>
<br />
diff --git a/app/views/news/index.rhtml b/app/views/news/index.rhtml
index 11a39232c..8b7cc66e1 100644
--- a/app/views/news/index.rhtml
+++ b/app/views/news/index.rhtml
@@ -28,7 +28,7 @@
<p class="nodata"><%= l(:label_no_data) %></p>
<% else %>
<% @newss.each do |news| %>
- <h3><%= link_to(h(news.project.name), :controller => 'projects', :action => 'show', :id => news.project) + ': ' unless news.project == @project %>
+ <h3><%= link_to_project(news.project) + ': ' unless news.project == @project %>
<%= link_to h(news.title), :controller => 'news', :action => 'show', :id => news %>
<%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %></h3>
<p class="author"><%= authoring news.created_on, news.author %></p>