Feature: Show location and website on user card. (#4157)
This commit is contained in:
parent
64df98e348
commit
c30784394f
|
@ -26,6 +26,7 @@ export default Ember.Controller.extend({
|
||||||
showBadges: setting('enable_badges'),
|
showBadges: setting('enable_badges'),
|
||||||
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'),
|
||||||
|
|
||||||
@computed('user.user_fields.@each.value')
|
@computed('user.user_fields.@each.value')
|
||||||
publicUserFields() {
|
publicUserFields() {
|
||||||
|
@ -40,6 +41,11 @@ export default Ember.Controller.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@computed("user.trust_level")
|
||||||
|
removeNoFollow(trustLevel) {
|
||||||
|
return trustLevel > 2 && !this.siteSettings.tl3_links_no_follow;
|
||||||
|
},
|
||||||
|
|
||||||
moreBadgesCount: function() {
|
moreBadgesCount: function() {
|
||||||
return this.get('user.badge_count') - this.get('user.featured_user_badges.length');
|
return this.get('user.badge_count') - this.get('user.featured_user_badges.length');
|
||||||
}.property('user.badge_count', 'user.featured_user_badges.@each'),
|
}.property('user.badge_count', 'user.featured_user_badges.@each'),
|
||||||
|
|
|
@ -55,6 +55,23 @@
|
||||||
{{/link-to}}
|
{{/link-to}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{#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}}
|
{{#if user}}
|
||||||
<div class="metadata">
|
<div class="metadata">
|
||||||
{{#if user.last_posted_at}}
|
{{#if user.last_posted_at}}
|
||||||
|
|
Loading…
Reference in New Issue