mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 11:20:57 -06:00
FIX: Don't reload a topic when clicking the first post search result
This commit is contained in:
parent
0ff25a379c
commit
951d6ac28f
@ -50,6 +50,12 @@ const Post = RestModel.extend({
|
||||
return Discourse.Utilities.postUrl(this.get('topic.slug') || this.get('topic_slug'), this.get('topic_id'), this.get('post_number'));
|
||||
}.property('post_number', 'topic_id', 'topic.slug'),
|
||||
|
||||
// Don't drop the /1
|
||||
urlWithNumber: function() {
|
||||
const url = this.get('url');
|
||||
return (this.get('post_number') === 1) ? url + "/1" : url;
|
||||
}.property('post_number', 'url'),
|
||||
|
||||
usernameUrl: Discourse.computed.url('username', '/users/%@'),
|
||||
|
||||
showUserReplyTab: function() {
|
||||
|
@ -1,5 +1,6 @@
|
||||
{{#each results as |result|}}
|
||||
<a class='search-link' href='{{unbound result.url}}'>
|
||||
{{log result}}
|
||||
<a class='search-link' href='{{unbound result.urlWithNumber}}'>
|
||||
<span class='topic'>
|
||||
{{i18n 'search.post_format' post_number=result.post_number username=result.username}}
|
||||
</span>
|
||||
|
Loading…
Reference in New Issue
Block a user