Handle no ticket case
This commit is contained in:
parent
55ff49fd42
commit
06ceaf0753
1 changed files with 12 additions and 9 deletions
|
|
@ -68,17 +68,20 @@
|
|||
@include('modules.sorter', ['colname' => 'status'])
|
||||
</th>
|
||||
<th scope="col">{{__('Contenu') }}</th>
|
||||
@if (Auth::user()->role->equals(Role::admin()))
|
||||
<th>{{__('Actions') }}</th>
|
||||
@endif
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(!count($tickets))
|
||||
<tr>
|
||||
<td colspan="10" class="text-center"><h2>{{ __('Aucun ticket') }}</h2></td>
|
||||
</tr>
|
||||
@endif
|
||||
@foreach ($tickets as $ticket)
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<td scope="row">
|
||||
{{ $ticket->id }}
|
||||
</th>
|
||||
</td>
|
||||
<td>{{ $ticket->project->name }}</td>
|
||||
<td>
|
||||
@if ($ticket->type->equals(TicketType::bug()))
|
||||
|
|
@ -113,7 +116,7 @@
|
|||
{{-- Modal du ticket --}}
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary" data-bs-toggle="modal" data-bs-target="#ticket{{ $ticket->id }}Modal">
|
||||
Aperçu
|
||||
{{ __('Aperçu') }}
|
||||
</button>
|
||||
|
||||
<!-- Modal -->
|
||||
|
|
@ -130,23 +133,23 @@
|
|||
<p>{!! nl2br(e($ticket->text)) !!}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-dismiss="modal">Fermer</button>
|
||||
<button type="button" class="btn btn-sm btn-primary" data-dismiss="modal">{{ __('Fermer') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('ticket.show', $ticket->id) }}" class="btn btn-sm btn-outline-secondary">{{ __('Messages') }}</a>
|
||||
<a href="{{ route('ticket.show', $ticket->id) }}" class="btn btn-sm btn-outline-success">{{ __('Messages') }}</a>
|
||||
@can('update', $ticket)
|
||||
<a href="{{ route('ticket.edit', $ticket) }}" class="btn btn-sm btn-outline-primary">Modifier</a>
|
||||
<a href="{{ route('ticket.edit', $ticket) }}" class="btn btn-sm btn-outline-primary">{{ __('Modifier') }}</a>
|
||||
@endcan
|
||||
@can('delete', $ticket)
|
||||
@if(!$ticket->status->equals(TicketStatus::archived()))
|
||||
<form method="POST" action="{{ route('ticket.archive', $ticket) }}">
|
||||
@method('PUT')
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger" onclick="return confirm('Êtes-vous sûr(e) ?')">Archiver</button>
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger" onclick="return confirm('Êtes-vous sûr(e) ?')">{{ __('Archiver') }}</button>
|
||||
</form>
|
||||
@endif
|
||||
@endcan
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue