@@ -29,6 +29,15 @@ $this->addBreadcrumb('Voir un ticket'); | |||
<td><strong>Statut</strong></td> | |||
<td><?= $ticketManager->getTicketStatusLabelAsHtml($ticket); ?></td> | |||
</tr> | |||
<?php if($userManager->isCurrentAdmin()): ?> | |||
<tr> | |||
<td><strong>Producteur</strong></td> | |||
<td><?= $ticketManager->isTicketUnread($ticket, $ticket->user) ? | |||
'<span class="label label-warning">Non lu</span>' : | |||
'<span class="label label-success">Lu</span>'; ?> | |||
</td> | |||
</tr> | |||
<?php endif; ?> | |||
</tbody> | |||
</table> | |||
</div> |
@@ -71,7 +71,7 @@ class TicketSolver extends AbstractSolver | |||
return false; | |||
} | |||
public function isTicketUnread(Ticket $ticket, User $user): int | |||
public function isTicketUnread(Ticket $ticket, User $user): bool | |||
{ | |||
$ticketUser = $this->getTicketUser($ticket, $user); | |||