2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
10 <div class="crm-block crm-form-block crm-batch-search-form-block">
11 <h3>{ts}Data Entry Batches{/ts}</h3>
12 <table class="form-layout-compressed">
15 {$form.title.html}<br />
16 <span class="description font-italic">
17 {ts}Complete OR partial batch name.{/ts}
20 <td>{include file="CRM/common/formButtons.tpl"}</td>
24 <div class="action-link">
25 {crmButton accesskey="N" p="civicrm/batch/add" q="reset=1&action=add" id="newBatch" icon="crm-i fa-plus-circle"}{ts}New Data Entry Batch{/ts}{/crmButton}<br/>
27 <table class="crm-batch-selector">
30 <th class="crm-batch-name">{ts}Batch Name{/ts}</th>
31 <th class="crm-batch-type">{ts}Type{/ts}</th>
32 <th class="crm-batch-item_count">{ts}Item Count{/ts}</th>
33 <th class="crm-batch-total_amount">{ts}Total Amount{/ts}</th>
34 <th class="crm-batch-status">{ts}Status{/ts}</th>
35 <th class="crm-batch-created_by">{ts}Created By{/ts}</th>
42 <script type="text/javascript">
44 buildBatchSelector( false );
45 $('#_qf_Search_refresh').click( function() {
46 buildBatchSelector(true);
49 function buildBatchSelector( filterSearch ) {
50 var status = {/literal}{if !empty($status)}{$status}{else}0{/if}{literal};
52 crmBatchSelector.fnDestroy();
53 var ZeroRecordText = '<div class="status messages">{/literal}{ts escape="js"}No matching Data Entry Batches found for your search criteria.{/ts}{literal}</li></ul></div>';
55 else if (status == 1) {
56 var ZeroRecordText = {/literal}'<div class="status messages">{ts escape="js"}You do not have any Open Data Entry Batches.{/ts}</div>'{literal};
59 var ZeroRecordText = {/literal}'<div class="status messages">{ts escape="js"}No Data Entry Batches have been created for this site.{/ts}</div>'{literal};
63 var sourceUrl = {/literal}'{crmURL p="civicrm/ajax/batchlist" h=0 q="snippet=4"}'{literal};
64 var $context = $('#crm-main-content-wrapper');
66 crmBatchSelector = $('table.crm-batch-selector', $context).dataTable({
71 {sClass:'crm-batch-name'},
72 {sClass:'crm-batch-type'},
73 {sClass:'crm-batch-item_count right'},
74 {sClass:'crm-batch-total_amount right'},
75 {sClass:'crm-batch-status'},
76 {sClass:'crm-batch-created_by'},
77 {sClass:'crm-batch-links', bSortable:false}
80 "asStripClasses" : [ "odd-row", "even-row" ],
81 "sPaginationType": "full_numbers",
82 "sDom" : '<"crm-datatable-pager-top"lfp>rt<"crm-datatable-pager-bottom"ip>',
85 "sAjaxSource": sourceUrl,
87 "oLanguage": { "sZeroRecords": ZeroRecordText,
88 "sProcessing": {/literal}"{ts escape='js'}Processing...{/ts}"{literal},
89 "sLengthMenu": {/literal}"{ts escape='js'}Show _MENU_ entries{/ts}"{literal},
90 "sInfo": {/literal}"{ts escape='js'}Showing _START_ to _END_ of _TOTAL_ entries{/ts}"{literal},
91 "sInfoEmpty": {/literal}"{ts escape='js'}Showing 0 to 0 of 0 entries{/ts}"{literal},
92 "sInfoFiltered": {/literal}"{ts escape='js'}(filtered from _MAX_ total entries){/ts}"{literal},
93 "sSearch": {/literal}"{ts escape='js'}Search:{/ts}"{literal},
95 "sFirst": {/literal}"{ts escape='js'}First{/ts}"{literal},
96 "sPrevious": {/literal}"{ts escape='js'}Previous{/ts}"{literal},
97 "sNext": {/literal}"{ts escape='js'}Next{/ts}"{literal},
98 "sLast": {/literal}"{ts escape='js'}Last{/ts}"{literal}
101 "fnServerData": function ( sSource, aoData, fnCallback ) {
104 {name:'title', value: $('.crm-batch-search-form-block #title').val()}
112 "success": fnCallback