Last active
August 29, 2015 14:01
-
-
Save dugjason/49229ff771412481d59e to your computer and use it in GitHub Desktop.
Showing additional content to a user in Zendesk's Help Center. Here I am showing a Zendesk user's support SLA as they submit a new request in the Help Center, based on the GROUP they belong to within Zendesk.
This file contains hidden or 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
Zendesk Help Center show additional content to user |
This file contains hidden or 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
/* Hide SLAs with .hidden class | |
* | |
*/ | |
.hidden { | |
display: none; | |
} |
This file contains hidden or 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
/* | |
* jQuery v1.9.1 included | |
*/ | |
$(document).ready(function() { | |
// show support SLA dependent on subscription level | |
(function() { | |
var supportGroup; | |
//get users group from the HelpCenter object | |
supportGroup = HelpCenter.user.groups[0].name; | |
switch(supportGroup) { | |
case "Elite" || "Elite VIP": | |
$('#support-sla-elite').show(); | |
case "Premium": | |
$('#support-sla-premium').show(); | |
case "Standard": | |
$('#support-sla-standard').show(); | |
default: //Community support | |
$('#support-sla-community').show(); | |
} | |
}()); | |
}); |
This file contains hidden or 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
<nav class="sub-nav clearfix"> | |
{{breadcrumbs}} | |
{{search_bar_small}} | |
</nav> | |
<div class="clearfix"> | |
<section class="main-column"> | |
<h1>{{header}}{{follow_up_hint}}</h1> | |
{{error_list}} | |
<div class="form"> | |
<div class="support-slas"> | |
<div><strong>Initial Response SLA:</strong> | |
<span id="support-sla-elite" class="hidden">4 hours</span> | |
<span id="support-sla-premium" class="hidden">8 hours</span> | |
<span id="support-sla-standard" class="hidden">1 business day</span> | |
<span id="support-sla-community" class="hidden">3 business days</span> | |
</div> | |
</div> | |
{{form}} | |
</div> | |
</section> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment