commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-old / civicrm / templates / CRM / Report / Form / Tabs / Filters.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
27 <div id="report-tab-set-filters" class="civireport-criteria">
28 <table class="report-layout">
29 {assign var="counter" value=1}
30 {foreach from=$filters item=table key=tableName}
31 {assign var="filterCount" value=$table|@count}
32 {* Wrap custom field sets in collapsed accordion pane. *}
33 {if $filterGroups.$tableName.group_title and $filterCount gte 1}
34 {* we should close table that contains other filter elements before we start building custom group accordian
35 *}
36 {if $counter eq 1}
37 </table>
38 {assign var="counter" value=0}
39 {/if}
40 <div class="crm-accordion-wrapper crm-accordion collapsed">
41 <div class="crm-accordion-header">
42 {$filterGroups.$tableName.group_title}
43 </div><!-- /.crm-accordion-header -->
44 <div class="crm-accordion-body">
45 <table class="report-layout">
46 {/if}
47 {foreach from=$table item=field key=fieldName}
48 {assign var=fieldOp value=$fieldName|cat:"_op"}
49 {assign var=filterVal value=$fieldName|cat:"_value"}
50 {assign var=filterMin value=$fieldName|cat:"_min"}
51 {assign var=filterMax value=$fieldName|cat:"_max"}
52 {if $field.operatorType & 4}
53 <tr class="report-contents crm-report crm-report-criteria-filter crm-report-criteria-filter-{$tableName}">
54 <td class="label report-contents">{$field.title}</td>
55 {include file="CRM/Core/DateRange.tpl" fieldName=$fieldName from='_from' to='_to'}
56 </tr>
57 {elseif $form.$fieldOp.html}
58 <tr class="report-contents crm-report crm-report-criteria-filter crm-report-criteria-filter-{$tableName}" {if $field.no_display} style="display: none;"{/if}>
59 <td class="label report-contents">{$field.title}</td>
60 <td class="report-contents">{$form.$fieldOp.html}</td>
61 <td>
62 <span id="{$filterVal}_cell">{$form.$filterVal.label}&nbsp;{$form.$filterVal.html}</span>
63 <span id="{$filterMin}_max_cell">{$form.$filterMin.label}&nbsp;{$form.$filterMin.html}&nbsp;&nbsp;{$form.$filterMax.label}&nbsp;{$form.$filterMax.html}</span>
64 </td>
65 </tr>
66 {/if}
67 {/foreach}
68 {if $filterGroups.$tableName.group_title}
69 </table>
70 </div><!-- /.crm-accordion-body -->
71 </div><!-- /.crm-accordion-wrapper -->
72 {assign var=closed value="1"} {*-- ie table tags are closed-- *}
73 {else}
74 {assign var=closed value="0"} {*-- ie table tags are not closed-- *}
75 {/if}
76 {/foreach}
77 {if $closed eq 0 }
78 </table>
79 {/if}
80 </div>