Commit a719cce1 by Ibrahim Awwal

Fix anonymous posts on the inline discussion view.

parent b8c2a5cb
...@@ -38,8 +38,6 @@ if Backbone? ...@@ -38,8 +38,6 @@ if Backbone?
thisButton.addClass('shown') thisButton.addClass('shown')
thisButton.find('.button-text').html("Hide Discussion") thisButton.find('.button-text').html("Hide Discussion")
console.log($(event.target))
if @retrieved if @retrieved
@$("section.discussion").slideDown() @$("section.discussion").slideDown()
@showed = true @showed = true
......
...@@ -24,7 +24,10 @@ if Backbone? ...@@ -24,7 +24,10 @@ if Backbone?
render: -> render: ->
if not @model.has('abbreviatedBody') if not @model.has('abbreviatedBody')
@abbreviateBody() @abbreviateBody()
@$el.html(Mustache.render(@template(), $.extend(@model.toJSON(),{expanded: @expanded}) )) params = $.extend(@model.toJSON(),{expanded: @expanded})
if not @model.get('anonymous')
params = $.extend(params, user:{username: @model.username, user_url: @model.user_url})
@$el.html(Mustache.render(@template(), params))
@initLocal() @initLocal()
@delegateEvents() @delegateEvents()
@renderDogear() @renderDogear()
......
...@@ -6,7 +6,12 @@ ...@@ -6,7 +6,12 @@
<h3>{{title}}</h3> <h3>{{title}}</h3>
<p class="posted-details"> <p class="posted-details">
<span class="timeago" title="{{created_at}}">{{created_at}}</span> by <span class="timeago" title="{{created_at}}">{{created_at}}</span> by
{{#user}}
<a href="{{user_url}}">{{username}}</a> <a href="{{user_url}}">{{username}}</a>
{{/user}}
{{^user}}
anonymous
{{/user}}
<span class="post-status-closed top-post-status" style="display: none"> <span class="post-status-closed top-post-status" style="display: none">
&bull; This thread is closed. &bull; This thread is closed.
</span> </span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment