title now updates with switch
This commit is contained in:
parent
22cda15aa8
commit
879b3d135a
3 changed files with 7 additions and 2 deletions
|
|
@ -78,7 +78,7 @@ class PostPresenter
|
|||
|
||||
def title
|
||||
if post.text.present?
|
||||
post.text
|
||||
post.text(:plain_text => true)
|
||||
else
|
||||
I18n.translate('posts.presenter.title', :name => post.author.name)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class TemplatePicker
|
|||
end
|
||||
|
||||
def note?
|
||||
self.status? && post.text.length > 300
|
||||
self.status? && post.text(:plain_text => true).length > 200
|
||||
end
|
||||
|
||||
def rich_media?
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ app.pages.PostViewer = app.views.Base.extend({
|
|||
},
|
||||
|
||||
initViews : function() {
|
||||
/* init view */
|
||||
this.authorView = new app.views.PostViewerAuthor({ model : this.model });
|
||||
this.interactionsView = new app.views.PostViewerInteractions({ model : this.model });
|
||||
this.navView = new app.views.PostViewerNav({ model : this.model });
|
||||
|
|
@ -47,6 +48,10 @@ app.pages.PostViewer = app.views.Base.extend({
|
|||
},
|
||||
|
||||
postRenderTemplate : function() {
|
||||
/* set the document title */
|
||||
console.log(this.model)
|
||||
document.title = this.model.get("title");
|
||||
|
||||
this.bindNavHooks();
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue