Commit 6c8127c41bafa3bb22ab6dd94e0754684e0e48c7
1 parent
ffd09bcd
Exists in
master
and in
29 other branches
ActionItem360: Theme Zen3 56%
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1763 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
4 changed files
with
19 additions
and
5 deletions
Show diff stats
app/models/user.rb
@@ -109,6 +109,11 @@ class User < ActiveRecord::Base | @@ -109,6 +109,11 @@ class User < ActiveRecord::Base | ||
109 | def name | 109 | def name |
110 | person.name | 110 | person.name |
111 | end | 111 | end |
112 | + | ||
113 | + def first_name | ||
114 | + re = '[-+*_\s\'´"]' | ||
115 | + person.name.gsub(/^#{re}*/,'').split(/#{re}/)[0] | ||
116 | + end | ||
112 | 117 | ||
113 | protected | 118 | protected |
114 | # before filter | 119 | # 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.name %></span> | 12 | + <span><%= _("%s's Menu") % current_user.first_name %> </span> |
13 | </div> | 13 | </div> |
14 | 14 | ||
15 | <div id="user_menu_ul"> | 15 | <div id="user_menu_ul"> |
public/designs/themes/zen3/stylesheets/help.css
public/designs/themes/zen3/stylesheets/menu.css
@@ -58,6 +58,7 @@ | @@ -58,6 +58,7 @@ | ||
58 | top: 4px; | 58 | top: 4px; |
59 | right: 350px; | 59 | right: 350px; |
60 | width: 150px; | 60 | width: 150px; |
61 | + overflow: hidden; | ||
61 | padding: 2px 0px; | 62 | padding: 2px 0px; |
62 | border: 1px solid transparent; | 63 | border: 1px solid transparent; |
63 | } | 64 | } |
@@ -68,17 +69,24 @@ | @@ -68,17 +69,24 @@ | ||
68 | 69 | ||
69 | #user_menu_head { | 70 | #user_menu_head { |
70 | overflow: hidden; | 71 | overflow: hidden; |
71 | - line-height: 20px | 72 | + line-height: 20px; |
73 | + padding-left: 4px; | ||
74 | +} | ||
75 | + | ||
76 | +#user_menu_head img { | ||
77 | + margin-left: -20px; | ||
72 | } | 78 | } |
73 | 79 | ||
74 | -#user_menu_head a { | 80 | +#user_menu_head span { |
75 | color: #FFF; | 81 | color: #FFF; |
82 | + opacity: 0.6; | ||
83 | + filter: alpha(opacity=60); | ||
76 | } | 84 | } |
77 | 85 | ||
78 | #user_menu a { | 86 | #user_menu a { |
79 | color: #FFF; | 87 | color: #FFF; |
80 | - padding-top: 2px; | ||
81 | - padding-bottom: 2px; | 88 | + padding-top: 3px; |
89 | + padding-bottom: 1px; | ||
82 | } | 90 | } |
83 | #user_menu a:hover { | 91 | #user_menu a:hover { |
84 | background: #FCAF3E; | 92 | background: #FCAF3E; |