CRM-20427 Skip tests that are currently failing as edge cases and not blockers to...
[civicrm-core.git] / templates / CRM / Report / Form / Grant / Statistics.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2017 |
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 $section eq 1}
27 <div class="crm-block crm-content-block crm-report-layoutGraph-form-block">
28 {*include the graph*}
29 {include file="CRM/Report/Form/Layout/Graph.tpl"}
30 </div>
31 {else}
32 <div class="crm-block crm-form-block crm-report-field-form-block">
33 {include file="CRM/Report/Form/Fields.tpl" componentName='Grant'}
34 </div>
35
36 <div class="crm-block crm-content-block crm-report-form-block">
37 {*include actions*}
38 {include file="CRM/Report/Form/Actions.tpl"}
39
40 {*include the graph*}
41 {include file="CRM/Report/Form/Layout/Graph.tpl"}
42
43 {if $printOnly}
44 <h1>{$reportTitle}</h1>
45 <div id="report-date">{$reportDate}</div>
46 {/if}
47
48 {if !empty($totalStatistics)}
49 <h3>{ts}Report Filters{/ts}</h3>
50 <table class="report-layout statistics-table">
51 {if $totalStatistics.filters}
52 {foreach from=$totalStatistics.filters item=row}
53 <tr>
54 <th class="statistics">{$row.title}</th>
55 <td>{$row.value}</td>
56 </tr>
57 {/foreach}
58 {else}
59 ( {ts}All Grants{/ts} )
60 {/if}
61 </table>
62
63 <h3>{ts}Summary Statistics{/ts}</h2>
64 <table class="report-layout display">
65 <tr>
66 <th class="statistics" scope="row"></th>
67 <th class="statistics right" scope="row">Count</th>
68 <th class="statistics right" scope="row">Amount</th>
69 </tr>
70 {foreach from=$totalStatistics.total_statistics key=key item=val}
71 <tr>
72 <td>{$val.title}</td>
73 <td class="right">{$val.count}</td>
74 <td class="right">{$val.amount|crmMoney}</td>
75 </tr>
76 {/foreach}
77 </table>
78 {/if}
79
80 {if !empty($grantStatistics)}
81 <h3>{ts}Statistics Breakdown{/ts}</h3>
82 <table class="report-layout display">
83 {foreach from=$grantStatistics item=values key=key}
84 <tr>
85 <th class="statistics" scope="row">{$values.title}</th>
86 <th class="statistics right" scope="row">Number of Grants (%)</th>
87 <th class="statistics right" scope="row">Total Amount (%)</th>
88 </tr>
89 {foreach from=$values.value item=row key=field}
90 <tr>
91 <td>{$field}</td>
92 <td class="right">{if $row.count}{$row.count} ({$row.percentage}%){/if}</td>
93 <td class="right">
94 {foreach from=$row.currency key=fld item=val}
95 {$val.value|crmMoney:$fld} ({$val.percentage}%)&nbsp;&nbsp;
96 {/foreach}
97 </td>
98 </tr>
99 {if $row.unassigned_count}
100 <tr>
101 <td>{$field} ({ts}Unassigned{/ts})</td>
102 <td class="right">{if $row.unassigned_count}{$row.unassigned_count} ({$row.unassigned_percentage}%){/if}</td>
103 <td class="right">
104 {foreach from=$row.unassigned_currency key=fld item=val}
105 {$val.value|crmMoney:$fld} ({$val.percentage}%)&nbsp;&nbsp;
106 {/foreach}
107 </td>
108 </tr>
109 {/if}
110 {/foreach}
111 <tr><td colspan="3" style="border: none;">&nbsp;</td></tr>
112 {/foreach}
113 </table>
114 {/if}
115
116 <br />
117 {if empty($totalStatistics)}
118 {include file="CRM/Report/Form/ErrorMessage.tpl"}
119 {/if}
120 </div>
121 {/if}