mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
FEATURE: properly style whisper email notifications
This commit is contained in:
parent
2a84db73b5
commit
cf0558cd33
3 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<table class='post-wrapper'>
|
||||
<table class='post-wrapper <%= post.whisper? ? "whisper" : "" %>'>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class='user-avatar'>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue