FEATURE: check nofollow setting when showing website

This commit is contained in:
Arpit Jalan 2015-05-11 12:06:28 +05:30
parent 2282869f30
commit 8366b71176
3 changed files with 12 additions and 2 deletions

View File

@ -19,6 +19,10 @@ export default ObjectController.extend(CanCheckEmails, {
linkWebsite: Em.computed.not('isBasic'),
removeNoFollow: function() {
return this.get('trust_level') > 2 && !this.siteSettings.tl3_links_no_follow;
}.property('trust_level'),
canSeePrivateMessages: Ember.computed.or('viewingSelf', 'currentUser.admin'),
canSeeNotificationHistory: Em.computed.alias('canSeePrivateMessages'),

View File

@ -71,7 +71,11 @@
{{#if websiteName}}
{{fa-icon "globe"}}
{{#if linkWebsite}}
<a {{bind-attr href="website"}} rel="nofollow" target="_blank">{{websiteName}}</a>
{{#if removeNoFollow}}
<a {{bind-attr href="website"}} target="_blank">{{websiteName}}</a>
{{else}}
<a {{bind-attr href="website"}} rel="nofollow" target="_blank">{{websiteName}}</a>
{{/if}}
{{else}}
<span {{bind-attr title="website"}}>{{websiteName}}</span>
{{/if}}

View File

@ -611,7 +611,9 @@ trust:
tl3_requires_likes_received:
default: 20
min: 0
tl3_links_no_follow: false
tl3_links_no_follow:
default: false
client: true
security:
use_https: false