From 78544d04d8808a271d78690169294eae7946031f Mon Sep 17 00:00:00 2001 From: Lukas Bixen Date: Mon, 7 Feb 2022 20:46:44 -0600 Subject: [PATCH] Fix navigation layout if row count unknown: Remove 'End' button and fix missing separator Signed-off-by: Lukas Bixen --- libraries/classes/Display/Results.php | 5 +++++ templates/display/results/table.twig | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/classes/Display/Results.php b/libraries/classes/Display/Results.php index 5cf488c45f..71e7ca4a8d 100644 --- a/libraries/classes/Display/Results.php +++ b/libraries/classes/Display/Results.php @@ -933,6 +933,11 @@ class Results false ); + // If the number of rows is unknown, stop here (don't add the End button) + if ($this->properties['unlim_num_rows'] === false) { + return $buttonsHtml; + } + $inputForRealEnd = ''; // prepare some options for the End button if ($isInnodb && $this->properties['unlim_num_rows'] > $GLOBALS['cfg']['MaxExactCount']) { diff --git a/templates/display/results/table.twig b/templates/display/results/table.twig index d93588616e..980f17e660 100644 --- a/templates/display/results/table.twig +++ b/templates/display/results/table.twig @@ -8,7 +8,7 @@ {{ navigation.page_selector|raw }} {{ navigation.move_forward_buttons|raw }} - {% if navigation.number_total_page > 1 %} + {% if navigation.number_total_page != 1 %} {% endif %}