Commit a719cce1 by Ibrahim Awwal

Fix anonymous posts on the inline discussion view.

parent b8c2a5cb
......@@ -38,8 +38,6 @@ if Backbone?
thisButton.addClass('shown')
thisButton.find('.button-text').html("Hide Discussion")
console.log($(event.target))
if @retrieved
@$("section.discussion").slideDown()
@showed = true
......
......@@ -24,7 +24,10 @@ if Backbone?
render: ->
if not @model.has('abbreviatedBody')
@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()
@delegateEvents()
@renderDogear()
......
......@@ -6,7 +6,12 @@
<h3>{{title}}</h3>
<p class="posted-details">
<span class="timeago" title="{{created_at}}">{{created_at}}</span> by
{{#user}}
<a href="{{user_url}}">{{username}}</a>
{{/user}}
{{^user}}
anonymous
{{/user}}
<span class="post-status-closed top-post-status" style="display: none">
&bull; This thread is closed.
</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