Commit ceaeac454bdce03b5fcc73dc89f3dc203f6131d4
1 parent
f0c23c25
Exists in
master
and in
28 other branches
ActionItem556: use display_name instead of first_name
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2286 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
3 changed files
with
1 additions
and
10 deletions
Show diff stats
app/models/person.rb
| @@ -86,11 +86,6 @@ class Person < Profile | @@ -86,11 +86,6 @@ class Person < Profile | ||
| 86 | end | 86 | end |
| 87 | end | 87 | end |
| 88 | 88 | ||
| 89 | - def first_name | ||
| 90 | - re = '[-+*_\s\'´"]' | ||
| 91 | - self.name.gsub(/^#{re}*/,'').split(/#{re}/)[0] | ||
| 92 | - end | ||
| 93 | - | ||
| 94 | has_and_belongs_to_many :favorite_enterprises, :class_name => 'Enterprise', :join_table => 'favorite_enteprises_people' | 89 | has_and_belongs_to_many :favorite_enterprises, :class_name => 'Enterprise', :join_table => 'favorite_enteprises_people' |
| 95 | 90 | ||
| 96 | def email_addresses | 91 | def email_addresses |
app/models/user.rb
| @@ -154,10 +154,6 @@ class User < ActiveRecord::Base | @@ -154,10 +154,6 @@ class User < ActiveRecord::Base | ||
| 154 | def name | 154 | def name |
| 155 | person.name | 155 | person.name |
| 156 | end | 156 | end |
| 157 | - | ||
| 158 | - def first_name | ||
| 159 | - person.first_name | ||
| 160 | - end | ||
| 161 | 157 | ||
| 162 | protected | 158 | protected |
| 163 | # before filter | 159 | # before filter |
app/views/shared/user_menu.rhtml
| @@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
| 9 | (current_user.person.image)? | 9 | (current_user.person.image)? |
| 10 | current_user.person.image.public_filename(:icon) : "/images/icons-bar/photo.png" | 10 | current_user.person.image.public_filename(:icon) : "/images/icons-bar/photo.png" |
| 11 | %>" alt="<%= current_user.name %> Icon-Photo" title="" height="20" border="0"/> | 11 | %>" alt="<%= current_user.name %> Icon-Photo" title="" height="20" border="0"/> |
| 12 | - <span><%= _("%s's Menu") % current_user.first_name %> </span> | 12 | + <span><%= _("%s's Menu") % current_user.display_name %> </span> |
| 13 | </div> | 13 | </div> |
| 14 | 14 | ||
| 15 | <div id="user_menu_ul"> | 15 | <div id="user_menu_ul"> |