From 51704a1f46146e75b2c49b563e93e54c6cac7168 Mon Sep 17 00:00:00 2001 From: Nicolas Domenech Date: Wed, 5 Jul 2023 00:52:04 +0200 Subject: [PATCH] #1209 [Question] add: displays the number of photoOk/photoKo + explanations --- langs/fr_FR/dolismq.lang | 3 +++ view/question/question_card.php | 16 +++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/langs/fr_FR/dolismq.lang b/langs/fr_FR/dolismq.lang index 9a4d18e8..975b1b62 100644 --- a/langs/fr_FR/dolismq.lang +++ b/langs/fr_FR/dolismq.lang @@ -88,6 +88,9 @@ AnswerCreated = La réponse a été créée avec succès AnswerUpdated = La réponse a été mise à jour avec succès AnswerDeleted = La réponse a été supprimée avec succès AnswerMustBeCreated = La question %s doit avoir au moins une réponse pour passer au statut verrouillé +PhotoTooltip = Affiche uniquement la photo favorite + + # # Sheet diff --git a/view/question/question_card.php b/view/question/question_card.php index a0b21309..b1b480dc 100644 --- a/view/question/question_card.php +++ b/view/question/question_card.php @@ -1063,17 +1063,19 @@ if ($object->show_photo > 0) { //Photo OK -- Photo OK print ''; - print $langs->trans("PhotoOk"); - print ''; - print ''; + print $form->textwithpicto($langs->trans('PhotoOk'), $langs->trans('PhotoTooltip')); + $countPhotoOk = dol_dir_list($conf->dolismq->multidir_output[$conf->entity] . '/question/'. $object->ref . '/photo_ok', 'files'); + print ' ' . count($countPhotoOk) . ''; + print ''; print saturne_show_medias_linked('dolismq', $conf->dolismq->multidir_output[$conf->entity] . '/question/'. $object->ref . '/photo_ok', 'small', '', 0, 0, 0, 50, 50, 0, 0, 0, 'question/'. $object->ref . '/photo_ok', $object, 'photo_ok', 0, 0, 0,1); - print ''; + print ''; //Photo KO -- Photo KO print ''; - print $langs->trans("PhotoKo"); - print ''; - print ''; + print $form->textwithpicto($langs->trans('PhotoKo'), $langs->trans('PhotoTooltip')); + $countPhotoKo = dol_dir_list($conf->dolismq->multidir_output[$conf->entity] . '/question/'. $object->ref . '/photo_ko', 'files'); + print ' ' . count($countPhotoKo) . ''; + print ''; print saturne_show_medias_linked('dolismq', $conf->dolismq->multidir_output[$conf->entity] . '/question/'. $object->ref . '/photo_ko', 'small', '', 0, 0, 0, 50, 50, 0, 0, 0, 'question/'. $object->ref . '/photo_ko', $object, 'photo_ko', 0, 0, 0,1); print ''; }