mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 11:20:57 -06:00
FEATURE: users can see the raw email source of their own posts
This commit is contained in:
parent
ec76be964e
commit
988835a9a3
@ -65,8 +65,8 @@ Discourse.Post = Discourse.Model.extend({
|
||||
postElementId: Discourse.computed.fmt('post_number', 'post_%@'),
|
||||
|
||||
canViewRawEmail: function() {
|
||||
return Discourse.User.currentProp('staff');
|
||||
}.property(),
|
||||
return this.get("user_id") === Discourse.User.currentProp("id") || Discourse.User.currentProp('staff');
|
||||
}.property("user_id"),
|
||||
|
||||
bookmarkedChanged: function() {
|
||||
Discourse.Post.bookmark(this.get('id'), this.get('bookmarked'))
|
||||
|
@ -50,16 +50,16 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if wiki}}
|
||||
<div class="post-info wiki" title="{{i18n post.wiki.about}}" {{action "editPost" this}}><i class="fa fa-pencil-square-o"></i></div>
|
||||
<div class="post-info wiki" title="{{i18n post.wiki.about}}" {{action "editPost" this}}>{{fa-icon "pencil-square-o"}}</div>
|
||||
{{/if}}
|
||||
{{#if via_email}}
|
||||
{{#if canViewRawEmail}}
|
||||
<div class="post-info via-email raw-email" title="{{i18n post.via_email}}" {{action "showRawEmail" this}}><i class="fa fa-envelope-o"></i></div>
|
||||
<div class="post-info via-email raw-email" title="{{i18n post.via_email}}" {{action "showRawEmail" this}}>{{fa-icon "envelope-o"}}</div>
|
||||
{{else}}
|
||||
<div class="post-info via-email" title="{{i18n post.via_email}}"><i class="fa fa-envelope-o"></i></div>
|
||||
<div class="post-info via-email" title="{{i18n post.via_email}}">{{fa-icon "envelope-o"}}</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
<div {{bind-attr class=":read-state read"}} title="{{i18n post.unread}}"><i class='fa fa-circle'></i></div>
|
||||
<div {{bind-attr class=":read-state read"}} title="{{i18n post.unread}}">{{fa-icon "circle"}}</div>
|
||||
</div>
|
||||
|
||||
<div {{bind-attr class=":select-posts controller.multiSelect::hidden"}}>
|
||||
|
Loading…
Reference in New Issue
Block a user