UX: show complete URL path if website domain is same as instance domain

This commit is contained in:
Arpit Jalan
2015-08-12 01:19:20 +05:30
parent 7a5fbae060
commit 267d8be1f5
5 changed files with 44 additions and 12 deletions
@@ -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>