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 / OrderBy.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
28 <div id="report-tab-order-by-elements" class="civireport-criteria">
29 <table id="optionField">
30 <tr>
31 <th>&nbsp;</th>
32 <th> {ts}Column{/ts}</th>
33 <th> {ts}Order{/ts}</th>
34 <th> {ts}Section Header / Group By{/ts}</th>
35 <th> {ts}Page Break{/ts}</th>
36 </tr>
37
38 {section name=rowLoop start=1 loop=6}
39 {assign var=index value=$smarty.section.rowLoop.index}
40 <tr id="optionField_{$index}" class="form-item {cycle values="odd-row,even-row"}">
41 <td>
42 {if $index GT 1}
43 <a onclick="hideRow({$index}); return false;" name="orderBy_{$index}" href="#" class="form-link"><img src="{$config->resourceBase}i/TreeMinus.gif" class="action-icon" alt="{ts}hide field or section{/ts}"/></a>
44 {/if}
45 </td>
46 <td> {$form.order_bys.$index.column.html}</td>
47 <td> {$form.order_bys.$index.order.html}</td>
48 <td> {$form.order_bys.$index.section.html}</td>
49 <td> {$form.order_bys.$index.pageBreak.html}</td>
50 </tr>
51 {/section}
52 </table>
53 <div id="optionFieldLink" class="add-remove-link">
54 <a onclick="showHideRow(); return false;" name="optionFieldLink" href="#" class="form-link"><img src="{$config->resourceBase}i/TreePlus.gif" class="action-icon" alt="{ts}show field or section{/ts}"/>{ts}another column{/ts}</a>
55 </div>
56 <script type="text/javascript">
57 var showRows = new Array({$showBlocks});
58 var hideBlocks = new Array({$hideBlocks});
59 var rowcounter = 0;
60 {literal}
61 if (navigator.appName == "Microsoft Internet Explorer") {
62 for ( var count = 0; count < hideBlocks.length; count++ ) {
63 var r = document.getElementById(hideBlocks[count]);
64 r.style.display = 'none';
65 }
66 }
67
68 // hide and display the appropriate blocks as directed by the php code
69 on_load_init_blocks( showRows, hideBlocks, '');
70
71 cj('input[id^="order_by_section_"]').click(disPageBreak).each(disPageBreak);
72
73 function disPageBreak() {
74 if (!cj(this).prop('checked')) {
75 cj(this).parent('td').next('td').children('input[id^="order_by_pagebreak_"]').prop({checked: false, disabled: true});
76 }
77 else {
78 cj(this).parent('td').next('td').children('input[id^="order_by_pagebreak_"]').prop({disabled: false});
79 }
80 }
81
82 function hideRow(i) {
83 showHideRow(i);
84 // clear values on hidden field, so they're not saved
85 cj('select#order_by_column_'+ i).val('');
86 cj('select#order_by_order_'+ i).val('ASC');
87 cj('input#order_by_section_'+ i).prop('checked', false);
88 cj('input#order_by_pagebreak_'+ i).prop('checked', false);
89 }
90
91 {/literal}
92 </script>
93 </div>