@@ -55,7 +55,7 module ApplicationHelper | |||||
55 |
|
55 | |||
56 | # Display a link to user's account page |
|
56 | # Display a link to user's account page | |
57 | def link_to_user(user) |
|
57 | def link_to_user(user) | |
58 |
link_to user. |
|
58 | link_to user.name, :controller => 'account', :action => 'show', :id => user | |
59 | end |
|
59 | end | |
60 |
|
60 | |||
61 | def link_to_issue(issue) |
|
61 | def link_to_issue(issue) |
@@ -24,7 +24,7 class Member < ActiveRecord::Base | |||||
24 | validates_uniqueness_of :user_id, :scope => :project_id |
|
24 | validates_uniqueness_of :user_id, :scope => :project_id | |
25 |
|
25 | |||
26 | def name |
|
26 | def name | |
27 |
self.user. |
|
27 | self.user.name | |
28 | end |
|
28 | end | |
29 |
|
29 | |||
30 | def before_destroy |
|
30 | def before_destroy |
@@ -101,12 +101,8 class User < ActiveRecord::Base | |||||
101 | end |
|
101 | end | |
102 |
|
102 | |||
103 | # Return user's full name for display |
|
103 | # Return user's full name for display | |
104 | def display_name |
|
|||
105 | firstname + " " + lastname |
|
|||
106 | end |
|
|||
107 |
|
||||
108 | def name |
|
104 | def name | |
109 | display_name |
|
105 | "#{firstname} #{lastname}" | |
110 | end |
|
106 | end | |
111 |
|
107 | |||
112 | def active? |
|
108 | def active? |
@@ -1,4 +1,4 | |||||
1 |
<h2><%= @user. |
|
1 | <h2><%=h @user.name %></h2> | |
2 |
|
2 | |||
3 | <p> |
|
3 | <p> | |
4 | <%= mail_to @user.mail unless @user.pref.hide_mail %> |
|
4 | <%= mail_to @user.mail unless @user.pref.hide_mail %> |
@@ -3,7 +3,7 | |||||
3 | <p><%= link_to attachment.filename, {:controller => 'attachments', :action => 'download', :id => attachment }, :class => 'icon icon-attachment' %> |
|
3 | <p><%= link_to attachment.filename, {:controller => 'attachments', :action => 'download', :id => attachment }, :class => 'icon icon-attachment' %> | |
4 | (<%= number_to_human_size attachment.filesize %>) |
|
4 | (<%= number_to_human_size attachment.filesize %>) | |
5 | <% unless options[:no_author] %> |
|
5 | <% unless options[:no_author] %> | |
6 |
<em><%= attachment.author. |
|
6 | <em><%= attachment.author.name %>, <%= format_date(attachment.created_on) %></em> | |
7 | <% end %> |
|
7 | <% end %> | |
8 | <% if options[:delete_url] %> |
|
8 | <% if options[:delete_url] %> | |
9 | <%= link_to image_tag('delete.png'), options[:delete_url].update({:attachment_id => attachment}), :confirm => l(:text_are_you_sure), :method => :post %> |
|
9 | <%= link_to image_tag('delete.png'), options[:delete_url].update({:attachment_id => attachment}), :confirm => l(:text_are_you_sure), :method => :post %> |
@@ -19,7 +19,7 | |||||
19 | </div> |
|
19 | </div> | |
20 | <%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %> |
|
20 | <%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %> | |
21 | (<%= number_to_human_size attachment.filesize %>)<br /> |
|
21 | (<%= number_to_human_size attachment.filesize %>)<br /> | |
22 |
<em><%= attachment.author. |
|
22 | <em><%= attachment.author.name %>, <%= format_date(attachment.created_on) %></em><br /> | |
23 | <%= lwr(:label_download, attachment.downloads) %> |
|
23 | <%= lwr(:label_download, attachment.downloads) %> | |
24 | </li> |
|
24 | </li> | |
25 | <% end %> |
|
25 | <% end %> |
@@ -1,5 +1,5 | |||||
1 | <%=l(:label_issue)%> #<%= issue.id %> - <%= issue.subject %> |
|
1 | <%=l(:label_issue)%> #<%= issue.id %> - <%= issue.subject %> | |
2 |
<%=l(:field_author)%>: <%= issue.author. |
|
2 | <%=l(:field_author)%>: <%= issue.author.name %> | |
3 | <%=l(:field_assigned_to)%>: <%= issue.assigned_to ? issue.assigned_to.name : "-" %> |
|
3 | <%=l(:field_assigned_to)%>: <%= issue.assigned_to ? issue.assigned_to.name : "-" %> | |
4 | <%=l(:field_status)%>: <%= issue.status.name %> |
|
4 | <%=l(:field_status)%>: <%= issue.status.name %> | |
5 |
|
5 |
@@ -6,7 +6,7 | |||||
6 | <h2><%=h @news.title %></h2> |
|
6 | <h2><%=h @news.title %></h2> | |
7 |
|
7 | |||
8 | <p><em><% unless @news.summary.empty? %><%=h @news.summary %><br /><% end %> |
|
8 | <p><em><% unless @news.summary.empty? %><%=h @news.summary %><br /><% end %> | |
9 |
<%= @news.author. |
|
9 | <%= @news.author.name %>, <%= format_time(@news.created_on) %></em></p> | |
10 | <br /> |
|
10 | <br /> | |
11 | <%= textilizable(@news.description) %> |
|
11 | <%= textilizable(@news.description) %> | |
12 | <br /> |
|
12 | <br /> |
@@ -12,7 +12,7 | |||||
12 | <% @project.members.find(:all, :include => [:role, :user]).sort{|x,y| x.role.position <=> y.role.position}.each do |member| %> |
|
12 | <% @project.members.find(:all, :include => [:role, :user]).sort{|x,y| x.role.position <=> y.role.position}.each do |member| %> | |
13 | <% next if member.new_record? %> |
|
13 | <% next if member.new_record? %> | |
14 | <tr class="<%= cycle 'odd', 'even' %>"> |
|
14 | <tr class="<%= cycle 'odd', 'even' %>"> | |
15 |
<td><%= member. |
|
15 | <td><%= member.name %></td> | |
16 | <td align="center"> |
|
16 | <td align="center"> | |
17 | <% if authorize_for('members', 'edit') %> |
|
17 | <% if authorize_for('members', 'edit') %> | |
18 | <% remote_form_for(:member, member, :url => {:controller => 'members', :action => 'edit', :id => member}, :method => :post) do |f| %> |
|
18 | <% remote_form_for(:member, member, :url => {:controller => 'members', :action => 'edit', :id => member}, :method => :post) do |f| %> |
@@ -7,7 +7,7 | |||||
7 | <h3><%= role.name %></h3> |
|
7 | <h3><%= role.name %></h3> | |
8 | <ul> |
|
8 | <ul> | |
9 | <% members[role].each do |m| %> |
|
9 | <% members[role].each do |m| %> | |
10 |
<li><%= link_to m. |
|
10 | <li><%= link_to m.name, :controller => 'account', :action => 'show', :id => m.user %> (<%= format_date m.created_on %>)</li> | |
11 | <% end %> |
|
11 | <% end %> | |
12 | </ul> |
|
12 | </ul> | |
13 | <% end %> |
|
13 | <% end %> |
General Comments 0
You need to be logged in to leave comments.
Login now