Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1209 [Question] add: displays the number of photoOk/photoKo + explanations #1310

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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