{*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
{include file="CRM/common/pager.tpl" location="top"}
{if $rows }
-{include file="CRM/common/jsortable.tpl"}
-{strip}
-<table id="mailing_event">
- <thead>
- <tr>
- {foreach from=$columnHeaders item=header}
- <th>
- {if $header.sort}
- {assign var='key' value=$header.sort}
- {$sort->_response.$key.link}
- {else}
- {$header.name}
- {/if}
- </th>
- {/foreach}
- </tr>
- </thead>
- {counter start=0 skip=1 print=false}
- {foreach from=$rows item=row}
- <tr class="{cycle values="odd-row,even-row"}">
- {foreach from=$row item=value}
- <td>{$value}</td>
- {/foreach}
- </tr>
- {/foreach}
-</table>
-{/strip}
+ {include file="CRM/common/jsortable.tpl"}
+ {strip}
+ <table id="mailing_event">
+ <thead>
+ <tr>
+ {foreach from=$columnHeaders item=header}
+ <th>
+ {if $header.sort}
+ {assign var='key' value=$header.sort}
+ {$sort->_response.$key.link}
+ {else}
+ {$header.name}
+ {/if}
+ </th>
+ {/foreach}
+ </tr>
+ </thead>
+ {counter start=0 skip=1 print=false}
+ {foreach from=$rows item=row}
+ <tr class="{cycle values="odd-row,even-row"}">
+ {foreach from=$row item=value}
+ <td>{$value}</td>
+ {/foreach}
+ </tr>
+ {/foreach}
+ </table>
+ {/strip}
{else}
- <div class="messages status no-popup">
- <div class="icon inform-icon"></div>
- {ts 1=$title}There are currently no %1.{/ts}
- </div>
-{/if}
+ <div class="messages status no-popup">
+ <div class="icon inform-icon"></div>
+
+ {ts 1=$title}There are currently no %1.{/ts}
+ </div>
+{/if}
- <div class="action-link">
- <a href="{crmURL p='civicrm/mailing/report' q="mid=`$mailing_id`&reset=1"}" >» {ts}Back to Report{/ts}</a>
- </div>
+<div class="action-link">
+ <a href="{$backUrl}">» {$backUrlTitle}</a>
+</div>
{include file="CRM/common/pager.tpl" location="bottom"}
{if $pager and ( $pager->_totalPages > 1 )}
{literal}
-<script type="text/javascript">
- var totalPages = {/literal}{$pager->_totalPages}{literal};
- cj( function ( ) {
- cj("#crm-container .crm-pager input.form-submit").click( function( ) {
- submitPagerData( this );
- });
- });
-
- function submitPagerData( el ) {
- var urlParams= '';
- var jumpTo = cj(el).parent( ).children('input[type=text]').val( );
- if ( parseInt(jumpTo)== "Nan" ) jumpTo = 1;
- if ( jumpTo > totalPages ) jumpTo = totalPages;
- {/literal}
+ <script type="text/javascript">
+ var totalPages = {/literal}{$pager->_totalPages}{literal};
+ CRM.$(function($) {
+ cj("#crm-container .crm-pager input.form-submit").click(function () {
+ submitPagerData(this);
+ });
+ });
+
+ function submitPagerData(el) {
+ var urlParams = '';
+ var jumpTo = cj(el).parent().children('input[type=text]').val();
+ if (parseInt(jumpTo) == "Nan") {
+ jumpTo = 1;
+ }
+ if (jumpTo > totalPages) {
+ jumpTo = totalPages;
+ }
+ {/literal}
{foreach from=$pager->_linkData item=val key=k }
- {if $k neq 'crmPID' && $k neq 'force' && $k neq 'q' }
- {literal}
+ {if $k neq 'crmPID' && $k neq 'force' && $k neq 'q' }
+ {literal}
urlParams += '&{/literal}{$k}={$val}{literal}';
- {/literal}
- {/if}
+ {/literal}
+ {/if}
{/foreach}
{literal}
- urlParams += '&crmPID='+parseInt(jumpTo);
+ urlParams += '&crmPID=' + parseInt(jumpTo);
var submitUrl = {/literal}'{crmURL p="civicrm/mailing/report/event" q="force=1" h=0 }'{literal};
- document.location = submitUrl+urlParams;
- }
-</script>
+ document.location = submitUrl + urlParams;
+ }
+ </script>
{/literal}
-{/if}
\ No newline at end of file
+{/if}