##// END OF EJS Templates
Fixes users links....
Jean-Philippe Lang -
r2876:e64fb6a72874
parent child
Show More
@@ -1,61 +1,61
1 1 # redMine - project management software
2 2 # Copyright (C) 2006-2007 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 18 module QueriesHelper
19 19
20 20 def operators_for_select(filter_type)
21 21 Query.operators_by_filter_type[filter_type].collect {|o| [l(Query.operators[o]), o]}
22 22 end
23 23
24 24 def column_header(column)
25 25 column.sortable ? sort_header_tag(column.name.to_s, :caption => column.caption,
26 26 :default_order => column.default_order) :
27 27 content_tag('th', column.caption)
28 28 end
29 29
30 30 def column_content(column, issue)
31 31 if column.is_a?(QueryCustomFieldColumn)
32 32 cv = issue.custom_values.detect {|v| v.custom_field_id == column.custom_field.id}
33 33 show_value(cv)
34 34 else
35 35 value = issue.send(column.name)
36 36 if value.is_a?(Date)
37 37 format_date(value)
38 38 elsif value.is_a?(Time)
39 39 format_time(value)
40 40 else
41 41 case column.name
42 42 when :subject
43 43 h((!@project.nil? && @project != issue.project) ? "#{issue.project.name} - " : '') +
44 44 link_to(h(value), :controller => 'issues', :action => 'show', :id => issue)
45 45 when :project
46 46 link_to(h(value), :controller => 'projects', :action => 'show', :id => value)
47 47 when :assigned_to
48 link_to(h(value), :controller => 'account', :action => 'show', :id => value)
48 link_to_user value
49 49 when :author
50 link_to(h(value), :controller => 'account', :action => 'show', :id => value)
50 link_to_user value
51 51 when :done_ratio
52 52 progress_bar(value, :width => '80px')
53 53 when :fixed_version
54 54 link_to(h(value), { :controller => 'versions', :action => 'show', :id => issue.fixed_version_id })
55 55 else
56 56 h(value)
57 57 end
58 58 end
59 59 end
60 60 end
61 61 end
@@ -1,13 +1,13
1 1 <h2><%=l(:label_member_plural)%></h2>
2 2
3 3 <% if @members.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
4 4
5 5 <% members = @members.group_by {|m| m.role } %>
6 6 <% members.keys.sort{|x,y| x.position <=> y.position}.each do |role| %>
7 7 <h3><%= role.name %></h3>
8 8 <ul>
9 9 <% members[role].each do |m| %>
10 <li><%= link_to m.name, :controller => 'account', :action => 'show', :id => m.user %> (<%= format_date m.created_on %>)</li>
10 <li><%= link_to_user m.user %> (<%= format_date m.created_on %>)</li>
11 11 <% end %>
12 12 </ul>
13 13 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now