diff --git a/app/assets/javascripts/discourse/models/_post.js b/app/assets/javascripts/discourse/models/_post.js index 620baf40138..ec9bfbbb38b 100644 --- a/app/assets/javascripts/discourse/models/_post.js +++ b/app/assets/javascripts/discourse/models/_post.js @@ -64,6 +64,10 @@ Discourse.Post = Discourse.Model.extend({ hasHistory: Em.computed.gt('version', 1), postElementId: Discourse.computed.fmt('post_number', 'post_%@'), + canViewRawEmail: function() { + return Discourse.User.currentProp('staff'); + }.property(), + bookmarkedChanged: function() { Discourse.Post.bookmark(this.get('id'), this.get('bookmarked')) .then(null, function (error) { diff --git a/app/assets/javascripts/discourse/templates/modal/raw_email.hbs b/app/assets/javascripts/discourse/templates/modal/raw_email.hbs index 522602dfa92..63e9256d942 100644 --- a/app/assets/javascripts/discourse/templates/modal/raw_email.hbs +++ b/app/assets/javascripts/discourse/templates/modal/raw_email.hbs @@ -2,6 +2,6 @@ {{#if raw_email}}
{{raw_email}}
{{else}} - Not Available! + {{i18n raw_email.not_available}} {{/if}} diff --git a/app/assets/javascripts/discourse/templates/post.hbs b/app/assets/javascripts/discourse/templates/post.hbs index ee1c1a1022e..90f06f2917c 100644 --- a/app/assets/javascripts/discourse/templates/post.hbs +++ b/app/assets/javascripts/discourse/templates/post.hbs @@ -53,7 +53,11 @@
{{/if}} {{#if via_email}} -
+ {{#if canViewRawEmail}} +
+ {{else}} +
+ {{/if}} {{/if}}
diff --git a/app/assets/javascripts/discourse/views/raw-email.es6 b/app/assets/javascripts/discourse/views/raw-email.es6 index fa6985e6fec..d529b1063b7 100644 --- a/app/assets/javascripts/discourse/views/raw-email.es6 +++ b/app/assets/javascripts/discourse/views/raw-email.es6 @@ -1,6 +1,6 @@ export default Discourse.ModalBodyView.extend({ templateName: 'modal/raw_email', - title: I18n.t('raw_email'), + title: I18n.t('raw_email.title'), resizeModal: function(){ var viewPortHeight = $(window).height(); diff --git a/app/assets/stylesheets/common/base/topic-post.scss b/app/assets/stylesheets/common/base/topic-post.scss index d103304e0c8..40d600f246e 100644 --- a/app/assets/stylesheets/common/base/topic-post.scss +++ b/app/assets/stylesheets/common/base/topic-post.scss @@ -122,18 +122,21 @@ aside.quote { .post-info { &.wiki, &.via-email { - cursor: pointer; margin-right: 5px; i.fa { font-size: 14px; } } &.wiki { + cursor: pointer; color: $wiki; } &.via-email { color: scale-color($primary, $lightness: 70%); } + &.raw-email { + cursor: pointer; + } } diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 097e61ca5cd..43d28447688 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -1382,9 +1382,13 @@ en: users_lowercase: "users" category_title: "Category" history: "History" - raw_email: "Raw Email" changed_by: "by {{author}}" + + raw_email: + title: "Raw Email" + not_available: "Not available!" + categories_list: "Categories List" filters: