Created
November 7, 2013 20:53
-
-
Save DeskWOW/7361694 to your computer and use it in GitHub Desktop.
To limit My Portal cases per brand, record which brand each case is regarding as a case custom field. Then, within "My Cases (List)" you'd use this code.
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
<table class='mycases'> | |
<thead> | |
<tr> | |
<th></th> | |
<th>{{desk.system.snippets.case_id}}</th> | |
<th>{{desk.system.snippets.subject}}</th> | |
<th>{{desk.system.snippets.from}}</th> | |
<th>{{desk.system.snippets.created}}</th> | |
<th>{{desk.system.snippets.status}}</th> | |
</tr> | |
</thead> | |
<tbody> | |
{% for case in desk.page.content.cases %} | |
{% if desk.current_brand.name contains case.custom_brand %} | |
<tr> | |
<td class='a-casechannel'><img src='{{ case.channel_icon }}'/></td> | |
<td class='a-caseid'>{{ case.id }}</td> | |
<td class='a-casesubject'><a href="{{ case.portal_url }}">{{ case.subject }}</a></td> | |
<td class='a-casefrom'>{{case.customer.first_name}}</td> | |
<td class='a-casecreated'>{{ case.created_at | in_time_zone: site.timezone | date: '%b %d' }}</td> | |
<td class='a-casestatus'>{{ case.status.name }}</td> | |
</tr> | |
{% endif %} | |
{% endfor %} | |
</tbody> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment