changed name method of member profile and also changed name in orbit bar

This commit is contained in:
Harry Bomrah 2014-05-26 16:48:06 +08:00
parent 791148ce1b
commit 5773a826e4
2 changed files with 4 additions and 2 deletions

View File

@ -23,6 +23,8 @@ class MemberProfile
paginates_per 10 paginates_per 10
def name def name
if self.first_name || self.last_name
"#{self.first_name} #{self.last_name}" "#{self.first_name} #{self.last_name}"
end end
end
end end

View File

@ -90,7 +90,7 @@
</li> </li>
<% if !current_user.nil? %> <% if !current_user.nil? %>
<li> <li>
<span id="user"><%= current_user.member_profile.nil? ? current_user.user_name : current_user.member_profile.name %></span> <span id="user"><%= current_user.member_profile.name.nil? ? current_user.user_name : current_user.member_profile.name %></span>
<ul> <ul>
<li> <li>
<a href="/logout"><i class="icons-logout"></i><%= t(:logout) %></a> <a href="/logout"><i class="icons-logout"></i><%= t(:logout) %></a>