From 6507246e9790300843ca9f4c72243e7e9e5d62be Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 11 Aug 2016 14:27:19 -0400 Subject: [PATCH] UX: Full page search results weren't linked to users --- app/assets/javascripts/discourse/lib/search.js.es6 | 3 ++- .../javascripts/discourse/templates/full-page-search.hbs | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/lib/search.js.es6 b/app/assets/javascripts/discourse/lib/search.js.es6 index 0598515b2..8a5063e00 100644 --- a/app/assets/javascripts/discourse/lib/search.js.es6 +++ b/app/assets/javascripts/discourse/lib/search.js.es6 @@ -22,7 +22,8 @@ export function translateResults(results, opts) { return topic; }); - results.posts = results.posts.map(function(post){ + results.posts = results.posts.map(post => { + post.userPath = Discourse.getURL(`/users/${post.username.toLowerCase()}`); post = Post.create(post); post.set('topic', topicMap[post.topic_id]); return post; diff --git a/app/assets/javascripts/discourse/templates/full-page-search.hbs b/app/assets/javascripts/discourse/templates/full-page-search.hbs index 5a57cfa87..f2d344586 100644 --- a/app/assets/javascripts/discourse/templates/full-page-search.hbs +++ b/app/assets/javascripts/discourse/templates/full-page-search.hbs @@ -63,7 +63,9 @@ {{#each model.posts as |result|}}
- {{avatar result imageSize="large"}} + + {{avatar result imageSize="large"}} +