| 1 |
<?php |
| 2 |
/* |
| 3 |
STYLE GUIDE FOR WP SUBSCRIPTION ADMIN PAGES: |
| 4 |
- Use .wp-subscription-admin-content for main content area. |
| 5 |
- Use .wp-subscription-admin-box for white card/box with shadow and 6-8px border-radius. |
| 6 |
- Use .widefat.wp-subscription-list-table for tables, with no outer border, only row bottom borders. |
| 7 |
- Use compact table cells: font-size 14px, padding 8px 10px. |
| 8 |
- Use .button, .button-primary, .button-small for actions, with rounded corners, soft backgrounds, and subtle hover. |
| 9 |
- Use pill-shaped status labels (e.g., .subscrpt-active) for status. |
| 10 |
- Use Georgia, serif for titles, system sans-serif for body. |
| 11 |
- Keep all sections visually consistent, compact, and modern. |
| 12 |
- Avoid excessive spacing or large paddings. |
| 13 |
- All new UI/UX changes must follow these conventions. |
| 14 |
*/ |
| 15 |
?> |
| 16 |
<table class="wp-list-table widefat fixed striped wp-subscription-modern-table" style="border-radius:6px;overflow:hidden;box-shadow:0 2px 8px #e0e7ef;"> |
| 17 |
<thead> |
| 18 |
<tr> |
| 19 |
<th style="width: 100px;"><?php |
| 20 |
esc_html_e( 'ID', 'wp_subscription' ); ?></th> |
| 21 |
<th></th> |
| 22 |
<th><?php esc_html_e( 'Date', 'wp_subscription' ); ?></th> |
| 23 |
<th><?php esc_html_e( 'Status', 'wp_subscription' ); ?></th> |
| 24 |
<th><?php esc_html_e( 'Amount', 'wp_subscription' ); ?></th> |
| 25 |
</tr> |
| 26 |
</thead> |
| 27 |
|
| 28 |
<tbody> |
| 29 |
<?php foreach ( $order_histories as $order_history ) : ?> |
| 30 |
<?php |
| 31 |
$order = wc_get_order( $order_history->order_id ); |
| 32 |
$order_item = $order->get_item( $order_history->order_item_id ); |
| 33 |
?> |
| 34 |
<tr> |
| 35 |
<td><a href="<?php echo wp_kses_post( $order->get_edit_order_url() ); ?>" target="_blank"><?php echo wp_kses_post( $order_history->order_id ); ?></a></td> |
| 36 |
<td><?php echo wp_kses_post( order_relation_type_cast( $order_history->type ) ); ?></td> |
| 37 |
<td> |
| 38 |
<?php |
| 39 |
if ( $order ) { |
| 40 |
echo wp_kses_post( gmdate( 'F d, Y', strtotime( $order->get_date_created() ) ) );} |
| 41 |
?> |
| 42 |
</td> |
| 43 |
<td> |
| 44 |
<?php |
| 45 |
if ( $order ) { |
| 46 |
echo esc_html( sdevs_order_status_label( $order->get_status() ) ); |
| 47 |
} |
| 48 |
?> |
| 49 |
</td> |
| 50 |
<td> |
| 51 |
<?php |
| 52 |
echo wc_price( |
| 53 |
$order_item->get_total(), |
| 54 |
array( |
| 55 |
'currency' => $order->get_currency(), |
| 56 |
) |
| 57 |
); |
| 58 |
?> |
| 59 |
</td> |
| 60 |
</tr> |
| 61 |
<?php endforeach; ?> |
| 62 |
</tbody> |
| 63 |
</table> |
| 64 |
|