summaryrefslogtreecommitdiffstats
path: root/app/views/projects
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-04-07 18:30:01 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-04-07 18:30:01 +0000
commitcf4651b6bb384eb6ebc6fea383ca483fdf1fb55a (patch)
tree424d7db17839c7ab1524797468dbaff426641d73 /app/views/projects
parent14314b77ee9fad9cd55ccd7ddaddf9f1e29e4419 (diff)
downloadredmine-cf4651b6bb384eb6ebc6fea383ca483fdf1fb55a.tar.gz
redmine-cf4651b6bb384eb6ebc6fea383ca483fdf1fb55a.zip
Added link_to_issue helper.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@431 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/activity.rhtml2
-rw-r--r--app/views/projects/calendar.rhtml2
-rw-r--r--app/views/projects/changelog.rhtml2
-rw-r--r--app/views/projects/gantt.rhtml2
-rw-r--r--app/views/projects/roadmap.rhtml5
-rw-r--r--app/views/projects/search.rhtml2
6 files changed, 7 insertions, 8 deletions
diff --git a/app/views/projects/activity.rhtml b/app/views/projects/activity.rhtml
index 315ed980d..d5862b292 100644
--- a/app/views/projects/activity.rhtml
+++ b/app/views/projects/activity.rhtml
@@ -23,7 +23,7 @@
<% @events_by_day[day].sort {|x,y| y.created_on <=> x.created_on }.each do |e| %>
<li><p>
<% if e.is_a? Issue %>
- <%= e.created_on.strftime("%H:%M") %> <%= link_to "#{e.tracker.name} ##{e.id}", :controller => 'issues', :action => 'show', :id => e %> (<%= e.status.name %>): <%=h e.subject %><br />
+ <%= e.created_on.strftime("%H:%M") %> <%= link_to_issue e %>: <%=h e.subject %><br />
<i><%= e.author.name %></i>
<% elsif e.is_a? News %>
<%= e.created_on.strftime("%H:%M") %> <%=l(:label_news)%>: <%= link_to h(e.title), :controller => 'news', :action => 'show', :id => e %><br />
diff --git a/app/views/projects/calendar.rhtml b/app/views/projects/calendar.rhtml
index 5f5659a9e..b6ed913f2 100644
--- a/app/views/projects/calendar.rhtml
+++ b/app/views/projects/calendar.rhtml
@@ -67,7 +67,7 @@ while day <= @date_to
elsif day == i.due_date
image_tag('arrow_to.png')
end %>
- <small><%= link_to "#{i.tracker.name} ##{i.id}", { :controller => 'issues', :action => 'show', :id => i } %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small>
+ <small><%= link_to_issue i %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small>
<span class="tip">
<%= render :partial => "issues/tooltip", :locals => { :issue => i }%>
</span>
diff --git a/app/views/projects/changelog.rhtml b/app/views/projects/changelog.rhtml
index 9cebd409e..51724f149 100644
--- a/app/views/projects/changelog.rhtml
+++ b/app/views/projects/changelog.rhtml
@@ -25,6 +25,6 @@
<ul>
<% ver_id = issue.fixed_version_id
end %>
- <li><%= link_to "#{issue.tracker.name} #{issue.id}", :controller => 'issues', :action => 'show', :id => issue %>: <%=h issue.subject %></li>
+ <li><%= link_to_issue issue %>: <%=h issue.subject %></li>
<% end %>
</div> \ No newline at end of file
diff --git a/app/views/projects/gantt.rhtml b/app/views/projects/gantt.rhtml
index 4a10a7b4c..1e1eab83b 100644
--- a/app/views/projects/gantt.rhtml
+++ b/app/views/projects/gantt.rhtml
@@ -86,7 +86,7 @@ top = headers_height + 8
@events.each do |i| %>
<div style="position: absolute;line-height:1.2em;height:16px;top:<%= top %>px;left:4px;overflow:hidden;"><small>
<% if i.is_a? Issue %>
- <%= link_to "#{i.tracker.name} ##{i.id}", { :controller => 'issues', :action => 'show', :id => i }, :title => "#{i.subject}" %>:
+ <%= link_to_issue i %>:
<%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %>
<% else %>
<strong><%= "#{l(:label_version)}: #{i.name}" %></strong>
diff --git a/app/views/projects/roadmap.rhtml b/app/views/projects/roadmap.rhtml
index 19a3032b0..e1449dcfa 100644
--- a/app/views/projects/roadmap.rhtml
+++ b/app/views/projects/roadmap.rhtml
@@ -48,9 +48,8 @@
<% else %>
<% issues.each do |issue| %>
<li>
- <%= link = link_to("#{issue.tracker.name} ##{issue.id}", :controller => 'issues', :action => 'show', :id => issue)
- issue.status.is_closed? ? content_tag("del", link) : link %>
- : <%=h issue.subject %>
+ <%= link = link_to_issue(issue)
+ issue.status.is_closed? ? content_tag("del", link) : link %>: <%=h issue.subject %>
<%= content_tag "em", "(#{l(:label_closed_issues)})" if issue.status.is_closed? %>
</li>
<% end %>
diff --git a/app/views/projects/search.rhtml b/app/views/projects/search.rhtml
index 8b35dce3b..7f2998e7d 100644
--- a/app/views/projects/search.rhtml
+++ b/app/views/projects/search.rhtml
@@ -24,7 +24,7 @@
<% @results.each do |e| %>
<li><p>
<% if e.is_a? Issue %>
- <%= link_to "#{e.tracker.name} ##{e.id}", :controller => 'issues', :action => 'show', :id => e %>: <%= highlight_tokens(h(e.subject), @tokens) %><br />
+ <%= link_to_issue e %>: <%= highlight_tokens(h(e.subject), @tokens) %><br />
<%= highlight_tokens(e.description, @tokens) %><br />
<i><%= e.author.name %>, <%= format_time(e.created_on) %></i>
<% elsif e.is_a? News %>