Fix anonymous posts on the inline discussion view.
This commit is contained in:
@@ -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,14 +6,19 @@
|
||||
<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">
|
||||
• This thread is closed.
|
||||
</span>
|
||||
</p>
|
||||
</header>
|
||||
<div class="post-body">{{abbreviatedBody}}</div>
|
||||
|
||||
|
||||
<ul class="moderator-actions post-extended-content">
|
||||
<li style="display: none"><a class="action-edit" href="javascript:void(0)"><span class="edit-icon"></span> Edit</a></li>
|
||||
<li style="display: none"><a class="action-delete" href="javascript:void(0)"><span class="delete-icon"></span> Delete</a></li>
|
||||
|
||||
Reference in New Issue
Block a user