Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction Details > Donation Details Metabox (Responsiveness) #904

Merged
merged 2 commits into from
Aug 17, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
161 changes: 83 additions & 78 deletions includes/admin/payments/view-order-details.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,64 +357,40 @@

<div class="inside">

<table style="width:100%;">
<thead>
<tr>
<?php
/**
* Fires in order details page, in the donation-information metabox, before the head elements.
*
* Allows you to add new TH elements at the beginning.
*
* @since 1.0
*
* @param int $payment_id Payment id.
*/
do_action( 'give_donation_details_thead_before', $payment_id );
?>
<th><?php esc_html_e( 'Donation Form ID', 'give' ) ?></th>
<th><?php esc_html_e( 'Donation Form Title', 'give' ) ?></th>
<th><?php esc_html_e( 'Donation Level', 'give' ) ?></th>
<th><?php esc_html_e( 'Donation Date', 'give' ) ?></th>
<th><?php esc_html_e( 'Total Donation', 'give' ) ?></th>
<?php
/**
* Fires in order details page, in the donation-information metabox, after the head elements.
*
* Allows you to add new TH elements at the end.
*
* @since 1.0
*
* @param int $payment_id Payment id.
*/
do_action( 'give_donation_details_thead_after', $payment_id );
?>
</tr>
</thead>
<tr>
<?php
/**
* Fires in order details page, in the donation-information metabox, before the body elements.
*
* Allows you to add new TD elements at the beginning.
*
* @since 1.0
*
* @param int $payment_id Payment id.
*/
do_action( 'give_donation_details_tbody_before', $payment_id );
?>
<td>
<?php echo $payment_meta['form_id']; ?>
</td>
<td>
<div class="column-container">
<div class="column">
<p>
<strong><?php esc_html_e( 'Donation Form ID:', 'give' ); ?></strong><br>
<?php
if ( $payment_meta['form_id'] ) :
printf(
'<a href="%1$s" target="_blank">#%2$s</a>',
admin_url( 'post.php?action=edit&post=' . $payment_meta['form_id'] ),
$payment_meta['form_id']
);
endif;
?>
</p>
<p>
<strong><?php esc_html_e( 'Donation Form Title:', 'give' ); ?></strong><br>
<?php give_get_form_dropdown( array(
'id' => $payment_meta['form_id'],
'selected' => $payment_meta['form_id'],
'chosen' => true
), true ); ?>
</td>
<td>
</p>
</div>
<div class="column">
<p>
<strong><?php esc_html_e( 'Donation Date:', 'give' ); ?></strong><br>
<?php
//Transaction Date
$date_format = get_option( 'date_format' );
echo date_i18n( $date_format, strtotime( $payment_date ) );
?>
</p>
<p>
<strong><?php esc_html_e( 'Donation Level:', 'give' ); ?></strong><br>
<?php
$var_prices = give_has_variable_prices( $payment_meta['form_id'] );
if ( empty( $var_prices ) ) {
Expand All @@ -428,41 +404,70 @@
'show_option_all' => '',
'selected' => $payment_meta['price_id'],
);

// Render variable prices select tag html.
give_get_form_variable_price_dropdown( $variable_price_dropdown_option, true );
}
?>
</td>
<td>
</p>
</div>
<div class="column">
<p>
<strong><?php esc_html_e( 'Total Donation:', 'give' ); ?></strong><br>
<?php echo esc_html( give_currency_filter( give_format_amount( give_get_payment_amount( $payment_id ) ) ) ); ?>
</p>
<p>
<?php
//Transaction Date
$date_format = get_option( 'date_format' );
echo date_i18n( $date_format, strtotime( $payment_date ) );
/**
* Fires in order details page, in the donation-information metabox, before the head elements.
*
* Allows you to add new TH elements at the beginning.
*
* @since 1.0
*
* @param int $payment_id Payment id.
*/
do_action( 'give_donation_details_thead_before', $payment_id );

/**
* Fires in order details page, in the donation-information metabox, after the head elements.
*
* Allows you to add new TH elements at the end.
*
* @since 1.0
*
* @param int $payment_id Payment id.
*/
do_action( 'give_donation_details_thead_after', $payment_id );

/**
* Fires in order details page, in the donation-information metabox, before the body elements.
*
* Allows you to add new TD elements at the beginning.
*
* @since 1.0
*
* @param int $payment_id Payment id.
*/
do_action( 'give_donation_details_tbody_before', $payment_id );

/**
* Fires in order details page, in the donation-information metabox, after the body elements.
*
* Allows you to add new TD elements at the end.
*
* @since 1.0
*
* @param int $payment_id Payment id.
*/
do_action( 'give_donation_details_tbody_after', $payment_id );
?>
</td>
<td>
<?php echo esc_html( give_currency_filter( give_format_amount( give_get_payment_amount( $payment_id ) ) ) ); ?>
</td>
<?php
/**
* Fires in order details page, in the donation-information metabox, after the body elements.
*
* Allows you to add new TD elements at the end.
*
* @since 1.0
*
* @param int $payment_id Payment id.
*/
do_action( 'give_donation_details_tbody_after', $payment_id );
?>
</tr>
</table>
</p>
</div>
</div>

</div>
<!-- /.inside -->


</div>
<!-- /#give-donation-overview -->

Expand Down