2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2015 |
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 <table class="report-layout display">
33 {capture assign="tableHeader"}
34 {foreach from=$columnHeaders item=header key=field}
35 {assign var=class value=""}
36 {if $header.type eq 1024 OR $header.type eq 1 OR $header.type eq 512}
37 {assign var=class value="class='reports-header-right'"}
39 {assign var=class value="class='reports-header'"}
43 <th colspan={$header.colspan}>{$header.title}</th>
44 {assign var=skip value=true}
45 {assign var=skipCount value=`$header.colspan`}
46 {assign var=skipMade value=1}
48 <th {$class}>{$header.title}</th>
49 {assign var=skip value=false}
51 {else} {* for skip case *}
52 {assign var=skipMade value=`$skipMade+1`}
53 {if $skipMade >= $skipCount}{assign var=skip value=false}{/if}
58 {if !$sections} {* section headers and sticky headers aren't playing nice yet *}
59 <thead class="sticky">
66 {* pre-compile section header here, rather than doing it every time under foreach *}
67 {capture assign=sectionHeaderTemplate}
68 {assign var=columnCount value=$columnHeaders|@count}
69 {assign var=l value=$smarty.ldelim}
70 {assign var=r value=$smarty.rdelim}
71 {foreach from=$sections item=section key=column name=sections}
73 {$l}isValueChange value=$row.{$column} key="{$column}" assign=isValueChanged{$r}
74 {$l}if $isValueChanged{$r}
76 {$l}if $sections.{$column}.type & 4{$r}
77 {$l}assign var=printValue value=$row.{$column}|crmDate{$r}
78 {$l}elseif $sections.{$column}.type eq 1024{$r}
79 {$l}assign var=printValue value=$row.{$column}|crmMoney{$r}
81 {$l}assign var=printValue value=$row.{$column}{$r}
84 <tr class="crm-report-sectionHeader crm-report-sectionHeader-{$h}{if $section.pageBreak} page-break{/if}"><th colspan="{$columnCount}">
85 <h{$h}>{$section.title}: {$l}$printValue|default:"<em>none</em>"{$r}
86 ({$l}sectionTotal key=$row.{$column} depth={$smarty.foreach.sections.index}{$r})
89 {if $smarty.foreach.sections.last}
90 <tr class="crm-report-sectionCols">{$l}$tableHeader{$r}</tr>
96 {foreach from=$rows item=row key=rowid}
97 {eval var=$sectionHeaderTemplate}
98 <tr class="{cycle values="odd-row,even-row"} {$row.class} crm-report" id="crm-report_{$rowid}">
99 {foreach from=$columnHeaders item=header key=field}
100 {assign var=fieldLink value=$field|cat:"_link"}
101 {assign var=fieldHover value=$field|cat:"_hover"}
102 <td class="crm-report-{$field}{if $header.type eq 1024 OR $header.type eq 1 OR $header.type eq 512} report-contents-right{elseif $row.$field eq 'Subtotal'} report-label{/if}">
104 <a title="{$row.$fieldHover}" href="{$row.$fieldLink}">
107 {if $row.$field eq 'Subtotal'}
109 {elseif $header.type & 4 OR $header.type & 256}
110 {if $header.group_by eq 'MONTH' or $header.group_by eq 'QUARTER'}
111 {$row.$field|crmDate:$config->dateformatPartial}
112 {elseif $header.group_by eq 'YEAR'}
113 {$row.$field|crmDate:$config->dateformatYear}
115 {if $header.type == 4}
116 {$row.$field|truncate:10:''|crmDate}
118 {$row.$field|crmDate}
121 {elseif $header.type eq 1024}
123 <span class="nowrap">{$row.$field|crmMoney:$row.$currencyColumn}</span>
125 <span class="nowrap">{$row.$field|crmMoney}</span>
131 {if $row.$fieldLink}</a>{/if}
138 {* foreach from=$grandStat item=row*}
139 <tr class="total-row">
140 {foreach from=$columnHeaders item=header key=field}
141 <td class="report-label">
142 {if $header.type eq 1024}
143 {$grandStat.$field|crmMoney}
153 {if $pager and $pager->_response and $pager->_response.numPages > 1}
154 <div class="report-pager">
155 {include file="CRM/common/pager.tpl" }