diff --git a/app/assets/javascripts/discourse/models/post.js.es6 b/app/assets/javascripts/discourse/models/post.js.es6 index 9e720b36d16..d7ee374c869 100644 --- a/app/assets/javascripts/discourse/models/post.js.es6 +++ b/app/assets/javascripts/discourse/models/post.js.es6 @@ -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() { diff --git a/app/assets/javascripts/discourse/templates/components/search-result-post.hbs b/app/assets/javascripts/discourse/templates/components/search-result-post.hbs index da9737daf42..969ea53a65b 100644 --- a/app/assets/javascripts/discourse/templates/components/search-result-post.hbs +++ b/app/assets/javascripts/discourse/templates/components/search-result-post.hbs @@ -1,5 +1,6 @@ {{#each results as |result|}} - + {{log result}} + {{i18n 'search.post_format' post_number=result.post_number username=result.username}}