Skip to content

Commit

Permalink
Evarisk#1209 [Question] add: displays the number of photoOk/photoKo +…
Browse files Browse the repository at this point in the history
… explanations
  • Loading branch information
nicolas-eoxia committed Jul 4, 2023
1 parent ac7c3bd commit 51704a1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
3 changes: 3 additions & 0 deletions langs/fr_FR/dolismq.lang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 9 additions & 7 deletions view/question/question_card.php
Original file line number Diff line number Diff line change
Expand Up @@ -1063,17 +1063,19 @@
if ($object->show_photo > 0) {
//Photo OK -- Photo OK
print '<tr><td class="titlefield">';
print $langs->trans("PhotoOk");
print '</td>';
print '<td>';
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 ' <span class="badge badge-info">' . count($countPhotoOk) . '</span>';
print '</td><td>';
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 '</td></tr>';
print '</td></tr>';

//Photo KO -- Photo KO
print '<tr><td class="titlefield">';
print $langs->trans("PhotoKo");
print '</td>';
print '<td>';
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 ' <span class="badge badge-info">' . count($countPhotoKo) . '</span>';
print '</td><td>';
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 '</td></tr>';
}
Expand Down

0 comments on commit 51704a1

Please sign in to comment.