-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Daily message now being emailed again.
- Loading branch information
Showing
7 changed files
with
96 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,99 @@ | ||
<% email = email.emails.last %> | ||
<% span = email.questions.empty? ? 0 : 150 %> | ||
<% col_span_inc = span > 0 ? 1 : 0 %> | ||
<table cellspacing="0" cellpadding="0" border="0" class="email-html" width="940px" id="email_#{email.id}"> | ||
<% if email %> | ||
<% span = email.questions.empty? ? 0 : 150 %> | ||
<% col_span_inc = span > 0 ? 1 : 0 %> | ||
|
||
<tr class="email-time"> | ||
<td width="50px text-center"> | ||
<h4> | ||
<%= email.received_on.strftime("%I:%M %p") %> | ||
</h4> | ||
</td> | ||
<td width="790px" colspan="<%= 4 + col_span_inc %>"> | ||
<hr/> | ||
</td> | ||
</tr> | ||
<table cellspacing="0" cellpadding="0" border="0" class="email-html" width="940px" id="email_#{email.id}"> | ||
|
||
<tr class="email-data"> | ||
<td width="50px" class="email-image text-center"> | ||
<% if email.active_profile_images.present? %> | ||
<%= image_tag email.active_profile_images.first.image_url(:bright_face_small), class: "img-circle" %> | ||
<% else %> | ||
<div class="first-letter text-uppercase img-rounded" style="background: #<%= string_color(email.from_name) %>;"> | ||
<%= name_initials(email.from_name) %> | ||
</div> | ||
<% end %> | ||
</td> | ||
<tr class="email-time"> | ||
<td width="50px text-center"> | ||
<h4> | ||
<%= email.received_on.strftime("%I:%M %p") %> | ||
</h4> | ||
</td> | ||
<td width="790px" colspan="<%= 4 + col_span_inc %>"> | ||
<hr/> | ||
</td> | ||
</tr> | ||
|
||
<tr class="email-data"> | ||
<td width="50px" class="email-image text-center"> | ||
<% if email.active_profile_images.present? %> | ||
<%= image_tag email.active_profile_images.first.image_url(:bright_face_small), class: "img-circle" %> | ||
<% else %> | ||
<div class="first-letter text-uppercase img-rounded" style="background: #<%= string_color(email.from_name) %>;"> | ||
<%= name_initials(email.from_name) %> | ||
</div> | ||
<% end %> | ||
</td> | ||
|
||
<td width="10px"> | ||
| ||
</td> | ||
<td width="10px"> | ||
| ||
</td> | ||
|
||
|
||
<td class="email-body" width="<%= 590 - span %>px"> | ||
<table width="<%= 590 - span %>px"> | ||
<tr> | ||
<td> | ||
<span class="email-displayname text-capitalize"> | ||
<%= subject_label(email, current_user) %> | ||
</span> | ||
<span class="email-displayname-action"> | ||
<%= action_label(email, current_user, email.email_thread.emails_count) %>.. | ||
</span> | ||
</td> | ||
</tr> | ||
<td class="email-body" width="<%= 590 - span %>px"> | ||
<table width="<%= 590 - span %>px"> | ||
<tr> | ||
<td> | ||
<span class="email-displayname text-capitalize"> | ||
<%= subject_label(email, current_user) %> | ||
</span> | ||
<span class="email-displayname-action"> | ||
<%= action_label(email, current_user, email.email_thread.emails_count) %>.. | ||
</span> | ||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td> | ||
<h4 class="email-subject"> | ||
<span class="subject text-uppercase <%= muted_text(email) %>"> | ||
<%= email.subject %> | ||
</span> | ||
</h4> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<h4 class="email-subject"> | ||
<span class="subject text-uppercase <%= muted_text(email) %>"> | ||
<%= email.subject %> | ||
</span> | ||
</h4> | ||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td> | ||
<span class="<%= email_body_class(email.body) %> <%= muted_text(email) %>"> | ||
<% if muted_text?(email) %> | ||
<%= truncate_html(highlight_body(email_body_display("<s>#{email.body}</s>".html_safe, email.content_type), email.questions), length: 100) %> | ||
<br/> | ||
(NO FOLLOW UP NEEDED) | ||
<% else %> | ||
<%= highlight_body(email_body_display(email.body, email.content_type), email.questions) %> | ||
<% end %> | ||
</span> | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
<tr> | ||
<td> | ||
<span class="<%= email_body_class(email.body) %> <%= muted_text(email) %>"> | ||
<% if muted_text?(email) %> | ||
<%= truncate_html(highlight_body(email_body_display("<s>#{email.body}</s>".html_safe, email.content_type), email.questions), length: 100) %> | ||
<br/> | ||
(NO FOLLOW UP NEEDED) | ||
<% else %> | ||
<%= highlight_body(email_body_display(email.body, email.content_type), email.questions) %> | ||
<% end %> | ||
</span> | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
|
||
<% if span > 0 %> | ||
<td width="<%= span %>px" class="email-highlighs"> | ||
<% if email.questions.present? %> | ||
<blockquote> | ||
<%= highlight_questions(email.questions) %> | ||
</blockquote> | ||
<% end %> | ||
<% if span > 0 %> | ||
<td width="<%= span %>px" class="email-highlighs"> | ||
<% if email.questions.present? %> | ||
<blockquote> | ||
<%= highlight_questions(email.questions) %> | ||
</blockquote> | ||
<% end %> | ||
</td> | ||
<% end %> | ||
|
||
<tr> | ||
<td colspan="2"> | ||
| ||
</td> | ||
<td colspan="<%= 2 + col_span_inc %>" class="email-actions"> | ||
<% c = muted_text(email) ? "" : "btn-primary" %> | ||
<%= render partial: "shared/follow_up_respond_buttons", locals: {email: email, current_user: current_user, btn_class: c} %> | ||
| ||
<%= link_to "Ignore ".html_safe, email_url(email, destroy: true), target: "_blank", class: "btn btn-danger" %> | ||
</td> | ||
<% end %> | ||
</tr> | ||
|
||
<tr> | ||
<td colspan="2"> | ||
| ||
</td> | ||
<td colspan="<%= 2 + col_span_inc %>" class="email-actions"> | ||
<% c = muted_text(email) ? "" : "btn-primary" %> | ||
<%= render partial: "shared/follow_up_respond_buttons", locals: {email: email, current_user: current_user, btn_class: c} %> | ||
| ||
<%= link_to "Ignore ".html_safe, email_url(email, destroy: true), target: "_blank", class: "btn btn-danger" %> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
</table> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters