Merge pull request #4180 from mcwumbly/fix-user-card-location-layout

FIX: layout for location and website on user card when bio not displayed
This commit is contained in:
Régis Hanol 2016-04-19 07:48:58 +02:00
commit 3a19cabd31
3 changed files with 25 additions and 18 deletions

View File

@ -27,6 +27,7 @@ export default Ember.Controller.extend({
showMoreBadges: Em.computed.gt('moreBadgesCount', 0),
showDelete: Em.computed.and("viewingAdmin", "showName", "user.canBeDeleted"),
linkWebsite: Em.computed.not('user.isBasic'),
hasLocationOrWebsite: Em.computed.or('user.location', 'user.website_name'),
@computed('user.user_fields.@each.value')
publicUserFields() {

View File

@ -55,22 +55,24 @@
{{/link-to}}
{{/if}}
<div>
{{#if user.location}}
<span class='location'>{{fa-icon "map-marker"}} {{user.location}}</span>
{{/if}}
{{#if hasLocationOrWebsite}}
<div class="location-and-website">
{{#if user.location}}
<span class='location'>{{fa-icon "map-marker"}} {{user.location}}</span>
{{/if}}
{{#if user.website_name}}
<span class='website-name'>
{{fa-icon "globe"}}
{{#if linkWebsite}}
<a href={{user.website}} rel={{unless removeNoFollow 'nofollow'}} target="_blank">{{user.website_name}}</a>
{{else}}
<span title={{user.website}}>{{user.website_name}}</span>
{{/if}}
</span>
{{/if}}
</div>
{{#if user.website_name}}
<span class='website-name'>
{{fa-icon "globe"}}
{{#if linkWebsite}}
<a href={{user.website}} rel={{unless removeNoFollow 'nofollow'}} target="_blank">{{user.website_name}}</a>
{{else}}
<span title={{user.website}}>{{user.website_name}}</span>
{{/if}}
</span>
{{/if}}
</div>
{{/if}}
{{#if user}}
<div class="metadata">

View File

@ -159,9 +159,13 @@ $user_card_background: #222;
}
}
.website-name {
a {
color: $user_card_primary;
.location-and-website {
clear: left;
.website-name {
a {
color: $user_card_primary;
}
}
}