File tree Expand file tree Collapse file tree 3 files changed +18
-7
lines changed
Expand file tree Collapse file tree 3 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -162,4 +162,19 @@ public function getEditUrl()
162162 {
163163 return '/settings/users/ ' . $ this ->id ;
164164 }
165+
166+ /**
167+ * Get a shortened version of the user's name.
168+ * @param int $chars
169+ * @return string
170+ */
171+ public function getShortName ($ chars = 8 )
172+ {
173+ if (strlen ($ this ->name ) <= $ chars ) return $ this ->name ;
174+
175+ $ splitName = explode (' ' , $ this ->name );
176+ if (strlen ($ splitName [0 ]) <= $ chars ) return $ splitName [0 ];
177+
178+ return '' ;
179+ }
165180}
Original file line number Diff line number Diff line change @@ -56,18 +56,14 @@ header {
5656 padding-top : $-xxs ;
5757 }
5858 > i {
59- padding-top : $-xs * 1.2 ;
59+ padding-top : 4px ;
60+ font-size : 18px ;
6061 }
6162 @include smaller-than ($screen-md ) {
6263 padding-left : $-xs ;
6364 .name {
6465 display : none ;
6566 }
66- i {
67- font-size : 2em ;
68- padding-left : 0 ;
69- padding-top : 0 ;
70- }
7167 }
7268 }
7369 @include smaller-than ($screen-md ) {
Original file line number Diff line number Diff line change 5656 <div class =" dropdown-container" dropdown >
5757 <span class =" user-name" dropdown-toggle >
5858 <img class =" avatar" src =" {{ $currentUser -> getAvatar (30 )} }" alt =" {{ $currentUser -> name } }" >
59- <span class =" name" ng-non-bindable >{{ $currentUser -> name } } </span > <i class =" zmdi zmdi-caret-down" ></i >
59+ <span class =" name" ng-non-bindable >{{ $currentUser -> getShortName ( 9 ) } } </span > <i class =" zmdi zmdi-caret-down" ></i >
6060 </span >
6161 <ul >
6262 <li >
You can’t perform that action at this time.
0 commit comments