Removed User#display_name (replaced by User#name).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@578 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-06-29 17:27:27 +00:00
parent 87bad767c6
commit 65be9d3c86
10 changed files with 10 additions and 14 deletions

View File

@ -55,7 +55,7 @@ module ApplicationHelper
# Display a link to user's account page # Display a link to user's account page
def link_to_user(user) def link_to_user(user)
link_to user.display_name, :controller => 'account', :action => 'show', :id => user link_to user.name, :controller => 'account', :action => 'show', :id => user
end end
def link_to_issue(issue) def link_to_issue(issue)

View File

@ -24,7 +24,7 @@ class Member < ActiveRecord::Base
validates_uniqueness_of :user_id, :scope => :project_id validates_uniqueness_of :user_id, :scope => :project_id
def name def name
self.user.display_name self.user.name
end end
def before_destroy def before_destroy

View File

@ -101,12 +101,8 @@ class User < ActiveRecord::Base
end end
# Return user's full name for display # Return user's full name for display
def display_name
firstname + " " + lastname
end
def name def name
display_name "#{firstname} #{lastname}"
end end
def active? def active?

View File

@ -1,4 +1,4 @@
<h2><%= @user.display_name %></h2> <h2><%=h @user.name %></h2>
<p> <p>
<%= mail_to @user.mail unless @user.pref.hide_mail %> <%= mail_to @user.mail unless @user.pref.hide_mail %>

View File

@ -3,7 +3,7 @@
<p><%= link_to attachment.filename, {:controller => 'attachments', :action => 'download', :id => attachment }, :class => 'icon icon-attachment' %> <p><%= link_to attachment.filename, {:controller => 'attachments', :action => 'download', :id => attachment }, :class => 'icon icon-attachment' %>
(<%= number_to_human_size attachment.filesize %>) (<%= number_to_human_size attachment.filesize %>)
<% unless options[:no_author] %> <% unless options[:no_author] %>
<em><%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %></em> <em><%= attachment.author.name %>, <%= format_date(attachment.created_on) %></em>
<% end %> <% end %>
<% if options[:delete_url] %> <% if options[:delete_url] %>
<%= link_to image_tag('delete.png'), options[:delete_url].update({:attachment_id => attachment}), :confirm => l(:text_are_you_sure), :method => :post %> <%= link_to image_tag('delete.png'), options[:delete_url].update({:attachment_id => attachment}), :confirm => l(:text_are_you_sure), :method => :post %>

View File

@ -19,7 +19,7 @@
</div> </div>
<%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %> <%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %>
(<%= number_to_human_size attachment.filesize %>)<br /> (<%= number_to_human_size attachment.filesize %>)<br />
<em><%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %></em><br /> <em><%= attachment.author.name %>, <%= format_date(attachment.created_on) %></em><br />
<%= lwr(:label_download, attachment.downloads) %> <%= lwr(:label_download, attachment.downloads) %>
</li> </li>
<% end %> <% end %>

View File

@ -1,5 +1,5 @@
<%=l(:label_issue)%> #<%= issue.id %> - <%= issue.subject %> <%=l(:label_issue)%> #<%= issue.id %> - <%= issue.subject %>
<%=l(:field_author)%>: <%= issue.author.display_name %> <%=l(:field_author)%>: <%= issue.author.name %>
<%=l(:field_assigned_to)%>: <%= issue.assigned_to ? issue.assigned_to.name : "-" %> <%=l(:field_assigned_to)%>: <%= issue.assigned_to ? issue.assigned_to.name : "-" %>
<%=l(:field_status)%>: <%= issue.status.name %> <%=l(:field_status)%>: <%= issue.status.name %>

View File

@ -6,7 +6,7 @@
<h2><%=h @news.title %></h2> <h2><%=h @news.title %></h2>
<p><em><% unless @news.summary.empty? %><%=h @news.summary %><br /><% end %> <p><em><% unless @news.summary.empty? %><%=h @news.summary %><br /><% end %>
<%= @news.author.display_name %>, <%= format_time(@news.created_on) %></em></p> <%= @news.author.name %>, <%= format_time(@news.created_on) %></em></p>
<br /> <br />
<%= textilizable(@news.description) %> <%= textilizable(@news.description) %>
<br /> <br />

View File

@ -12,7 +12,7 @@
<% @project.members.find(:all, :include => [:role, :user]).sort{|x,y| x.role.position <=> y.role.position}.each do |member| %> <% @project.members.find(:all, :include => [:role, :user]).sort{|x,y| x.role.position <=> y.role.position}.each do |member| %>
<% next if member.new_record? %> <% next if member.new_record? %>
<tr class="<%= cycle 'odd', 'even' %>"> <tr class="<%= cycle 'odd', 'even' %>">
<td><%= member.user.display_name %></td> <td><%= member.name %></td>
<td align="center"> <td align="center">
<% if authorize_for('members', 'edit') %> <% if authorize_for('members', 'edit') %>
<% remote_form_for(:member, member, :url => {:controller => 'members', :action => 'edit', :id => member}, :method => :post) do |f| %> <% remote_form_for(:member, member, :url => {:controller => 'members', :action => 'edit', :id => member}, :method => :post) do |f| %>

View File

@ -7,7 +7,7 @@
<h3><%= role.name %></h3> <h3><%= role.name %></h3>
<ul> <ul>
<% members[role].each do |m| %> <% members[role].each do |m| %>
<li><%= link_to m.user.display_name, :controller => 'account', :action => 'show', :id => m.user %> (<%= format_date m.created_on %>)</li> <li><%= link_to m.name, :controller => 'account', :action => 'show', :id => m.user %> (<%= format_date m.created_on %>)</li>
<% end %> <% end %>
</ul> </ul>
<% end %> <% end %>