| 1 |
<?php |
| 2 |
/* |
| 3 |
* Transactions list page |
| 4 |
* All undefined vars comes from 'render_better_payment_admin_pages' method |
| 5 |
* $bp_admin_all_transactions : contains all values |
| 6 |
*/ |
| 7 |
?> |
| 8 |
|
| 9 |
<?php |
| 10 |
$bp_admin_settings_transactions_all_count = isset($bp_admin_all_transactions_analytics['all']) ? $bp_admin_all_transactions_analytics['all'] : 0; |
| 11 |
$bp_admin_settings_transactions_paid_count = isset($bp_admin_all_transactions_analytics['paid']) ? $bp_admin_all_transactions_analytics['paid'] : 0; |
| 12 |
$bp_admin_settings_transactions_processing_count = $bp_admin_settings_transactions_all_count - $bp_admin_settings_transactions_paid_count; |
| 13 |
?> |
| 14 |
|
| 15 |
<div class="better-payment"> |
| 16 |
<div class="template__wrapper background__grey better-payment-admin-transactions-page"> |
| 17 |
<header class="pb30"> |
| 18 |
<div class="bp-container"> |
| 19 |
<div class="bp-row"> |
| 20 |
<div class="bp-col"> |
| 21 |
<div class="logo"> |
| 22 |
<a href="javascript:void(0)"><img src="<?php echo esc_url(BETTER_PAYMENT_ADMIN_ASSET_URL . 'img/logo.svg'); ?>" alt=""></a> |
| 23 |
</div> |
| 24 |
</div> |
| 25 |
</div> |
| 26 |
</div> |
| 27 |
</header> |
| 28 |
|
| 29 |
<div class="bp-container"> |
| 30 |
<div class="bp-row"> |
| 31 |
<div class="bp-col-lg-4 bp-col-sm-6 bp-col"> |
| 32 |
<div class="statistic"> |
| 33 |
<div class="icon"> |
| 34 |
<i class="bp-icon bp-swap"></i> |
| 35 |
</div> |
| 36 |
<div class="statistic__body"> |
| 37 |
<h3><?php _e($bp_admin_settings_transactions_all_count, 'better-payment'); ?></h3> |
| 38 |
<p><?php _e('Total Transactions', 'better-payment'); ?></p> |
| 39 |
</div> |
| 40 |
</div> |
| 41 |
</div> |
| 42 |
<div class="bp-col-lg-4 bp-col-sm-6 bp-col"> |
| 43 |
<div class="statistic"> |
| 44 |
<div class="icon"> |
| 45 |
<i class="bp-icon bp-list-check"></i> |
| 46 |
</div> |
| 47 |
<div class="statistic__body"> |
| 48 |
<h3><?php _e($bp_admin_settings_transactions_paid_count, 'better-payment'); ?></h3> |
| 49 |
<p><?php _e('Completed Transactions', 'better-payment'); ?></p> |
| 50 |
</div> |
| 51 |
</div> |
| 52 |
</div> |
| 53 |
<div class="bp-col-lg-4 bp-col-sm-6 bp-col"> |
| 54 |
<div class="statistic"> |
| 55 |
<div class="icon"> |
| 56 |
<i class="bp-icon bp-server"></i> |
| 57 |
</div> |
| 58 |
<div class="statistic__body"> |
| 59 |
<h3><?php _e($bp_admin_settings_transactions_processing_count, 'better-payment'); ?></h3> |
| 60 |
<p><?php _e('Processing Transactions', 'better-payment'); ?></p> |
| 61 |
</div> |
| 62 |
</div> |
| 63 |
</div> |
| 64 |
</div> |
| 65 |
<div class="bp-row"> |
| 66 |
<div class="bp-col"> |
| 67 |
<div class="transaction-filter-wrapper transactions"> |
| 68 |
<div class="transaction__filter"> |
| 69 |
<form action="#" id="better-payment-admin-settings-form"> |
| 70 |
<div class="mb20"> |
| 71 |
<label for="#"><?php _e('Search', 'better-payment'); ?></label> |
| 72 |
<div class="form__group"> |
| 73 |
<input name="search_text" type="text" class="form__control serch-text" placeholder="<?php _e('Search here', 'better-payment'); ?>" value="<?php echo isset($search_text) ? esc_attr($search_text) : '' ?>" title="<?php _e('Search by email, amount, transaction id, source', 'better-payment'); ?>" > |
| 74 |
</div> |
| 75 |
</div> |
| 76 |
<div class="mb20"> |
| 77 |
<label for="#"> <?php _e('From Date', 'better-payment'); ?> </label> |
| 78 |
<div class="form__group"> |
| 79 |
<input name="payment_date_from" type="text" class="form__control payment_date_from bp-datepicker" placeholder="<?php _e('Payment date', 'better-payment'); ?>"> |
| 80 |
</div> |
| 81 |
</div> |
| 82 |
|
| 83 |
<div class="mb20"> |
| 84 |
<label for="#"> <?php _e('To Date', 'better-payment'); ?> </label> |
| 85 |
<div class="form__group"> |
| 86 |
<input name="payment_date_to" type="text" class="form__control payment_date_to bp-datepicker" placeholder="<?php _e('Payment date', 'better-payment'); ?>"> |
| 87 |
</div> |
| 88 |
</div> |
| 89 |
|
| 90 |
<div class="mb20"> |
| 91 |
<label for="#"><?php _e('Sort By', 'better-payment'); ?></label> |
| 92 |
<div class="bp-select"> |
| 93 |
<select name="order_by" class="order-by"> |
| 94 |
<option value="payment_date" <?php ( $transaction_pagination_orderby === 'payment_date' || $transaction_pagination_orderby === 'id' ) ? 'selected' : ''; ?> > <?php _e('Payment Date', 'better-payment'); ?> </option> |
| 95 |
<option value="email" <?php $transaction_pagination_orderby === 'email' ? 'selected' : ''; ?> > <?php _e('Email', 'better-payment'); ?> </option> |
| 96 |
<option value="amount" <?php $transaction_pagination_orderby === 'amount' ? 'selected' : ''; ?> > <?php _e('Amount', 'better-payment'); ?> </option> |
| 97 |
<option value="status" <?php $transaction_pagination_orderby === 'status' ? 'selected' : ''; ?> > <?php _e('Status', 'better-payment'); ?> </option> |
| 98 |
</select> |
| 99 |
</div> |
| 100 |
</div> |
| 101 |
<div class="mb20"> |
| 102 |
<label for="#"> <?php _e('Sort Order', 'better-payment'); ?> </label> |
| 103 |
<div class="bp-select"> |
| 104 |
<select name="order" class="order"> |
| 105 |
<option value="DESC" <?php echo $transaction_pagination_order === 'DESC' ? 'selected' : ''; ?> > <?php _e('Descending', 'better-payment'); ?> </option> |
| 106 |
<option value="ASC" <?php echo $transaction_pagination_order === 'ASC' ? 'selected' : ''; ?> > <?php _e('Ascending', 'better-payment'); ?> </option> |
| 107 |
</select> |
| 108 |
</div> |
| 109 |
</div> |
| 110 |
<div class="mb20"> |
| 111 |
<label for="#"> <?php _e('Source', 'better-payment'); ?> </label> |
| 112 |
<div class="bp-select"> |
| 113 |
<select name="source" class="source"> |
| 114 |
<option value=""> <?php _e('All', 'better-payment'); ?> </option> |
| 115 |
<option value="paypal" <?php echo $transaction_pagination_source === 'paypal' ? 'selected' : ''; ?> > <?php _e('PayPal', 'better-payment'); ?> </option> |
| 116 |
<option value="stripe" <?php echo $transaction_pagination_source === 'stripe' ? 'selected' : ''; ?> > <?php _e('Stripe', 'better-payment'); ?> </option> |
| 117 |
</select> |
| 118 |
</div> |
| 119 |
</div> |
| 120 |
<button class="button button__active better-payment-transaction-filter"> <?php _e('Filter', 'better-payment'); ?> </button> |
| 121 |
</form> |
| 122 |
</div> |
| 123 |
</div> |
| 124 |
|
| 125 |
<?php include_once BETTER_PAYMENT_ADMIN_VIEW_PATH . "template-transaction-list.php"; ?> |
| 126 |
|
| 127 |
</div> |
| 128 |
</div> |
| 129 |
</div> |
| 130 |
</div> |
| 131 |
</div> |