From c6f04fbedc34b1101e836f1743c8570d2a8db9e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Wed, 14 Jun 2023 09:55:29 -0300 Subject: [PATCH] Fix results table header with transparent background MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MaurĂ­cio Meneghini Fauth --- libraries/classes/Display/Results.php | 10 +++++----- templates/display/results/table.twig | 8 +++++--- .../display/results/table_headers_for_columns.twig | 2 +- test/classes/Display/ResultsTest.php | 8 ++++---- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/libraries/classes/Display/Results.php b/libraries/classes/Display/Results.php index d7e4e0984e..cc4a30664d 100644 --- a/libraries/classes/Display/Results.php +++ b/libraries/classes/Display/Results.php @@ -1067,7 +1067,7 @@ class Results $displayParams = $this->properties['display_params']; // 1. Displays the full/partial text button (part 1)... - $buttonHtml = '' . "\n"; + $buttonHtml = ''; $emptyPreCondition = $displayParts->hasEditLink && $displayParts->deleteLink !== DeleteLinkEnum::NO_DELETE; @@ -1087,7 +1087,7 @@ class Results $displayParams['emptypre'] = $emptyPreCondition ? 4 : 0; - $buttonHtml .= '' . $fullOrPartialTextLink . ''; } elseif ( $leftOrBoth @@ -1101,7 +1101,7 @@ class Results } elseif ($GLOBALS['cfg']['RowActionLinks'] === self::POSITION_NONE) { // ... elseif display an empty column if the actions links are // disabled to match the rest of the table - $buttonHtml .= ''; + $buttonHtml .= ''; } $this->properties['display_params'] = $displayParams; @@ -1732,7 +1732,7 @@ class Results && $displayParts->deleteLink !== DeleteLinkEnum::NO_DELETE ? 4 : 1; $rightColumnHtml .= "\n" - . '' + . '' . $fullOrPartialTextLink . ''; } elseif ( @@ -1748,7 +1748,7 @@ class Results $displayParams['emptyafter'] = $displayParts->hasEditLink && $displayParts->deleteLink !== DeleteLinkEnum::NO_DELETE ? 4 : 1; - $rightColumnHtml .= "\n" . ''; } diff --git a/templates/display/results/table.twig b/templates/display/results/table.twig index 3571a43abc..24d13ed343 100644 --- a/templates/display/results/table.twig +++ b/templates/display/results/table.twig @@ -293,10 +293,12 @@
+ + - {{ headers.button|raw }} - {{ headers.table_headers_for_columns|raw }} - {{ headers.column_at_right_side|raw }} + {{ headers.button|raw }} + {{ headers.table_headers_for_columns|raw }} + {{ headers.column_at_right_side|raw }} diff --git a/templates/display/results/table_headers_for_columns.twig b/templates/display/results/table_headers_for_columns.twig index d030fbf740..962670b54b 100644 --- a/templates/display/results/table_headers_for_columns.twig +++ b/templates/display/results/table_headers_for_columns.twig @@ -1,5 +1,5 @@ {% for column in columns %} - ' . "\n", + 'button' => '', 'table_headers_for_columns' => $tableHeadersForColumns, - 'column_at_right_side' => "\n" . '', + 'column_at_right_side' => "\n" . '', ], 'body' => '' . "\n" @@ -1583,9 +1583,9 @@ class ResultsTest extends AbstractTestCase 'column_order' => [], 'options' => '$optionsBlock', 'has_bulk_actions_form' => false, - 'button' => '' . "\n", + 'button' => '', 'table_headers_for_columns' => $tableHeadersForColumns, - 'column_at_right_side' => "\n" . '', + 'column_at_right_side' => "\n" . '', ], 'body' => '' . "\n"
{% if is_sortable %} diff --git a/test/classes/Display/ResultsTest.php b/test/classes/Display/ResultsTest.php index 96b7b7ce64..c72e3a1d65 100644 --- a/test/classes/Display/ResultsTest.php +++ b/test/classes/Display/ResultsTest.php @@ -1353,9 +1353,9 @@ class ResultsTest extends AbstractTestCase ], 'options' => '$optionsBlock', 'has_bulk_actions_form' => false, - 'button' => '
1
2