commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-old / civicrm / templates / CRM / Report / Form / Layout / Overlay.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.6 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2015 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
8 | |
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. |
12 | |
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. |
17 | |
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 +--------------------------------------------------------------------+
25 *}
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"}
30 </div>
31 {/if}
32 <div class="crm-report-overlay form-layout-compressed">
33 <table class="crm-table-group-summary form-layout-compressed">
34 {capture assign="tableHeader"}
35 <tr>
36 {foreach from=$columnHeaders item=header key=field}
37 {if !$skip}
38 {if $header.colspan}
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}
43 {else}
44 <td>{$header.title}</td>
45 {assign var=skip value=false}
46 {/if}
47 {else} {* for skip case *}
48 {assign var=skipMade value=`$skipMade+1`}
49 {if $skipMade >= $skipCount}{assign var=skip value=false}{/if}
50 {/if}
51 {/foreach}
52 </tr>
53 {/capture}
54
55 {if !$sections} {* section headers and sticky headers aren't playing nice yet *}
56 <thead>
57 <tr>
58 {$tableHeader}
59 </tr>
60 </thead>
61 {/if}
62
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}
69 {counter assign="h"}
70 {$l}isValueChange value=$row.{$column} key="{$column}" assign=isValueChanged{$r}
71 {$l}if $isValueChanged{$r}
72
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}
77 {$l}else{$r}
78 {$l}assign var=printValue value=$row.{$column}{$r}
79 {$l}/if{$r}
80
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})
84 </h{$h}>
85 </th></tr>
86 {if $smarty.foreach.sections.last}
87 <tr>{$l}$tableHeader{$r}</tr>
88 {/if}
89 {$l}/if{$r}
90 {/foreach}
91 {/capture}
92
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}">
101 {if $row.$fieldLink}
102 <a title="{$row.$fieldHover}" href="{$row.$fieldLink}" {$row.$fieldClass}>
103 {/if}
104
105 {if $row.$field eq 'Subtotal'}
106 {$row.$field}
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}
112 {else}
113 {if $header.type == 4}
114 {$row.$field|truncate:10:''|crmDate}
115 {else}
116 {$row.$field|crmDate}
117 {/if}
118 {/if}
119 {elseif $header.type eq 1024}
120 <span class="nowrap">{$row.$field|crmMoney}</span>
121 {else}
122 {$row.$field}
123 {/if}
124
125 {if $row.$fieldLink}</a>{/if}
126 </td>
127 {/foreach}
128 </tr>
129 {/foreach}
130
131 {if $grandStat}
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}
138 {else}
139 {$grandStat.$field}
140 {/if}
141 </td>
142 {/foreach}
143 </tr>
144 {* /foreach*}
145 {/if}
146 </table>
147 </div>
148 {if $pager and $pager->_response and $pager->_response.numPages > 1}
149 <div class="report-pager">
150 {include file="CRM/common/pager.tpl" }
151 </div>
152 {/if}
153 {/if}