FIX: Don't link to web sites for TL0
This commit is contained in:
parent
4f416bf6ce
commit
c037371be1
|
@ -1,11 +1,3 @@
|
|||
/**
|
||||
This controller handles general user actions
|
||||
|
||||
@class UserController
|
||||
@extends Discourse.ObjectController
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
export default Discourse.ObjectController.extend({
|
||||
|
||||
viewingSelf: function() {
|
||||
|
@ -14,6 +6,14 @@ export default Discourse.ObjectController.extend({
|
|||
|
||||
collapsedInfo: Em.computed.not('indexStream'),
|
||||
|
||||
websiteName: function() {
|
||||
var website = this.get('website');
|
||||
if (Em.isEmpty(website)) { return; }
|
||||
return this.get('website').split("/")[2];
|
||||
}.property('website'),
|
||||
|
||||
linkWebsite: Em.computed.not('isBasic'),
|
||||
|
||||
canSeePrivateMessages: function() {
|
||||
return this.get('viewingSelf') || Discourse.User.currentProp('admin');
|
||||
}.property('viewingSelf'),
|
||||
|
|
|
@ -52,19 +52,6 @@ Discourse.User = Discourse.Model.extend({
|
|||
return this.get('username');
|
||||
}.property('username', 'name'),
|
||||
|
||||
/**
|
||||
This user's website.
|
||||
|
||||
@property websiteName
|
||||
@type {String}
|
||||
**/
|
||||
websiteName: function() {
|
||||
var website = this.get('website');
|
||||
if (Em.isEmpty(website)) { return; }
|
||||
|
||||
return this.get('website').split("/")[2];
|
||||
}.property('website'),
|
||||
|
||||
/**
|
||||
This user's profile background(in CSS).
|
||||
|
||||
|
@ -129,6 +116,7 @@ Discourse.User = Discourse.Model.extend({
|
|||
return Discourse.Site.currentProp('trustLevels').findProperty('id', parseInt(this.get('trust_level'), 10));
|
||||
}.property('trust_level'),
|
||||
|
||||
isBasic: Em.computed.equal('trust_level', 0),
|
||||
isLeader: Em.computed.equal('trust_level', 3),
|
||||
isElder: Em.computed.equal('trust_level', 4),
|
||||
canManageTopic: Em.computed.or('staff', 'isElder'),
|
||||
|
|
|
@ -107,7 +107,14 @@
|
|||
<dd><i class="fa fa-map-marker"></i> {{location}}</dd>
|
||||
{{/if}}
|
||||
{{#if websiteName}}
|
||||
<dt>{{i18n user.website}}</dt><dd><a {{bind-attr href="website"}} target="_blank">{{websiteName}}</a></dd>
|
||||
<dt>{{i18n user.website}}</dt>
|
||||
<dd>
|
||||
{{#if linkWebsite}}
|
||||
<a {{bind-attr href="website"}} rel="nofollow" target="_blank">{{websiteName}}</a>
|
||||
{{else}}
|
||||
<span {{bind-attr title="website"}}>{{websiteName}}</span>
|
||||
{{/if}}
|
||||
</dd>
|
||||
{{/if}}
|
||||
{{#if created_at}}
|
||||
<dt>{{i18n user.created}}</dt><dd>{{bound-date created_at}}</dd>
|
||||
|
|
Loading…
Reference in New Issue