##// END OF EJS Templates
Added link_to_issue helper....
Jean-Philippe Lang -
r428:cf4651b6bb38
parent child
Show More
@@ -467,7 +467,7 class ProjectsController < ApplicationController
467 467 @events_by_day = {}
468 468
469 469 unless params[:show_issues] == "0"
470 @project.issues.find(:all, :include => [:author, :status], :conditions => ["#{Issue.table_name}.created_on>=? and #{Issue.table_name}.created_on<=?", @date_from, @date_to] ).each { |i|
470 @project.issues.find(:all, :include => [:author], :conditions => ["#{Issue.table_name}.created_on>=? and #{Issue.table_name}.created_on<=?", @date_from, @date_to] ).each { |i|
471 471 @events_by_day[i.created_on.to_date] ||= []
472 472 @events_by_day[i.created_on.to_date] << i
473 473 }
@@ -50,6 +50,10 module ApplicationHelper
50 50 link_to user.display_name, :controller => 'account', :action => 'show', :id => user
51 51 end
52 52
53 def link_to_issue(issue)
54 link_to "#{issue.tracker.name} ##{issue.id}", :controller => "issues", :action => "show", :id => issue
55 end
56
53 57 def image_to_function(name, function, html_options = {})
54 58 html_options.symbolize_keys!
55 59 tag(:input, html_options.merge({
@@ -1,4 +1,4
1 <%= link_to "#{issue.tracker.name} ##{issue.id}", { :controller => 'issues', :action => 'show', :id => issue } %></strong>: <%=h issue.subject %><br />
1 <%= link_to_issue issue %></strong>: <%=h issue.subject %><br />
2 2 <br />
3 3 <strong><%= l(:field_start_date) %></strong>: <%= format_date(issue.start_date) %><br />
4 4 <strong><%= l(:field_due_date) %></strong>: <%= format_date(issue.due_date) %><br />
@@ -35,7 +35,7 while day <= @date_to
35 35 elsif day == i.due_date
36 36 image_tag('arrow_to.png')
37 37 end %>
38 <small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small><br />
38 <small><%= link_to_issue i %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small><br />
39 39 <% end %>
40 40 </td>
41 41 <%= '</tr><tr height="100">' if day.cwday >= 7 and day!=@date_to %>
@@ -23,7 +23,7
23 23 <% @events_by_day[day].sort {|x,y| y.created_on <=> x.created_on }.each do |e| %>
24 24 <li><p>
25 25 <% if e.is_a? Issue %>
26 <%= 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 />
26 <%= e.created_on.strftime("%H:%M") %> <%= link_to_issue e %>: <%=h e.subject %><br />
27 27 <i><%= e.author.name %></i>
28 28 <% elsif e.is_a? News %>
29 29 <%= e.created_on.strftime("%H:%M") %> <%=l(:label_news)%>: <%= link_to h(e.title), :controller => 'news', :action => 'show', :id => e %><br />
@@ -67,7 +67,7 while day <= @date_to
67 67 elsif day == i.due_date
68 68 image_tag('arrow_to.png')
69 69 end %>
70 <small><%= link_to "#{i.tracker.name} ##{i.id}", { :controller => 'issues', :action => 'show', :id => i } %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small>
70 <small><%= link_to_issue i %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small>
71 71 <span class="tip">
72 72 <%= render :partial => "issues/tooltip", :locals => { :issue => i }%>
73 73 </span>
@@ -25,6 +25,6
25 25 <ul>
26 26 <% ver_id = issue.fixed_version_id
27 27 end %>
28 <li><%= link_to "#{issue.tracker.name} #{issue.id}", :controller => 'issues', :action => 'show', :id => issue %>: <%=h issue.subject %></li>
28 <li><%= link_to_issue issue %>: <%=h issue.subject %></li>
29 29 <% end %>
30 30 </div> No newline at end of file
@@ -86,7 +86,7 top = headers_height + 8
86 86 @events.each do |i| %>
87 87 <div style="position: absolute;line-height:1.2em;height:16px;top:<%= top %>px;left:4px;overflow:hidden;"><small>
88 88 <% if i.is_a? Issue %>
89 <%= link_to "#{i.tracker.name} ##{i.id}", { :controller => 'issues', :action => 'show', :id => i }, :title => "#{i.subject}" %>:
89 <%= link_to_issue i %>:
90 90 <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %>
91 91 <% else %>
92 92 <strong><%= "#{l(:label_version)}: #{i.name}" %></strong>
@@ -48,9 +48,8
48 48 <% else %>
49 49 <% issues.each do |issue| %>
50 50 <li>
51 <%= link = link_to("#{issue.tracker.name} ##{issue.id}", :controller => 'issues', :action => 'show', :id => issue)
52 issue.status.is_closed? ? content_tag("del", link) : link %>
53 : <%=h issue.subject %>
51 <%= link = link_to_issue(issue)
52 issue.status.is_closed? ? content_tag("del", link) : link %>: <%=h issue.subject %>
54 53 <%= content_tag "em", "(#{l(:label_closed_issues)})" if issue.status.is_closed? %>
55 54 </li>
56 55 <% end %>
@@ -24,7 +24,7
24 24 <% @results.each do |e| %>
25 25 <li><p>
26 26 <% if e.is_a? Issue %>
27 <%= link_to "#{e.tracker.name} ##{e.id}", :controller => 'issues', :action => 'show', :id => e %>: <%= highlight_tokens(h(e.subject), @tokens) %><br />
27 <%= link_to_issue e %>: <%= highlight_tokens(h(e.subject), @tokens) %><br />
28 28 <%= highlight_tokens(e.description, @tokens) %><br />
29 29 <i><%= e.author.name %>, <%= format_time(e.created_on) %></i>
30 30 <% elsif e.is_a? News %>
General Comments 0
You need to be logged in to leave comments. Login now