bhubbard
9/2/2015 - 11:39 PM

I liked the Zendesk.com reply template but since I prefer Desk.com I prepared a template for Desk.com

I liked the Zendesk.com reply template but since I prefer Desk.com I prepared a template for Desk.com

{% assign emails = case.emails %}
{% assign threadlength = emails.size|minus:1 %}  
{% for email in emails reversed %}
 
{% if forloop.first %}
<table width="100%" cellpadding="0" cellspacing="0" border="0">
      <tr>                 
        <td width="100%" style="padding: 0; margin: 0;" valign="top"> 
          <p style="font=-size: 15px; line-height: 18px; margin-bottom: 0; margin-top: 0; padding:0; color:#1b1d1e;">
            <strong>{{email.agent.name_public}}</strong> (Place_your_web_here.com)
          </p>            
          <p style=" font-size: 13px; line-height: 25px; margin-bottom: 15px; margin-top: 0; padding: 0; color:#bbbbbb;">
              {{email.created_at | date: "%b %d, %Y"}}, {{email.created_at | in_time_zone: site.timezone | date: "%I:%M%p %Z"}}
          </p>
          <div style="color:#2b2e2f; font-size: 14px;line-height: 22px; margin: 15px 0 7px 0;">
            {{email.new_html}}
            
  
            {% if email.agent %}
            # Uncomment the followting lines if you wan't to give the oportunity to display the signature
            #{% if email.agent.signature %}
            #<div style="margin-top:10px;"> {{email.agent.signature | newline_to_br}}</div>
            #{% else %}
            <p>
              --<br />
              {{email.agent.name_public}}<br />
              Place_your_web_here.com
            </p>
            {% endif %}
            #{% endif %}
            # END
            
          <p></p>
          </div>
        </td>
      </tr>
    </table><p></p>

{% else %}
 
<div style="margin-top: 25px" data-version="2">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td width="100%" style="padding: 15px 0; border-top: 1px dotted #c5c5c5;">      
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
      <tr>                 
        <td width="100%" style="padding: 0; margin: 0;" valign="top"> 
          <p style=" font=-size: 15px; line-height: 18px; margin-bottom: 0; margin-top: 0; padding:0; color:#1b1d1e;">
            <strong>
              {% if email.agent %}
                {{email.agent.name_public}}
              {% else %}{% if customer.first_name %}
                {{customer.first_name}} {{customer.last_name}}
              {% else %}{% if email.from %}
                {{email.from}}
              {%else%}
                {{email.from_address}}
              {% endif %}{% endif %}{% endif %}
            </strong> {% if email.agent %}(Place_your_web_here.com){% endif %}
          </p>            
          <p style="font-size: 13px; line-height: 25px; margin-bottom: 15px; margin-top: 0; padding: 0; color:#bbbbbb;">
              {{email.created_at | date: "%b %d, %Y"}}, {{email.created_at | in_time_zone: site.timezone | date: "%I:%M%p %Z"}}
          </p>
          <div style="color:#2b2e2f; font-size: 14px;line-height: 22px; margin: 15px 0 7px 0;">
             {{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 />
               Place_your_web_here.com
             </p>
             {% endif %}
             {% endif %}
            <p></p>
          </div>
        </td>
      </tr>
    </table>
    </td>
  </tr>
</table><p></p>  
{% endif %}

{% endfor %}
{% for i in (1..threadlength) %} {% endfor %}
{% assign emails = case.emails %}
{% assign threadlength = emails.size|minus:1 %}  
{% for email in emails reversed %}
 
{% if forloop.first %}
----------------------------------------------
{{email.agent.name_public}} (Place_your_web_here.com), {{email.created_at | date: "%b %d, %Y"}}, {{email.created_at | in_time_zone: site.timezone | date: "%I:%M%p %Z"}}

{{email.new_html}}
 
{% if email.agent %}
# Uncomment the followting lines if you wan't to give the oportunity to display the signature
#{% if email.agent.signature %}
#{{email.agent.signature | newline_to_br}}
#{% else %}

  --
  {{email.agent.name_public}}<br />
  Place_your_web_here.com

{% endif %}
#{% endif %}
# END

{% else %}
 
{% if email.agent %}
  {{email.agent.name_public}}
{% else %}{% if customer.first_name %}
  {{customer.first_name}} {{customer.last_name}}
{% else %}{% if email.from %}
  {{email.from}}
{%else%}
  {{email.from_address}}
{% endif %}{% endif %}{% endif %}
{% if email.agent %}(Place_your_web_here.com){% endif %}, {{email.created_at | date: "%b %d, %Y"}}, {{email.created_at | in_time_zone: site.timezone | date: "%I:%M%p %Z"}}

 
{{email.new_html}}
 
{% if email.agent %}
{% if email.agent.signature %}
{{email.agent.signature | newline_to_br}}
{% else %}

  --
  {{email.agent.name_public}}
  Place_your_web_here.com
{% endif %}
{% endif %}
 
{% endif %}
 
{% endfor %}
{% for i in (1..threadlength) %} {% endfor %}