FIX: Not passing correct title through to share

This commit is contained in:
Robin Ward 2016-05-16 11:18:05 -04:00
parent 4f671724cc
commit 973f4ee699
No known key found for this signature in database
GPG Key ID: 0E091E2B4ED1B83D
2 changed files with 4 additions and 2 deletions

View File

@ -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 });

View File

@ -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>