From 226e2649f71d6dfa9e876a877a3d92b6511dd465 Mon Sep 17 00:00:00 2001 From: Corey McKrill <916023+coreymckrill@users.noreply.github.com> Date: Wed, 1 Nov 2023 17:10:55 -0700 Subject: [PATCH] Add delete button to single file view --- .../woocommerce/client/legacy/css/admin.scss | 6 +++ .../Admin/Logging/FileV2/FileController.php | 2 +- .../Admin/Logging/FileV2/ListTable.php | 2 +- .../Internal/Admin/Logging/PageController.php | 37 ++++++++++++++++--- 4 files changed, 40 insertions(+), 7 deletions(-) diff --git a/plugins/woocommerce/client/legacy/css/admin.scss b/plugins/woocommerce/client/legacy/css/admin.scss index 1750ef6749d..1e63ceb6c37 100644 --- a/plugins/woocommerce/client/legacy/css/admin.scss +++ b/plugins/woocommerce/client/legacy/css/admin.scss @@ -1348,6 +1348,12 @@ table.wc_status_table--tools { } } +.wc-logs-single-file-actions { + margin-left: auto; + display: flex; + gap: 0.5em; +} + .wc-logs-entries { background: #f6f7f7; border: 1px solid #c3c4c7; diff --git a/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/FileController.php b/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/FileController.php index 9b356f3e6a0..7842b4ccdc3 100644 --- a/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/FileController.php +++ b/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/FileController.php @@ -181,7 +181,7 @@ class FileController { if ( count( $result ) < 1 ) { return new WP_Error( 'wc_log_file_error', - esc_html__( 'Could not read the specified file.', 'woocommerce' ) + esc_html__( 'This file does not exist.', 'woocommerce' ) ); } diff --git a/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/ListTable.php b/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/ListTable.php index 50c87f3322c..3469fa5942e 100644 --- a/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/ListTable.php +++ b/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/ListTable.php @@ -229,7 +229,7 @@ class ListTable extends WP_List_Table {