CRM-13973 - set cancelled class in line item listings for line items that have been...
authorDave Greenberg <dave@civicrm.org>
Wed, 9 Jul 2014 21:37:33 +0000 (14:37 -0700)
committerDave Greenberg <dave@civicrm.org>
Wed, 9 Jul 2014 21:37:33 +0000 (14:37 -0700)
----------------------------------------
* CRM-13973:
  https://issues.civicrm.org/jira/browse/CRM-13973

templates/CRM/Price/Page/LineItem.tpl

index feacbc347d159d726cbe01d2715428176a77e83b..600e00826bebe56e935a4dbeab16b36e5c133c95 100644 (file)
       <strong>{ts}Participant {$priceset+1}{/ts}</strong> {$part.$priceset.info}
     {/if}
     <table>
-            <tr class="columnheader">
+      <tr class="columnheader">
         <th>{ts}Item{/ts}</th>
-              {if $context EQ "Membership"}
-        <th class="right">{ts}Fee{/ts}</th>
-                {else}
-        <th class="right">{ts}Qty{/ts}</th>
-                    <th class="right">{ts}Unit Price{/ts}</th>
-        <th class="right">{ts}Total Price{/ts}</th>
-    {/if}
+        {if $context EQ "Membership"}
+          <th class="right">{ts}Fee{/ts}</th>
+        {else}
+          <th class="right">{ts}Qty{/ts}</th>
+          <th class="right">{ts}Unit Price{/ts}</th>
+          <th class="right">{ts}Total Price{/ts}</th>
+        {/if}
 
-     {if $pricesetFieldsCount}
-        <th class="right">{ts}Total Participants{/ts}</th>{/if}
-            </tr>
-            {foreach from=$value item=line}
-            <tr>
-                <td>{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div class="description">{$line.description}</div>{/if}</td>
-    {if $context NEQ "Membership"}
-        <td class="right">{$line.qty}</td>
-                    <td class="right">{$line.unit_price|crmMoney}</td>
-    {/if}
-                <td class="right">{$line.line_total|crmMoney}</td>
-           {if $pricesetFieldsCount}<td class="right">{$line.participant_count}</td> {/if}
-            </tr>
-            {/foreach}
+        {if $pricesetFieldsCount}
+          <th class="right">{ts}Total Participants{/ts}</th>
+        {/if}
+      </tr>
+      {foreach from=$value item=line}
+        <tr{if $line.qty EQ 0} class="cancelled"{/if}>
+          <td>{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div class="description">{$line.description}</div>{/if}</td>
+          {if $context NEQ "Membership"}
+            <td class="right">{$line.qty}</td>
+            <td class="right">{$line.unit_price|crmMoney}</td>
+          {/if}
+          <td class="right">{$line.line_total|crmMoney}</td>
+          {if $pricesetFieldsCount}
+            <td class="right">{$line.participant_count}</td>
+          {/if}
+        </tr>
+      {/foreach}
     </table>
-    {/if}
+  {/if}
 {/foreach}
 
 <div class="crm-section no-label total_amount-section">
-    <div class="content bold">
-        {if $context EQ "Contribution"}
-            {ts}Contribution Total{/ts}:
-        {elseif $context EQ "Event"}
-            {ts}Event Total{/ts}:
-   {elseif $context EQ "Membership"}
-            {ts}Membership Fee Total{/ts}:
-        {else}
-            {ts}Total Amount{/ts}:
-        {/if}
+  <div class="content bold">
+    {if $context EQ "Contribution"}
+      {ts}Contribution Total{/ts}:
+    {elseif $context EQ "Event"}
+      {ts}Event Total{/ts}:
+    {elseif $context EQ "Membership"}
+      {ts}Membership Fee Total{/ts}:
+    {else}
+      {ts}Total Amount{/ts}:
+    {/if}
     {$totalAmount|crmMoney}
-    </div>
-    <div class="clear"></div>
-    <div class="content bold">
-      {if $pricesetFieldsCount}
+  </div>
+  <div class="clear"></div>
+  <div class="content bold">
+    {if $pricesetFieldsCount}
       {ts}Total Participants{/ts}:
       {foreach from=$lineItem item=pcount}
         {if $pcount neq 'skip'}
         {/if}
       {/foreach}
       {$totalcount}
-      {/if}
-    </div>
-    <div class="clear"></div>
+    {/if}
+  </div>
+  <div class="clear"></div>
 </div>
 
 {if $hookDiscount.message}
   <div class="crm-section hookDiscount-section">
-      <em>({$hookDiscount.message})</em>
+    <em>({$hookDiscount.message})</em>
   </div>
 {/if}
 {literal}