2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2016 |
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 {* this div is being used to apply special css *}
28 <div class="crm-block crm-form-block crm-report-field-form-block">
29 {include file="CRM/Report/Form/Fields.tpl"}
33 <div class="crm-block crm-content-block crm-report-form-block">
34 {include file="CRM/Report/Form/Actions.tpl"}
36 {include file="CRM/Report/Form/Statistics.tpl" top=true}
39 <div class="report-pager">
40 {include file="CRM/common/pager.tpl" location="top"}
43 {* pre-compile section header here, rather than doing it every time under foreach *}
44 {capture assign=sectionHeaderTemplate}
45 {assign var=columnCount value=$columnHeaders|@count}
46 {assign var=l value=$smarty.ldelim}
47 {assign var=r value=$smarty.rdelim}
48 {foreach from=$sections item=section key=column name=sections}
50 {$l}isValueChange value=$row.{$column} key="{$column}" assign=isValueChanged{$r}
51 {$l}if $isValueChanged{$r}
53 {$l}if $sections.{$column}.type & 4{$r}
54 {$l}assign var=printValue value=$row.{$column}|crmDate{$r}
55 {$l}elseif $sections.{$column}.type eq 1024{$r}
56 {$l}assign var=printValue value=$row.{$column}|crmMoney{$r}
58 {$l}assign var=printValue value=$row.{$column}{$r}
61 <tr><th colspan="{$columnCount}">
62 <h{$h}>{$section.title}: {$l}$printValue|default:"<em>none</em>"{$r}
63 ({$l}sectionTotal key=$row.{$column} depth={$smarty.foreach.sections.index}{$r})
66 {if $smarty.foreach.sections.last}
67 <tr>{$l}$tableHeader{$r}</tr>
73 {foreach from=$rows item=row}
74 <table class="report-layout crm-report_contact_civireport">
75 {eval var=$sectionHeaderTemplate}
77 {foreach from=$columnHeaders item=header key=field}
80 <th colspan={$header.colspan}>{$header.title}</th>
81 {assign var=skip value=true}
82 {assign var=skipCount value=`$header.colspan`}
83 {assign var=skipMade value=1}
85 <th>{$header.title}</th>
86 {assign var=skip value=false}
88 {else} {* for skip case *}
89 {assign var=skipMade value=`$skipMade+1`}
90 {if $skipMade >= $skipCount}{assign var=skip value=false}{/if}
94 <tr class="group-row crm-report">
95 {foreach from=$columnHeaders item=header key=field}
96 {assign var=fieldLink value=$field|cat:"_link"}
97 {assign var=fieldHover value=$field|cat:"_hover"}
98 <td class="report-contents crm-report_{$field}">
99 {if $row.$fieldLink}<a title="{$row.$fieldHover}" href="{$row.$fieldLink}">{/if}
101 {if $row.$field eq 'Subtotal'}
103 {elseif $header.type eq 12 || $header.type eq 4}
104 {if $header.group_by eq 'MONTH' or $header.group_by eq 'QUARTER'}
105 {$row.$field|crmDate:$config->dateformatPartial}
106 {elseif $header.group_by eq 'YEAR'}
107 {$row.$field|crmDate:$config->dateformatYear}
109 {$row.$field|truncate:10:''|crmDate}
111 {elseif $header.type eq 1024}
112 {$row.$field|crmMoney}
117 {if $row.contactID} {/if}
119 {if $row.$fieldLink}</a>{/if}
125 {if $columnHeadersComponent}
126 {assign var=componentContactId value=$row.contactID}
127 {foreach from=$columnHeadersComponent item=pheader key=component}
128 {if $componentRows.$componentContactId.$component}
129 <h3>{$component|replace:'_civireport':''|upper}</h3>
130 <table class="report-layout crm-report_{$component}">
131 {*add space before headers*}
133 {foreach from=$pheader item=header}
134 <th>{$header.title}</th>
138 {foreach from=$componentRows.$componentContactId.$component item=row key=rowid}
139 <tr class="{cycle values="odd-row,even-row"} crm-report" id="crm-report_{$rowid}">
140 {foreach from=$columnHeadersComponent.$component item=header key=field}
141 {assign var=fieldLink value=$field|cat:"_link"}
142 {assign var=fieldHover value=$field|cat:"_hover"}
143 <td class="report-contents crm-report_{$field}">
145 <a title="{$row.$fieldHover} "href="{$row.$fieldLink}">
148 {if $row.$field eq 'Sub Total'}
150 {elseif $header.type & 4}
151 {if $header.group_by eq 'MONTH' or $header.group_by eq 'QUARTER'}
152 {$row.$field|crmDate:$config->dateformatPartial}
153 {elseif $header.group_by eq 'YEAR'}
154 {$row.$field|crmDate:$config->dateformatYear}
156 {$row.$field|truncate:10:''|crmDate}
158 {elseif $header.type eq 1024}
159 {$row.$field|crmMoney}
164 {if $row.$fieldLink}</a>{/if}
175 <div class="report-pager">
176 {include file="CRM/common/pager.tpl"}
180 <table class="report-layout">
182 {foreach from=$columnHeaders item=header key=field}
185 {if $header.type eq 1024}
186 {$grandStat.$field|crmMoney}
198 {*Statistics at the bottom of the page*}
199 {include file="CRM/Report/Form/Statistics.tpl" bottom=true}
202 {include file="CRM/Report/Form/ErrorMessage.tpl"}