FIX: only show the reply as new topic when user can actually reply as new topic
This commit is contained in:
parent
af4391bbda
commit
0f809d4993
|
@ -6,6 +6,7 @@ export default Ember.Controller.extend({
|
|||
needs: ['topic'],
|
||||
|
||||
title: Ember.computed.alias('controllers.topic.model.title'),
|
||||
canReplyAsNewTopic: Ember.computed.alias('controllers.topic.model.details.can_reply_as_new_topic'),
|
||||
|
||||
@computed('type', 'postNumber')
|
||||
shareTitle(type, postNumber) {
|
||||
|
|
|
@ -14,9 +14,11 @@
|
|||
{{share-source source=s title=title action="share"}}
|
||||
{{/each}}
|
||||
|
||||
<div class='reply-as-new-topic'>
|
||||
<a href {{action "replyAsNewTopic"}} aria-label='{{i18n 'post.reply_as_new_topic'}}' title='{{i18n 'post.reply_as_new_topic'}}'>{{fa-icon "plus"}}{{i18n 'topic.create'}}</a>
|
||||
</div>
|
||||
{{#if canReplyAsNewTopic}}
|
||||
<div class='reply-as-new-topic'>
|
||||
<a href {{action "replyAsNewTopic"}} aria-label='{{i18n 'post.reply_as_new_topic'}}' title='{{i18n 'post.reply_as_new_topic'}}'>{{fa-icon "plus"}}{{i18n 'topic.create'}}</a>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class='link'>
|
||||
<a href {{action "close"}} aria-label='{{i18n 'share.close'}}' title='{{i18n 'share.close'}}'>{{fa-icon "close"}}</a>
|
||||
|
|
Loading…
Reference in New Issue