- {{view "selected-posts"}}
+
+ {{partial "selected-posts"}}
+
@@ -115,12 +117,12 @@
{{#conditional-loading-spinner condition=model.postStream.loadingFilter}}
{{#if loadedAllPosts}}
- {{view "topic-closing" topic=model}}
+ {{topic-closing topic=model}}
{{#if session.showSignupCta}}
{{! replace "Log In to Reply" with the infobox }}
{{signup-cta}}
{{else}}
- {{view "topic-footer-buttons" topic=model}}
+ {{topic-footer-buttons topic=model}}
{{/if}}
{{#if model.pending_posts_count}}
@@ -137,14 +139,16 @@
{{/if}}
{{#if showSelectedPostsAtBottom}}
- {{view "selected-posts"}}
+
+ {{partial "selected-posts"}}
+
{{/if}}
{{plugin-outlet "topic-above-suggested"}}
{{#if model.details.suggested_topics.length}}
-
{{{view.suggestedTitle}}}
+
{{{suggestedTitle}}}
{{#if model.isPrivateMessage}}
{{basic-topic-list hideCategory="true"
@@ -155,7 +159,7 @@
{{basic-topic-list topics=model.details.suggested_topics postsAction="showTopicEntrance"}}
{{/if}}
-
{{{view.browseMoreMessage}}}
+
{{{browseMoreMessage}}}
{{/if}}
diff --git a/app/assets/javascripts/discourse/views/selected-posts.js.es6 b/app/assets/javascripts/discourse/views/selected-posts.js.es6
deleted file mode 100644
index 28f4375f3b6..00000000000
--- a/app/assets/javascripts/discourse/views/selected-posts.js.es6
+++ /dev/null
@@ -1,4 +0,0 @@
-export default Ember.View.extend({
- classNameBindings: ['controller.multiSelect::hidden', ':selected-posts'],
- templateName: "selected-posts",
-});
diff --git a/app/assets/javascripts/discourse/views/share.js.es6 b/app/assets/javascripts/discourse/views/share.js.es6
index 29ce3f95c69..96029481224 100644
--- a/app/assets/javascripts/discourse/views/share.js.es6
+++ b/app/assets/javascripts/discourse/views/share.js.es6
@@ -5,16 +5,6 @@ export default Ember.View.extend({
elementId: 'share-link',
classNameBindings: ['hasLink'],
- title: function() {
- if (this.get('controller.type') === 'topic') return I18n.t('share.topic');
- var postNumber = this.get('controller.postNumber');
- if (postNumber) {
- return I18n.t('share.post', {postNumber: this.get('controller.postNumber')});
- } else {
- return I18n.t('share.topic');
- }
- }.property('controller.type', 'controller.postNumber'),
-
hasLink: function() {
if (!Ember.isEmpty(this.get('controller.link'))) return 'visible';
return null;
diff --git a/app/assets/javascripts/discourse/views/topic.js.es6 b/app/assets/javascripts/discourse/views/topic.js.es6
index 6ef0621a528..08175db3006 100644
--- a/app/assets/javascripts/discourse/views/topic.js.es6
+++ b/app/assets/javascripts/discourse/views/topic.js.es6
@@ -1,7 +1,6 @@
import AddCategoryClass from 'discourse/mixins/add-category-class';
import AddArchetypeClass from 'discourse/mixins/add-archetype-class';
import ClickTrack from 'discourse/lib/click-track';
-import { categoryBadgeHTML } from 'discourse/helpers/category-link';
import Scrolling from 'discourse/mixins/scrolling';
const TopicView = Ember.View.extend(AddCategoryClass, AddArchetypeClass, Scrolling, {
@@ -134,60 +133,7 @@ const TopicView = Ember.View.extend(AddCategoryClass, AddArchetypeClass, Scrolli
// Trigger a scrolled event
this.appEvents.trigger('topic:scrolled', offset);
- },
-
- pmPath: function() {
- var currentUser = this.get('controller.currentUser');
- return currentUser && currentUser.pmPath(this.get('topic'));
- }.property(),
-
- browseMoreMessage: function() {
-
- // TODO decide what to show for pms
- if (this.get('topic.isPrivateMessage')) {
- return;
- }
-
- var opts = { latestLink: "" + I18n.t("topic.view_latest_topics") + "" },
- category = this.get('topic.category');
-
- if(category && Em.get(category, 'id') === Discourse.Site.currentProp("uncategorized_category_id")) {
- category = null;
- }
-
- if (category) {
- opts.catLink = categoryBadgeHTML(category);
- } else {
- opts.catLink = "" + I18n.t("topic.browse_all_categories") + "";
- }
-
- const tracking = this.get('topicTrackingState'),
- unreadTopics = tracking.countUnread(),
- newTopics = tracking.countNew();
-
- if (newTopics + unreadTopics > 0) {
- const hasBoth = unreadTopics > 0 && newTopics > 0;
-
- return I18n.messageFormat("topic.read_more_MF", {
- "BOTH": hasBoth,
- "UNREAD": unreadTopics,
- "NEW": newTopics,
- "CATEGORY": category ? true : false,
- latestLink: opts.latestLink,
- catLink: opts.catLink
- });
- } else if (category) {
- return I18n.t("topic.read_more_in_category", opts);
- } else {
- return I18n.t("topic.read_more", opts);
- }
- }.property('topicTrackingState.messageCount', 'topic'),
-
- suggestedTitle: function(){
- return this.get('controller.model.isPrivateMessage') ?
- " " + I18n.t("suggested_topics.pm_title") :
- I18n.t("suggested_topics.title");
- }.property('topic')
+ }
});
function highlight(postNumber) {