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), showMoreBadges: Em.computed.gt('moreBadgesCount', 0),
showDelete: Em.computed.and("viewingAdmin", "showName", "user.canBeDeleted"), showDelete: Em.computed.and("viewingAdmin", "showName", "user.canBeDeleted"),
linkWebsite: Em.computed.not('user.isBasic'), linkWebsite: Em.computed.not('user.isBasic'),
hasLocationOrWebsite: Em.computed.or('user.location', 'user.website_name'),
@computed('user.user_fields.@each.value') @computed('user.user_fields.@each.value')
publicUserFields() { publicUserFields() {

View File

@ -55,7 +55,8 @@
{{/link-to}} {{/link-to}}
{{/if}} {{/if}}
<div> {{#if hasLocationOrWebsite}}
<div class="location-and-website">
{{#if user.location}} {{#if user.location}}
<span class='location'>{{fa-icon "map-marker"}} {{user.location}}</span> <span class='location'>{{fa-icon "map-marker"}} {{user.location}}</span>
{{/if}} {{/if}}
@ -71,6 +72,7 @@
</span> </span>
{{/if}} {{/if}}
</div> </div>
{{/if}}
{{#if user}} {{#if user}}
<div class="metadata"> <div class="metadata">

View File

@ -159,11 +159,15 @@ $user_card_background: #222;
} }
} }
.location-and-website {
clear: left;
.website-name { .website-name {
a { a {
color: $user_card_primary; color: $user_card_primary;
} }
} }
}
img.avatar { img.avatar {
float: left; float: left;