diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php
index ff44a23319b..4ea9f3ef6f3 100644
--- a/htdocs/comm/action/card.php
+++ b/htdocs/comm/action/card.php
@@ -1662,24 +1662,42 @@ if ($id > 0)
// Reminders
if ($conf->global->AGENDA_REMINDER_EMAIL || $conf->global->AGENDA_REMINDER_BROWSER)
{
- $object->loadReminders();
+ $filtreuserid = $user->id;
+ if ($user->rights->agenda->allactions->read) $filtreuserid = 0;
+ $object->loadReminders('', $filteruserid);
+
+ print '
';
+
+ print '';
+
+ print '| '.$langs->trans("Reminders").' | ';
if (count($object->reminders) > 0) {
- //checkbox create reminder
- print ' ';
-
- print '';
-
- print '| '.$langs->trans("Reminders").' | ';
-
- foreach($object->reminders as $actioncommreminderid => $actioncommreminder) {
- print $TRemindTypes[$actioncommreminder->typeremind].' - '.$actioncommreminder->offsetvalue.' '.$TDurationTypes[$actioncommreminder->offsetunit];
+ if (count($object->reminders) > 0) {
+ $tmpuserstatic = new User($db);
+ foreach($object->reminders as $actioncommreminderid => $actioncommreminder) {
+ print $TRemindTypes[$actioncommreminder->typeremind];
+ if ($actioncommreminder->fk_user > 0) {
+ $tmpuserstatic->fetch($actioncommreminder->fk_user);
+ print ' ('.$tmpuser->getNomUrl(0, '', 0, 0, 16).')';
+ }
+ print ' - '.$actioncommreminder->offsetvalue.' '.$TDurationTypes[$actioncommreminder->offsetunit];
+ if ($actioncommreminder->status == $actioncommreminder::STATUS_TODO) {
+ print ' - ';
+ print $langs->trans("NotSent");
+ print ' ';
+ } elseif ($actioncommreminder->status == $actioncommreminder::STATUS_DONE) {
+ print ' - ';
+ print $langs->trans("Done");
+ print ' ';
+ }
+ }
}
-
- print ' | ';
-
- print ' ';
}
+
+ print ' |
';
+
+ print '
';
}
dol_fiche_end();