Skip to content

Instantly share code, notes, and snippets.

View scotthargroves's full-sized avatar

Scott Hargroves scotthargroves

View GitHub Profile
$(document).ready(function() {
$("#problemArea").on("change", function() {
$(".all-hides").addClass("hidden"), "" != $(this).val() && $(".two-hidden").removeClass("hidden"), "Agent" == $(this).val() ? $("#productVersion").removeClass("hidden") : "Admin" == $(this).val() || "Reporting" == $(this).val() || "SFDC" == $(this).val() && $(".div-sfdc").removeClass("hidden")
}),
$("#stepOne .next").on("click", function(e) {
e.preventDefault(),
$("#stepOne, #stepThree").addClass("hidden"), $("#stepTwo").removeClass("hidden")
An agent has responded to your community question. If you would like to continue the conversation, please click the link below:<br/>
<br/>
<a href="http://{{site.subdomain}}.desk.com{{case.question.public_url}}">Continue the Conversation</a><br/>
<hr>
<div class='question-details'>
<h3>{{ case.question.subject }}</h3>
<div class='meta'>
<span>
{{ case.question.created_at | in_time_zone: site.timezone | date: '%b %d, %Y %I:%M%p %Z' }}
</span>
{{form_begin|replace:'/portal/emails/pre_create','/portal/emails'}}
<table style="margin: 5px 15px 0 0; padding: 0px; background-color: #f9f9f9; border: 0px solid #e9e9e9; width: 100%; font-family: 'Open Sans',sans-serif; font-weight: 300; line-height: 19px; font-size: 13px;" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center" valign="top">
<table cellspacing="0" cellpadding="0" border="0" style="background-color:#3498db;padding-top:10px;padding-bottom:10px;color:#fff;width:100%;text-align:center;font-weight:300;">
<tbody><tr>
<td>
<span>{{system.snippets.response_above_this_line}}</span>
CURRENT SUBJECT:
Case Notification - {{case.subject}} - {{customer.company}} - {{customer.name}} - Case #{{case.id}}
CHANGE SUBJECT TO:
Case Notification - {{ case.emails.last.subject | remove: "'" | remove: "&" }} - {{customer.company}} - {{customer.name}} - Case #{{case.id}}
Replace {{email.subject}} with {{email.subject | strip_html}} in the Auto-Acknowledgment theme HTML body
{% if page == 'page_article' %}
<link rel="canonical" href="http://yoursite.desk.com/customer/portal/articles/{{article.id}}" />
{% endif %}
@scotthargroves
scotthargroves / articleAttachmentBlock.html
Created April 26, 2016 04:46
Desk.com Article Attachment Block
{% if article.number_of_attachments > 0 %}
<div id='attachments'>
<strong>{{system.snippets.attachments}}</strong>
<ul>
{% for attachment in article.kb_article_attachments %}
<li>
<a href="{{ attachment.faq_download_url }}" class="kb_article_attachment_a" target="_blank">{{ attachment.name }}</a>
</li>
{% endfor %}
</ul>
{% if case.user %}{{case.user.email}}{% elsif case.group %}{{case.group.emails}}{% else %}{{site.admin_emails}}{% endif %}
@scotthargroves
scotthargroves / yourMessage.liquid
Created March 15, 2016 22:38
Desk.com Auto-Acknowledgement - Display Customers Message
<div style="background-color:#fafafa; border:0; font-size:80%; padding:2px;">
<strong>Your message:</strong><br /><br />
{% assign emails = case.emails %}
{% for email in emails reversed %}
{{email.new_text}}
{% endfor %}
</div>