2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.4 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
26 {if (!$chartEnabled || !$chartSupported )&& $rows}
27 {if $pager and $pager->_response and $pager->_response.numPages > 1}
28 <div class="report-pager">
29 {include file="CRM/common/pager.tpl" location="top"}
32 <div class="crm-report-overlay form-layout-compressed">
33 <table class="crm-table-group-summary form-layout-compressed">
34 {capture assign="tableHeader"}
36 {foreach from=$columnHeaders item=header key=field}
39 <td colspan={$header.colspan}>{$header.title}</td>
40 {assign var=skip value=true}
41 {assign var=skipCount value=`$header.colspan`}
42 {assign var=skipMade value=1}
44 <td>{$header.title}</td>
45 {assign var=skip value=false}
47 {else} {* for skip case *}
48 {assign var=skipMade value=`$skipMade+1`}
49 {if $skipMade >= $skipCount}{assign var=skip value=false}{/if}
55 {if !$sections} {* section headers and sticky headers aren't playing nice yet *}
63 {* pre-compile section header here, rather than doing it every time under foreach *}
64 {capture assign=sectionHeaderTemplate}
65 {assign var=columnCount value=$columnHeaders|@count}
66 {assign var=l value=$smarty.ldelim}
67 {assign var=r value=$smarty.rdelim}
68 {foreach from=$sections item=section key=column name=sections}
70 {$l}isValueChange value=$row.{$column} key="{$column}" assign=isValueChanged{$r}
71 {$l}if $isValueChanged{$r}
73 {$l}if $sections.{$column}.type & 4{$r}
74 {$l}assign var=printValue value=$row.{$column}|crmDate{$r}
75 {$l}elseif $sections.{$column}.type eq 1024{$r}
76 {$l}assign var=printValue value=$row.{$column}|crmMoney{$r}
78 {$l}assign var=printValue value=$row.{$column}{$r}
81 <tr><th colspan="{$columnCount}">
82 <h{$h}>{$section.title}: {$l}$printValue|default:"<em>none</em>"{$r}
83 ({$l}sectionTotal key=$row.{$column} depth={$smarty.foreach.sections.index}{$r})
86 {if $smarty.foreach.sections.last}
87 <tr>{$l}$tableHeader{$r}</tr>
93 {foreach from=$rows item=row key=rowid}
94 {eval var=$sectionHeaderTemplate}
95 <tr class="{$row.class}" id="crm-report_{$rowid}">
96 {foreach from=$columnHeaders item=header key=field}
97 {assign var=fieldLink value=$field|cat:"_link"}
98 {assign var=fieldHover value=$field|cat:"_hover"}
99 {assign var=fieldClass value=$field|cat:"_class"}
100 <td class="crm-report-{$field}{if $header.type eq 1024 OR $header.type eq 1} report-contents-right{elseif $row.$field eq 'Subtotal'} report-label{/if}">
102 <a title="{$row.$fieldHover}" href="{$row.$fieldLink}" {$row.$fieldClass}>
105 {if $row.$field eq 'Subtotal'}
107 {elseif $header.type & 4 OR $header.type & 256}
108 {if $header.group_by eq 'MONTH' or $header.group_by eq 'QUARTER'}
109 {$row.$field|crmDate:$config->dateformatPartial}
110 {elseif $header.group_by eq 'YEAR'}
111 {$row.$field|crmDate:$config->dateformatYear}
113 {if $header.type & 4}
114 {$row.$field|truncate:10:''|crmDate}
116 {$row.$field|crmDate}
119 {elseif $header.type eq 1024}
120 <span class="nowrap">{$row.$field|crmMoney}</span>
125 {if $row.$fieldLink}</a>{/if}
132 {* foreach from=$grandStat item=row*}
133 <tr class="total-row">
134 {foreach from=$columnHeaders item=header key=field}
135 <td class="report-label">
136 {if $header.type eq 1024}
137 {$grandStat.$field|crmMoney}
148 {if $pager and $pager->_response and $pager->_response.numPages > 1}
149 <div class="report-pager">
150 {include file="CRM/common/pager.tpl" }