This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/views/topic_extra_info_view.js

25 lines
667 B
JavaScript

/**
This view is used for rendering the extra information on a topic in the header
@class TopicExtraInfoView
@extends Discourse.View
@namespace Discourse
@module Discourse
**/
Discourse.TopicExtraInfoView = Ember.ContainerView.extend({
classNameBindings: [':extra-info-wrapper', 'controller.showExtraInfo'],
childViews: ['extraInfo'],
extraInfo: Em.View.createWithMixins({
templateName: 'topic_extra_info',
classNames: ['extra-info'],
topicBinding: 'controller.topic',
showFavoriteButton: function() {
return Discourse.User.current() && !this.get('topic.isPrivateMessage');
}.property('topic.isPrivateMessage')
})
});