From 38c3fe4de4789958c58c8dff19e11ba00f5ea85b Mon Sep 17 00:00:00 2001 From: vendidero Date: Wed, 6 Nov 2024 13:20:23 +0100 Subject: [PATCH] Shipment/order shipping status markup update. --- assets/css/admin.scss | 6 ++++++ includes/admin/views/html-order-shipment-list.php | 2 +- includes/admin/views/html-order-shipment.php | 2 +- includes/admin/views/html-order-shipments.php | 2 +- src/Admin/Admin.php | 2 +- src/Admin/Table.php | 2 +- src/Ajax.php | 4 ++-- 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/assets/css/admin.scss b/assets/css/admin.scss index a373a217..1f53b77f 100644 --- a/assets/css/admin.scss +++ b/assets/css/admin.scss @@ -633,6 +633,7 @@ table.wc-gzd-shipments-shipping-rules { border-radius: 3px; display: inline-flex; white-space: nowrap; + max-width: 100%; &.status-draft, &.status-processing, &.status-requested, &.status-partially-shipped, &.status-partially-delivered, &.status-open, &.status-partially-returned { background: #f8dda7; @@ -653,6 +654,11 @@ table.wc-gzd-shipments-shipping-rules { background: #f8dda7; color: #94660c; } + + > span { + overflow: hidden; + text-overflow: ellipsis; + } } a.button.wc-gzd-shipment-action-button { diff --git a/includes/admin/views/html-order-shipment-list.php b/includes/admin/views/html-order-shipment-list.php index f10b16b1..f8cfb96d 100644 --- a/includes/admin/views/html-order-shipment-list.php +++ b/includes/admin/views/html-order-shipment-list.php @@ -22,7 +22,7 @@

- get_return_status() ) ); ?> + get_return_status() ) ); ?>
diff --git a/includes/admin/views/html-order-shipment.php b/includes/admin/views/html-order-shipment.php index e83fbf3c..d477ae63 100644 --- a/includes/admin/views/html-order-shipment.php +++ b/includes/admin/views/html-order-shipment.php @@ -14,7 +14,7 @@

get_type() ) ), esc_html( $shipment->get_shipment_number() ) ); ?>

- get_status() ) ); ?> + get_status() ) ); ?>
diff --git a/includes/admin/views/html-order-shipments.php b/includes/admin/views/html-order-shipments.php index e38ef8b8..aea75351 100644 --- a/includes/admin/views/html-order-shipments.php +++ b/includes/admin/views/html-order-shipments.php @@ -17,7 +17,7 @@

- get_shipping_status() ) ); ?> + get_shipping_status() ) ); ?>
diff --git a/src/Admin/Admin.php b/src/Admin/Admin.php index f0960481..3beff73c 100644 --- a/src/Admin/Admin.php +++ b/src/Admin/Admin.php @@ -587,7 +587,7 @@ public static function render_order_columns( $column, $post_id ) { if ( $shipment_order = wc_gzd_get_shipment_order( $the_order ) ) { $shipping_status = $shipment_order->get_shipping_status(); - $status_html = '' . esc_html( wc_gzd_get_shipment_order_shipping_status_name( $shipping_status ) ) . ''; + $status_html = '' . esc_html( wc_gzd_get_shipment_order_shipping_status_name( $shipping_status ) ) . ''; if ( in_array( $shipping_status, array( 'shipped', 'partially-shipped' ), true ) && $shipment_order->get_shipments() ) { if ( $last_shipment = $shipment_order->get_last_shipment_with_tracking() ) { diff --git a/src/Admin/Table.php b/src/Admin/Table.php index ffa8c6e4..915b0c39 100644 --- a/src/Admin/Table.php +++ b/src/Admin/Table.php @@ -1079,7 +1079,7 @@ public function column_address( $shipment ) { * @param Shipment $shipment The current shipment object. */ public function column_status( $shipment ) { - echo '' . esc_html( wc_gzd_get_shipment_status_name( $shipment->get_status() ) ) . ''; + echo '' . esc_html( wc_gzd_get_shipment_status_name( $shipment->get_status() ) ) . ''; } /** diff --git a/src/Ajax.php b/src/Ajax.php index 7cea3c2f..ce4da14d 100644 --- a/src/Ajax.php +++ b/src/Ajax.php @@ -1028,7 +1028,7 @@ public static function json_search_orders() { } private static function get_order_status_html( $order_shipment ) { - $status_html = '' . wc_gzd_get_shipment_order_shipping_status_name( $order_shipment->get_shipping_status() ) . ''; + $status_html = '' . wc_gzd_get_shipment_order_shipping_status_name( $order_shipment->get_shipping_status() ) . ''; return $status_html; } @@ -1090,7 +1090,7 @@ private static function get_global_order_status_html( $order ) { } private static function get_order_return_status_html( $order_shipment ) { - $status_html = '' . wc_gzd_get_shipment_order_return_status_name( $order_shipment->get_return_status() ) . ''; + $status_html = '' . wc_gzd_get_shipment_order_return_status_name( $order_shipment->get_return_status() ) . ''; return $status_html; }