mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 02:13:41 +08:00
FEATURE: check nofollow setting when showing website
This commit is contained in:
parent
2282869f30
commit
8366b71176
|
@ -19,6 +19,10 @@ export default ObjectController.extend(CanCheckEmails, {
|
||||||
|
|
||||||
linkWebsite: Em.computed.not('isBasic'),
|
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'),
|
canSeePrivateMessages: Ember.computed.or('viewingSelf', 'currentUser.admin'),
|
||||||
canSeeNotificationHistory: Em.computed.alias('canSeePrivateMessages'),
|
canSeeNotificationHistory: Em.computed.alias('canSeePrivateMessages'),
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,11 @@
|
||||||
{{#if websiteName}}
|
{{#if websiteName}}
|
||||||
{{fa-icon "globe"}}
|
{{fa-icon "globe"}}
|
||||||
{{#if linkWebsite}}
|
{{#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}}
|
{{else}}
|
||||||
<span {{bind-attr title="website"}}>{{websiteName}}</span>
|
<span {{bind-attr title="website"}}>{{websiteName}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -611,7 +611,9 @@ trust:
|
||||||
tl3_requires_likes_received:
|
tl3_requires_likes_received:
|
||||||
default: 20
|
default: 20
|
||||||
min: 0
|
min: 0
|
||||||
tl3_links_no_follow: false
|
tl3_links_no_follow:
|
||||||
|
default: false
|
||||||
|
client: true
|
||||||
|
|
||||||
security:
|
security:
|
||||||
use_https: false
|
use_https: false
|
||||||
|
|
Loading…
Reference in New Issue
Block a user