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({
needs: ['topic'],
title: Ember.computed.alias('controllers.topic.model.title'),
@computed('type', 'postNumber')
title(type, postNumber) {
shareTitle(type, postNumber) {
if (type === 'topic') { return I18n.t('share.topic'); }
if (postNumber) {
return I18n.t('share.post', { postNumber });

View file

@ -1,5 +1,5 @@
{{#if link}}
<h3>{{title}}</h3>
<h3>{{shareTitle}}</h3>
{{#if date}}
<span class="date">{{displayDate}}</span>