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 +--------------------------------------------------------------------+
27 <div class="crm-block crm-content-block crm-report-layoutGraph-form-block">
29 {include file="CRM/Report/Form/Layout/Graph.tpl"}
31 {elseif $section eq 2}
32 <div class="crm-block crm-content-block crm-report-layoutTable-form-block">
33 {*include the table layout*}
34 {include file="CRM/Report/Form/Layout/Table.tpl"}
37 <div class="crm-block crm-form-block crm-report-field-form-block">
39 {if !$printOnly} {* NO print section starts *}
40 <div {if !$criteriaForm}style="display: none;"{/if}> {* criteria section starts *}
41 <div class="crm-accordion-wrapper crm-report_criteria-accordion {if $rows}collapsed{/if}">
42 <div class="crm-accordion-header">
43 {ts}Report Criteria{/ts}
44 </div><!-- /.crm-accordion-header -->
45 <div class="crm-accordion-body">
46 <div id="id_{$formTpl}"> {* search section starts *}
49 {if $componentName eq 'Grant'}
50 <h3>{ts}Include these Statistics{/ts}</h3>
52 <h3>Display Columns</h3>
54 {foreach from=$colGroups item=grpFields key=dnc}
55 {assign var="count" value="0"}
56 {* Wrap custom field sets in collapsed accordion pane. *}
57 {if $grpFields.group_title}
58 <div class="crm-accordion-wrapper crm-accordion collapsed">
59 <div class="crm-accordion-header">
60 {$grpFields.group_title}
61 </div><!-- /.crm-accordion-header -->
62 <div class="crm-accordion-body">
64 <table class="criteria-group">
65 <tr class="crm-report crm-report-criteria-field crm-report-criteria-field-{$dnc}">
66 {foreach from=$grpFields.fields item=title key=field}
67 {assign var="count" value=`$count+1`}
68 <td width="25%">{$form.fields.$field.html}</td>
69 {if $count is div by 4}
70 </tr><tr class="crm-report crm-report-criteria-field crm-report-criteria-field_{$dnc}">
73 {if $count is not div by 4}
74 <td colspan="4 - ($count % 4)"></td>
78 {if $grpFields.group_title}
79 </div><!-- /.crm-accordion-body -->
80 </div><!-- /.crm-accordion-wrapper -->
84 <table class="criteria-group">
85 {foreach from=$caseDetailExtra key=field item=fieldDetail}
86 <tr class="crm-report crm-report-criteria-field crm-report-criteria-field-{$field}">
87 <td width="25%">{$fieldDetail.title}</td><td> {$form.case_detail_extra.$field.html}</td>
94 <h3>Group by Columns</h3>
95 {assign var="count" value="0"}
96 <table class="report-layout">
97 <tr class="crm-report crm-report-criteria-groupby">
98 {foreach from=$groupByElements item=gbElem key=dnc}
99 {assign var="count" value=`$count+1`}
100 <td width="25%" {if $form.fields.$gbElem} onClick="selectGroupByFields('{$gbElem}');"{/if}>
101 {$form.group_bys[$gbElem].html}
102 {if $form.group_bys_freq[$gbElem].html}:<br>
103 {$form.group_bys_freq[$gbElem].label} {$form.group_bys_freq[$gbElem].html}
106 {if $count is div by 4}
107 </tr><tr class="crm-report crm-report-criteria-groupby">
110 {if $count is not div by 4}
111 <td colspan="4 - ($count % 4)"></td>
117 {if $form.options.html || $form.options.html}
118 <h3>Other Options</h3>
119 <table class="report-layout">
120 <tr class="crm-report crm-report-criteria-groupby">
121 <td>{$form.options.html}</td>
122 {if $form.blank_column_end}
123 <td>{$form.blank_column_end.label} {$form.blank_column_end.html}</td>
131 <table class="report-layout">
132 {assign var="counter" value=1}
133 {foreach from=$filters item=table key=tableName}
134 {assign var="filterCount" value=$table|@count}
135 {* Wrap custom field sets in collapsed accordion pane. *}
136 {if $colGroups.$tableName.group_title and $filterCount gte 1}
137 {* we should close table that contains other filter elements before we start building custom group accordian *}
140 {assign var="counter" value=0}
142 <div class="crm-accordion-wrapper crm-accordion collapsed">
143 <div class="crm-accordion-header">
144 {$colGroups.$tableName.group_title}
145 </div><!-- /.crm-accordion-header -->
146 <div class="crm-accordion-body">
147 <table class="report-layout">
149 {foreach from=$table item=field key=fieldName}
150 {assign var=fieldOp value=$fieldName|cat:"_op"}
151 {assign var=filterVal value=$fieldName|cat:"_value"}
152 {assign var=filterMin value=$fieldName|cat:"_min"}
153 {assign var=filterMax value=$fieldName|cat:"_max"}
154 {if $field.operatorType & 4}
155 <tr class="report-contents crm-report crm-report-criteria-filter crm-report-criteria-filter-{$tableName}">
156 <td class="label report-contents">{$field.title}</td>
157 {include file="CRM/Core/DateRange.tpl" fieldName=$fieldName from='_from' to='_to'}
159 {elseif $form.$fieldOp.html}
160 <tr class="report-contents crm-report crm-report-criteria-filter crm-report-criteria-filter-{$tableName}" {if $field.no_display} style="display: none;"{/if}>
161 <td class="label report-contents">{$field.title}</td>
162 <td class="report-contents">{$form.$fieldOp.html}</td>
164 <span id="{$filterVal}_cell">{$form.$filterVal.label} {$form.$filterVal.html}</span>
165 <span id="{$filterMin}_max_cell">{$form.$filterMin.label} {$form.$filterMin.html} {$form.$filterMax.label} {$form.$filterMax.html}</span>
170 {if $colGroups.$tableName.group_title}
172 </div><!-- /.crm-accordion-body -->
173 </div><!-- /.crm-accordion-wrapper -->
174 {assign var=closed value=1"} {*-- ie table tags are closed-- *}
176 {assign var=closed value=0"} {*-- ie table tags are not closed-- *}
180 {if $closed eq 0 }</table>{/if}
184 <script type="text/javascript">
186 {foreach from=$filters item=table key=tableName}
187 {foreach from=$table item=field key=fieldName}
188 {literal}var val = "dnc";{/literal}
189 {if !($field.operatorType == 4) && !$field.no_display}
190 {literal}var val = document.getElementById("{/literal}{$fieldName}_op{literal}").value;{/literal}
192 {literal}showHideMaxMinVal( "{/literal}{$fieldName}{literal}", val );{/literal}
197 function showHideMaxMinVal( field, val ) {
198 var fldVal = field + "_value_cell";
199 var fldMinMax = field + "_min_max_cell";
200 if ( val == "bw" || val == "nbw" ) {
201 cj('#' + fldVal ).hide();
202 cj('#' + fldMinMax ).show();
203 } else if (val =="nll" || val == "nnll") {
204 cj('#' + fldVal).hide() ;
205 cj('#' + field + '_value').val('');
206 cj('#' + fldMinMax ).hide();
208 cj('#' + fldVal ).show();
209 cj('#' + fldMinMax ).hide();
213 function selectGroupByFields(id) {
214 var field = 'fields\['+ id+'\]';
215 var group = 'group_bys\['+ id+'\]';
216 var groups = document.getElementById( group ).checked;
218 document.getElementById( field ).checked = true;
220 document.getElementById( field ).checked = false;
226 <div>{$form.buttons.html}</div>
227 </div> {* search div section ends *}
228 </div><!-- /.crm-accordion-body -->
229 </div><!-- /.crm-accordion-wrapper -->
230 </div> {* criteria section ends *}
232 {if $instanceForm OR $instanceFormError} {* settings section starts *}
233 <div class="crm-accordion-wrapper crm-report_setting-accordion {if $rows}collapsed{/if}">
234 <div class="crm-accordion-header" {if $updateReportButton} onclick="cj('#update-button').hide(); return false;" {/if} >
235 {if $mode eq 'template'}{ts}Create Report{/ts}{else}{ts}Report Settings{/ts}{/if}
236 </div><!-- /.crm-accordion-header -->
237 <div class="crm-accordion-body">
238 <div id="id_{$instanceForm}">
239 <div id="instanceForm">
240 {include file="CRM/Report/Form/Instance.tpl"}
241 {assign var=save value="_qf_"|cat:$form.formName|cat:"_submit_save"}
242 <div class="crm-submit-buttons">
247 </div><!-- /.crm-accordion-body -->
248 </div><!-- /.crm-accordion-wrapper -->
249 {if $updateReportButton}
250 <div id='update-button' class="crm-submit-buttons">
254 {/if} {* settings section ends *}
257 <script type="text/javascript">
259 cj().crmAccordions();
264 {/if} {* NO print section ends *}
269 <div class="crm-block crm-content-block crm-report-form-block">
271 {include file="CRM/Report/Form/Actions.tpl"}
273 {*Statistics at the Top of the page*}
274 {include file="CRM/Report/Form/Statistics.tpl" top=true}
276 {*include the graph*}
277 {include file="CRM/Report/Form/Layout/Graph.tpl"}
279 {*include the table layout*}
280 {include file="CRM/Report/Form/Layout/Table.tpl"}
282 {*Statistics at the bottom of the page*}
283 {include file="CRM/Report/Form/Statistics.tpl" bottom=true}
285 {include file="CRM/Report/Form/ErrorMessage.tpl"}
289 <div id="casedetails"></div>
291 <script type="text/javascript">
292 function viewCase( caseId ,contactId ) {
293 cj("#casedetails").dialog({
294 title: "Case Details",
299 var dataUrl = {/literal}"{crmURL p='civicrm/case/ajax/details' h=0 q="snippet=4" }"{literal};
300 dataUrl = dataUrl + '&caseId=' +caseId + '&contactId=' +contactId ;
304 timeout : 5000, //Time in milliseconds
305 success : function( data ){
306 cj( "#casedetails").html( data ).trigger('crmLoad');
311 buttons: { "Done": function() { cj(this).dialog("destroy"); }}