From 723923252880cd50709098f957866674da652dbf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 2 Aug 2020 16:28:59 +0200 Subject: [PATCH] Add total --- htdocs/website/index.php | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index f5b32369d88..539e7533af6 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -3839,6 +3839,8 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $c = new Categorie($db); + $totalnbwords = 0; + foreach ($listofpages['list'] as $answerrecord) { if (get_class($answerrecord) == 'WebsitePage') @@ -3899,6 +3901,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = $nbofwords = str_word_count($textwithouthtml, 0, $characterMap); if ($nbofwords) { print $nbofwords.' '.$langs->trans("words"); + $totalnbwords += $nbofwords; } print ''; @@ -3979,6 +3982,15 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print ''; print ''; + // Categories - Tags + print ''; + print ''; + + // Nb of words + print ''; + print ''; + + // Edit properties, HTML sources, status print ''; print ''; @@ -3989,6 +4001,44 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print ''; } } + + if (count($listofpages['list']) >= 2) { + // Total + print ''; + + // Type of container + print ''; + print $langs->trans("Total"); + print ''; + + // Container url and label + print ''; + print ''; + + // Language + print ''; + print ''; + + // Categories - Tags + print ''; + print ''; + + // Nb of words + print ''; + print $totalnbwords.' '.$langs->trans("words"); + print ''; + + // Edit properties, HTML sources, status + print ''; + print ''; + + // Action column + print ''; + print ''; + + print ''; + } + print ''; print ''; print '
';