diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0c2b6edc..3b6b19e3 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -55,7 +55,7 @@ module ApplicationHelper # Display a link to user's account page 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 def link_to_issue(issue) diff --git a/app/models/member.rb b/app/models/member.rb index 7b512de3..2aa26d42 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -24,7 +24,7 @@ class Member < ActiveRecord::Base validates_uniqueness_of :user_id, :scope => :project_id def name - self.user.display_name + self.user.name end def before_destroy diff --git a/app/models/user.rb b/app/models/user.rb index 569233d5..a017b428 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -101,12 +101,8 @@ class User < ActiveRecord::Base end # Return user's full name for display - def display_name - firstname + " " + lastname - end - def name - display_name + "#{firstname} #{lastname}" end def active? diff --git a/app/views/account/show.rhtml b/app/views/account/show.rhtml index 80614895..4f1bf45e 100644 --- a/app/views/account/show.rhtml +++ b/app/views/account/show.rhtml @@ -1,4 +1,4 @@ -
<%= mail_to @user.mail unless @user.pref.hide_mail %> diff --git a/app/views/attachments/_links.rhtml b/app/views/attachments/_links.rhtml index 93d6b2a7..afae91a7 100644 --- a/app/views/attachments/_links.rhtml +++ b/app/views/attachments/_links.rhtml @@ -3,7 +3,7 @@
<%= link_to attachment.filename, {:controller => 'attachments', :action => 'download', :id => attachment }, :class => 'icon icon-attachment' %>
(<%= number_to_human_size attachment.filesize %>)
<% unless options[:no_author] %>
- <%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %>
+ <%= attachment.author.name %>, <%= format_date(attachment.created_on) %>
<% end %>
<% 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 %>
diff --git a/app/views/documents/show.rhtml b/app/views/documents/show.rhtml
index 4bf09f3d..2dc76ead 100644
--- a/app/views/documents/show.rhtml
+++ b/app/views/documents/show.rhtml
@@ -19,7 +19,7 @@
<%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %>
(<%= number_to_human_size attachment.filesize %>)
- <%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %>
+ <%= attachment.author.name %>, <%= format_date(attachment.created_on) %>
<%= lwr(:label_download, attachment.downloads) %>
<% end %>
diff --git a/app/views/mailer/_issue.rhtml b/app/views/mailer/_issue.rhtml
index bf17132e..7caf855f 100644
--- a/app/views/mailer/_issue.rhtml
+++ b/app/views/mailer/_issue.rhtml
@@ -1,5 +1,5 @@
<%=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_status)%>: <%= issue.status.name %>
diff --git a/app/views/news/show.rhtml b/app/views/news/show.rhtml
index 30e746ae..df3c0279 100644
--- a/app/views/news/show.rhtml
+++ b/app/views/news/show.rhtml
@@ -6,7 +6,7 @@
<% unless @news.summary.empty? %><%=h @news.summary %>
<% end %>
-<%= @news.author.display_name %>, <%= format_time(@news.created_on) %>