Hide report icon on SPV if author is current user
This commit is contained in:
parent
dec7ef667e
commit
10117b81b3
2 changed files with 16 additions and 4 deletions
|
|
@ -7,6 +7,12 @@ app.views.SinglePostActions = app.views.Feedback.extend({
|
||||||
}, app.views.Feedback.prototype.events);
|
}, app.views.Feedback.prototype.events);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
presenter: function() {
|
||||||
|
return _.extend(this.defaultPresenter(), {
|
||||||
|
authorIsNotCurrentUser : this.authorIsNotCurrentUser(),
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
renderPluginWidgets : function() {
|
renderPluginWidgets : function() {
|
||||||
app.views.Base.prototype.renderPluginWidgets.apply(this);
|
app.views.Base.prototype.renderPluginWidgets.apply(this);
|
||||||
this.$('a').tooltip({placement: 'bottom'});
|
this.$('a').tooltip({placement: 'bottom'});
|
||||||
|
|
@ -16,6 +22,10 @@ app.views.SinglePostActions = app.views.Feedback.extend({
|
||||||
$('.comment_stream .comment_box').focus();
|
$('.comment_stream .comment_box').focus();
|
||||||
$('html,body').animate({scrollTop: $('.comment_stream .comment_box').offset().top - ($('.comment_stream .comment_box').height() + 20)});
|
$('html,body').animate({scrollTop: $('.comment_stream .comment_box').offset().top - ($('.comment_stream .comment_box').height() + 20)});
|
||||||
return false;
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
authorIsNotCurrentUser: function() {
|
||||||
|
return app.currentUser.authenticated() && this.model.get("author").id != app.user().id
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,10 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if authorIsNotCurrentUser}}
|
||||||
<a href="#" data-type="post" class="post_report" title="{{t "report.name"}}">
|
<a href="#" data-type="post" class="post_report" title="{{t "report.name"}}">
|
||||||
<i class="entypo gray large">!</i>
|
<i class="entypo gray large">!</i>
|
||||||
</a>
|
</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue