diff --git a/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php b/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php index 3285b9d1f2..792fee26a0 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php @@ -499,6 +499,7 @@ class QueryController extends Controller 'records' => $record->get_train(), 'index' => $index, 'selected' => $pos, + 'recordsTotal' => $record->getTotal() ]) ]); } diff --git a/lib/classes/record/preview.php b/lib/classes/record/preview.php index 7177d49ca8..55c716c439 100644 --- a/lib/classes/record/preview.php +++ b/lib/classes/record/preview.php @@ -552,6 +552,14 @@ class record_preview extends record_adapter return $this->statistics; } + /** + * @return int + */ + public function getTotal() + { + return isset($this->total) ? $this->total : 0; + } + /** * @return media_adapter */ diff --git a/templates/web/prod/preview/result_train.html.twig b/templates/web/prod/preview/result_train.html.twig index d9025603f8..77844aeb1e 100644 --- a/templates/web/prod/preview/result_train.html.twig +++ b/templates/web/prod/preview/result_train.html.twig @@ -1,4 +1,4 @@ -