mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 21:10:17 +08:00
FIX: layout for location and website on user card when bio not displayed.
This commit is contained in:
parent
374657d9d5
commit
08298036e3
|
@ -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() {
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user