Import from SVN (r45945, r596)
[civicrm-core.git] / templates / CRM / Mailing / Page / Event.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.3 |
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 {include file="CRM/common/pager.tpl" location="top"}
27
28 {if $rows }
29 {include file="CRM/common/jsortable.tpl"}
30 {strip}
31 <table id="mailing_event">
32 <thead>
33 <tr>
34 {foreach from=$columnHeaders item=header}
35 <th>
36 {if $header.sort}
37 {assign var='key' value=$header.sort}
38 {$sort->_response.$key.link}
39 {else}
40 {$header.name}
41 {/if}
42 </th>
43 {/foreach}
44 </tr>
45 </thead>
46 {counter start=0 skip=1 print=false}
47 {foreach from=$rows item=row}
48 <tr class="{cycle values="odd-row,even-row"}">
49 {foreach from=$row item=value}
50 <td>{$value}</td>
51 {/foreach}
52 </tr>
53 {/foreach}
54 </table>
55 {/strip}
56 {else}
57 <div class="messages status no-popup">
58 <div class="icon inform-icon"></div>&nbsp;
59 {ts 1=$title}There are currently no %1.{/ts}
60 </div>
61 {/if}
62
63 <div class="action-link">
64 <a href="{crmURL p='civicrm/mailing/report' q="mid=`$mailing_id`&reset=1"}" >&raquo; {ts}Back to Report{/ts}</a>
65 </div>
66
67 {include file="CRM/common/pager.tpl" location="bottom"}
68
69 {if $pager and ( $pager->_totalPages > 1 )}
70 {literal}
71 <script type="text/javascript">
72 var totalPages = {/literal}{$pager->_totalPages}{literal};
73 cj( function ( ) {
74 cj("#crm-container .crm-pager input.form-submit").click( function( ) {
75 submitPagerData( this );
76 });
77 });
78
79 function submitPagerData( el ) {
80 var urlParams= '';
81 var jumpTo = cj(el).parent( ).children('input[type=text]').val( );
82 if ( parseInt(jumpTo)== "Nan" ) jumpTo = 1;
83 if ( jumpTo > totalPages ) jumpTo = totalPages;
84 {/literal}
85 {foreach from=$pager->_linkData item=val key=k }
86 {if $k neq 'crmPID' && $k neq 'force' && $k neq 'q' }
87 {literal}
88 urlParams += '&{/literal}{$k}={$val}{literal}';
89 {/literal}
90 {/if}
91 {/foreach}
92 {literal}
93 urlParams += '&crmPID='+parseInt(jumpTo);
94 var submitUrl = {/literal}'{crmURL p="civicrm/mailing/report/event" q="force=1" h=0 }'{literal};
95 document.location = submitUrl+urlParams;
96 }
97 </script>
98 {/literal}
99 {/if}