Skip to content

Instantly share code, notes, and snippets.

@DeskWOW
Last active June 27, 2017 18:36
Show Gist options
  • Save DeskWOW/e186a050f624ca637d845cee341f62a1 to your computer and use it in GitHub Desktop.
Save DeskWOW/e186a050f624ca637d845cee341f62a1 to your computer and use it in GitHub Desktop.
Gmail style email reply theme for Desk.com
{% assign emails = case.emails_for_reply_theme %}
{% assign threadlength = emails.size|minus:1 %}
{% for email in emails reversed %}
{% if forloop.first %}
{{email.new_html}}
{% if email.agent %}
{% if email.agent.signature %}
<div style="margin-top:10px;"> {{email.agent.signature | newline_to_br}}</div>
{% else %}
<p>
--<br />
{{email.agent.name_public}}<br />
</p>
{% endif %}
{% endif %}
{% else %}
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On {{email.created_at | date: "%b %d, %Y"}} at {{email.created_at | in_time_zone: site.timezone | date: "%I:%M%p %Z"}} {{email.from}} &lt;{{email.from_address}}&gt; wrote:<br/><br />
{{email.new_html}}
{% if email.agent %}
{% if email.agent.signature %}
<div style="margin-top:10px;"> {{email.agent.signature | newline_to_br}}</div>
{% else %}
<p>
--<br />
{{email.agent.name_public}}<br />
</p>
{% endif %}
{% endif %}
{% endif %}
<br />
{% endfor %}
{% for i in (1..threadlength) %} {{ '</blockquote>' }} {% endfor %}
@ThemesForDesk
Copy link

For more branding options try Themes For Desk Email reply theme (Lotus)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment