mirror of
https://github.com/discourse/discourse.git
synced 2026-08-07 11:45:21 -05:00
UX: show complete URL path if website domain is same as instance domain
This commit is contained in:
@@ -14,12 +14,6 @@ export default ObjectController.extend(CanCheckEmails, {
|
||||
|
||||
collapsedInfo: Em.computed.not('indexStream'),
|
||||
|
||||
websiteName: function() {
|
||||
var website = this.get('model.website');
|
||||
if (Em.isEmpty(website)) { return; }
|
||||
return website.split("/")[2];
|
||||
}.property('model.website'),
|
||||
|
||||
linkWebsite: Em.computed.not('model.isBasic'),
|
||||
|
||||
removeNoFollow: function() {
|
||||
|
||||
@@ -56,7 +56,7 @@ const User = RestModel.extend({
|
||||
/**
|
||||
This user's profile background(in CSS).
|
||||
|
||||
@property websiteName
|
||||
@property profileBackground
|
||||
@type {String}
|
||||
**/
|
||||
profileBackground: function() {
|
||||
|
||||
@@ -63,12 +63,12 @@
|
||||
{{/if}}
|
||||
<h3>
|
||||
{{#if model.location}}{{fa-icon "map-marker"}} {{model.location}}{{/if}}
|
||||
{{#if websiteName}}
|
||||
{{#if model.website_name}}
|
||||
{{fa-icon "globe"}}
|
||||
{{#if linkWebsite}}
|
||||
<a href={{model.website}} rel={{unless removeNoFollow 'nofollow'}} target="_blank">{{websiteName}}</a>
|
||||
<a href={{model.website}} rel={{unless removeNoFollow 'nofollow'}} target="_blank">{{model.website_name}}</a>
|
||||
{{else}}
|
||||
<span title={{model.website}}>{{websiteName}}</span>
|
||||
<span title={{model.website}}>{{model.website_name}}</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</h3>
|
||||
|
||||
Reference in New Issue
Block a user