mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Not passing correct title
through to share
This commit is contained in:
parent
4f671724cc
commit
973f4ee699
@ -5,8 +5,10 @@ import computed from 'ember-addons/ember-computed-decorators';
|
|||||||
export default Ember.Controller.extend({
|
export default Ember.Controller.extend({
|
||||||
needs: ['topic'],
|
needs: ['topic'],
|
||||||
|
|
||||||
|
title: Ember.computed.alias('controllers.topic.model.title'),
|
||||||
|
|
||||||
@computed('type', 'postNumber')
|
@computed('type', 'postNumber')
|
||||||
title(type, postNumber) {
|
shareTitle(type, postNumber) {
|
||||||
if (type === 'topic') { return I18n.t('share.topic'); }
|
if (type === 'topic') { return I18n.t('share.topic'); }
|
||||||
if (postNumber) {
|
if (postNumber) {
|
||||||
return I18n.t('share.post', { postNumber });
|
return I18n.t('share.post', { postNumber });
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{{#if link}}
|
{{#if link}}
|
||||||
<h3>{{title}}</h3>
|
<h3>{{shareTitle}}</h3>
|
||||||
|
|
||||||
{{#if date}}
|
{{#if date}}
|
||||||
<span class="date">{{displayDate}}</span>
|
<span class="date">{{displayDate}}</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user