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:
commit
3a19cabd31
|
@ -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() {
|
||||||
|
|
|
@ -55,22 +55,24 @@
|
||||||
{{/link-to}}
|
{{/link-to}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div>
|
{{#if hasLocationOrWebsite}}
|
||||||
{{#if user.location}}
|
<div class="location-and-website">
|
||||||
<span class='location'>{{fa-icon "map-marker"}} {{user.location}}</span>
|
{{#if user.location}}
|
||||||
{{/if}}
|
<span class='location'>{{fa-icon "map-marker"}} {{user.location}}</span>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#if user.website_name}}
|
{{#if user.website_name}}
|
||||||
<span class='website-name'>
|
<span class='website-name'>
|
||||||
{{fa-icon "globe"}}
|
{{fa-icon "globe"}}
|
||||||
{{#if linkWebsite}}
|
{{#if linkWebsite}}
|
||||||
<a href={{user.website}} rel={{unless removeNoFollow 'nofollow'}} target="_blank">{{user.website_name}}</a>
|
<a href={{user.website}} rel={{unless removeNoFollow 'nofollow'}} target="_blank">{{user.website_name}}</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
<span title={{user.website}}>{{user.website_name}}</span>
|
<span title={{user.website}}>{{user.website_name}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</span>
|
</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#if user}}
|
{{#if user}}
|
||||||
<div class="metadata">
|
<div class="metadata">
|
||||||
|
|
|
@ -159,9 +159,13 @@ $user_card_background: #222;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.website-name {
|
.location-and-website {
|
||||||
a {
|
clear: left;
|
||||||
color: $user_card_primary;
|
|
||||||
|
.website-name {
|
||||||
|
a {
|
||||||
|
color: $user_card_primary;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue