UX: Full page search results weren't linked to users

This commit is contained in:
Robin Ward 2016-08-11 14:27:19 -04:00
parent 431c211ec2
commit 6507246e97
2 changed files with 5 additions and 2 deletions

View File

@ -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;

View File

@ -63,7 +63,9 @@
{{#each model.posts as |result|}}
<div class='fps-result'>
<div class='author'>
<a href={{result.userPath}} data-user-card="{{unbound result.username}}">
{{avatar result imageSize="large"}}
</a>
</div>
<div class='fps-topic'>