Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
232624b1 | 3 | | CiviCRM version 4.4 | |
6a488035 TO |
4 | +--------------------------------------------------------------------+ |
5 | | Copyright CiviCRM LLC (c) 2004-2013 | | |
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 !$printOnly} {* NO print section starts *} | |
27 | ||
28 | {* build the print pdf buttons *} | |
29 | {if $rows} | |
30 | <div class="crm-tasks"> | |
31 | {assign var=print value="_qf_"|cat:$form.formName|cat:"_submit_print"} | |
32 | {assign var=pdf value="_qf_"|cat:$form.formName|cat:"_submit_pdf"} | |
33 | {assign var=csv value="_qf_"|cat:$form.formName|cat:"_submit_csv"} | |
34 | {assign var=group value="_qf_"|cat:$form.formName|cat:"_submit_group"} | |
35 | {assign var=chart value="_qf_"|cat:$form.formName|cat:"_submit_chart"} | |
36 | <table style="border:0;"> | |
37 | <tr> | |
38 | <td> | |
39 | <table class="form-layout-compressed"> | |
40 | <tr> | |
41 | <td>{$form.$print.html} </td> | |
42 | <td>{$form.$pdf.html} </td> | |
43 | <td>{$form.$csv.html} </td> | |
44 | {if $instanceUrl} | |
45 | <td> » <a href="{$instanceUrl}">{ts}Existing report(s) from this template{/ts}</a></td> | |
46 | {/if} | |
47 | </tr> | |
48 | </table> | |
49 | </td> | |
50 | <td> | |
51 | <table class="form-layout-compressed" align="right"> | |
52 | {if $chartSupported} | |
53 | <tr> | |
54 | <td>{$form.charts.html|crmAddClass:big}</td> | |
55 | <td align="right">{$form.$chart.html}</td> | |
56 | </tr> | |
57 | {/if} | |
58 | {if $form.groups} | |
59 | <tr> | |
60 | <td>{$form.groups.html|crmAddClass:big}</td> | |
61 | <td align="right">{$form.$group.html}</td> | |
62 | </tr> | |
63 | {/if} | |
64 | </table> | |
65 | </td> | |
66 | </tr> | |
67 | </table> | |
68 | </div> | |
69 | {/if} | |
70 | ||
71 | {literal} | |
72 | <script type="text/javascript"> | |
73 | var flashChartType = {/literal}{if $chartType}'{$chartType}'{else}''{/if}{literal}; | |
74 | function disablePrintPDFButtons( viewtype ) { | |
75 | if (viewtype && flashChartType != viewtype) { | |
6f9cd76f CW |
76 | cj('#_qf_Summary_submit_pdf').prop('disabled', true).addClass('button-disabled'); |
77 | cj('#_qf_Summary_submit_print').prop('disabled', true).addClass('button-disabled'); | |
6a488035 | 78 | } else { |
6f9cd76f CW |
79 | cj('#_qf_Summary_submit_pdf').prop('disabled', false).removeClass('button-disabled'); |
80 | cj('#_qf_Summary_submit_print').prop('disabled', false).removeClass('button-disabled'); | |
6a488035 TO |
81 | } |
82 | } | |
83 | </script> | |
84 | {/literal} | |
85 | {/if} {* NO print section ends *} |