diff --git a/resources/views/bo/pages/tickets/show.blade.php b/resources/views/bo/pages/tickets/show.blade.php index 99618a6..a54c92c 100644 --- a/resources/views/bo/pages/tickets/show.blade.php +++ b/resources/views/bo/pages/tickets/show.blade.php @@ -5,253 +5,167 @@ @section('bodyClass', 'content ticketsShow') @section('content') -
-

- - {{ $ticket->full_name }} - @if ($ticket->is_internal)@endif - {{ $ticket->type->label() }} -

-
- @can('suscribeToTicket', $ticket) -
- @csrf -
- - -
- @push('scripts') - - @endpush -
- @endcan - @can('assignTo', $ticket) -
- @csrf -
- - - @push('scripts') - - @endpush -
-
- @endcan - @can('changeStatus', $ticket) -
- @csrf -
- - - @push('scripts') - - @endpush -
-
- @endcan - @if ($ticket->status->equals(\App\Enums\Tickets\TicketStatusEnum::archived)) - @can('reopen', $ticket) -
- @csrf - -
- @endcan - @endif -
+
+

+ + {{ $ticket->full_name }} + @if ($ticket->is_internal)@endif + {{ $ticket->type->label() }} +

+
+ @can('suscribeToTicket', $ticket) +
+ @csrf +
+ + +
+ @push('scripts') + + @endpush +
+ @endcan + @can('assignTo', $ticket) +
+ @csrf +
+ + + @push('scripts') + + @endpush +
+
+ @endcan + @can('changeStatus', $ticket) +
+ @csrf +
+ + + @push('scripts') + + @endpush +
+
+ @endcan + @if($ticket->status->equals(\App\Enums\Tickets\TicketStatusEnum::archived)) + @can('reopen', $ticket) +
+ @csrf + +
+ @endcan + @endif
- @can('assignLabels', App\Models\Ticket::class) -
-

- {{ $ticket->title }} -

-
- @foreach ($ticket->labels as $label) - {{ $label->name }} - @endforeach +
+@can('assignLabels', App\Models\Ticket::class) +
+
+ @foreach ($ticket->labels as $label) + {{ $label->name }} + @endforeach +
+
+@endcan +
+@if($ticket->estimation) +@include('estimations.pendingCard', ['ticket' => $ticket, 'estimation' => $ticket->estimation]) +
+@endif +
+

+ {{ __('Suivi') }} + @can('createMessage', $ticket) + + - @endcan -
- @if ($ticket->estimation) - @include('estimations.pendingCard', ['ticket' => $ticket, 'estimation' => $ticket->estimation]) -
- @endif -
-

- {{ __('Suivi') }} - @can('createMessage', $ticket) - - - @endcan - @can('estimate', $ticket) - {{ __('Estimation') }} - @endcan -

- @foreach ($messages as $message) - @if ($message->type->equals(\App\Enums\MessageTypeEnum::public) || Auth::user()->can('createPrivateMessage', $ticket)) - @if ($message->user_id === null) -
- {!! nl2br(clean($message->message)) !!} - Le - {{ \Carbon\Carbon::parse($message->created_at)->format('d/m/Y à H:i') }} - ({{ __('Message système') }}) -
- @else -
- @if ($message->type->equals(\App\Enums\MessageTypeEnum::private)) -    - @endif - {!! \App\Lib\Helpers\ToolboxHelper::plainToHtml($message->message) !!} - @if ($message->file !== null) -
file)) data-fslightbox="gallery" @endif - target="_blank">Ouvrir la pièce jointe
- @endif -

- - {!! __('Créé le :date par :userName', [ - 'date' => \Carbon\Carbon::parse($message->created_at)->format('d/m/Y à H:i'), - 'userName' => $message->user ? $message->user->name : __('Utilisateur supprimé'), - ]) !!} - - @if ($message->user_id === Auth::user()->id) - @can('updateMessage', $ticket, $message) - - - @endcan - @endif -
- @endif - @endif - @endforeach -
-
-
-

{{ __('Description') }}

-

{!! clean(\App\Lib\Helpers\ToolboxHelper::plainToHtml($ticket->text)) !!}

- {!! __('Créé le :date par :userName', [ - 'date' => \Carbon\Carbon::parse($ticket->created_at)->format('d/m/Y à H:i'), - 'userName' => $ticket->user ? $ticket->user->name : __('Utilisateur supprimé'), - ]) !!} + @endcan + @can('estimate', $ticket) + {{ __('Estimation') }} + @endcan +

+ @foreach ($messages as $message) + @if ( + $message->type->equals(\App\Enums\MessageTypeEnum::public) || + (Auth::user()->can('createPrivateMessage', $ticket)) + ) + @if ($message->user_id === null) +
+ {!! nl2br(clean($message->message)) !!} - Le {{ \Carbon\Carbon::parse($message->created_at)->format('d/m/Y à H:i')}} + ({{ __('Message système') }})
@else
@@ -306,21 +220,56 @@
- @endif - @can('createGitlabIssue', $ticket) -
- @csrf - -
- @else - @can('isAdmin') - @if (!\is_null($ticket->gitlab_issue)) -
-

- {{ __("Lien vers l'issue Gitlab : ") }} - {{ __('Ouvrir') }} -

- @endif @endcan - @endcan - @endsection + @endif +
+ @endif + @endif + @endforeach +
+
+
+

{{__('Description') }}

+

{!! clean(\App\Lib\Helpers\ToolboxHelper::plainToHtml($ticket->text)) !!}

+ {!! __('Créé le :date par :userName', [ + 'date' => \Carbon\Carbon::parse($ticket->created_at)->format('d/m/Y à H:i'), + 'userName' => $ticket->user ? $ticket->user->name : __('Utilisateur supprimé') + ]) !!} +
+@if (!is_null($ticket->file) or !is_null($ticket->file2)) +
+
+

{{ __('Pièces jointes') }}

+ +
+@endif +@can('createGitlabIssue', $ticket) +
+ @csrf + +
+@else + @can('isAdmin') + @if (!\is_null($ticket->gitlab_issue)) +
+

+ {{ __("Lien vers l'issue Gitlab : ")}} + {{ __("Ouvrir") }} +

+ @endif + @endcan +@endcan +@endsection