Skip to content
Browse files

Same color for first/last response time

  • Loading branch information...
1 parent 80bd631 commit 1233ac8f6400d7a9053e6088b38b0f0be272daf4 @davidecassenti committed Mar 13, 2011
Showing with 16 additions and 3 deletions.
  1. +16 −3 templates/ticket_toolbar.tpl
View
19 templates/ticket_toolbar.tpl
@@ -5,10 +5,17 @@
<span>{$ticket_sla_info.sla_days} {if $ticket_sla_info.sla_type == 'b'}business{/if} day{if $ticket_sla_info.sla_days != 1}s{/if}</span>
</span>
+ {assign var=sla_color value=''}
<span id="ticket_sla_first_response">
<strong>First Response:</strong>
{if $ticket_sla_info.sla_type == "b"}
- <span style="{if $ticket_sla_info.response_business_days == -1 && $smarty.now <= $ticket_sla_info.sla_days}color:#CA0;font-weight:bold;{else if $ticket_sla_info.response_business_days == -1 || $ticket_sla_info.response_business_days > $ticket_sla_info.sla_days}color:#C00;font-weight:bold;{/if}">
+ {if $ticket_sla_info.response_business_days == -1 && $smarty.now <= $ticket_sla_info.sla_days}
+ {assign var=sla_color value='#CA0'}
+ {else if $ticket_sla_info.response_business_days == -1 || $ticket_sla_info.response_business_days > $ticket_sla_info.sla_days}
+ {assign var=sla_color value='#C00'}
+ {/if}
+
+ <span style="{if $sla_color}color:{$sla_color};font-weight:bold;{/if}">
{if $ticket_sla_info.response_business_days == -1}
none
{else if $ticket_sla_info.response_business_days == 0}
@@ -18,7 +25,13 @@
{/if}
</span>
{else}
- <span style="{if $ticket_sla_info.response_days == -1 && $smarty.now <= $ticket_sla_info.sla_days}color:#CA0;font-weight:bold;{else if $ticket_sla_info.response_days == -1 || $ticket_sla_info.response_days > $ticket_sla_info.sla_days}color:#C00;font-weight:bold;{/if}">
+ {if $ticket_sla_info.response_days == -1 && $smarty.now <= $ticket_sla_info.sla_days}
+ {assign var=sla_color value='#CA0'}
+ {else if $ticket_sla_info.response_days == -1 || $ticket_sla_info.response_days > $ticket_sla_info.sla_days}
+ {assign var=sla_color value='#C00'}
+ {/if}
+
+ <span style="{if $sla_color}color:{$sla_color};font-weight:bold;{/if}">
{if $ticket_sla_info.response_days == -1}
none
{else if $ticket_sla_info.response_days == 0}
@@ -32,7 +45,7 @@
<span id="ticket_sla_last_response">
<strong>Last Response:</strong>
- <span style="{if $ticket_sla_info.last_response_time == -1}color:#CA0;font-weight:bold;{/if}">
+ <span style="{if $sla_color}color:{$sla_color};font-weight:bold;{/if}">
{if $ticket_sla_info.last_response_time == -1}
none
{else}

0 comments on commit 1233ac8

Please sign in to comment.
Something went wrong with that request. Please try again.