diff --git a/app/models/post.rb b/app/models/post.rb index 85320e133..9092fde83 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -90,6 +90,10 @@ class Post < ActiveRecord::Base includes(:post_details).find_by(post_details: { key: key, value: value }) end + def whisper? + post_type == Post.types[:whisper] + end + def add_detail(key, value, extra = nil) post_details.build(key: key, value: value, extra: extra) end diff --git a/app/views/email/_post.html.erb b/app/views/email/_post.html.erb index 48da134ce..75510c19a 100644 --- a/app/views/email/_post.html.erb +++ b/app/views/email/_post.html.erb @@ -1,4 +1,4 @@ - +
diff --git a/lib/email/styles.rb b/lib/email/styles.rb index cfd3f674d..9d51219b5 100644 --- a/lib/email/styles.rb +++ b/lib/email/styles.rb @@ -89,6 +89,7 @@ module Email style('hr', 'background-color: #ddd; height: 1px; border: 1px;') style('.rtl', 'direction: rtl;') style('td.body', 'padding-top:5px;', colspan: "2") + style('.whisper td.body', 'font-style: italic; color: #9c9c9c;') correct_first_body_margin correct_footer_style reset_tables