{{-- Kommentarer card of the admin user edit (#2957 slice 12, card #3098). Included by user/editAdmin only. POSTs comment, sticky and user to UserCommentController@store as before; "Fäst överst" PUTs admin/comment/user/pin/{id} and "Ta bort" DELETEs admin/comment/user/{id} after a native dialog (both through js/nuhet/company-settings.js, which drives the same markup on the company page). The delete form used route('admin.comment.user.destroy'), a name that does not exist (the user comment resource has no "as"), so the page failed as soon as a user had a comment; it now uses the controller action, the same URL the route serves. Comment text is user-written: escaped, line breaks kept by CSS. Params: $user, $data (the comments, pinned first). --}}
@csrf
{{ __('user.comment.save_comment') }}
@if ($data->isEmpty())

{{ __('company.nh.commentsEmpty') }}

@else
    @foreach ($data as $comment)
  • sticky == 1 ? '' : ' hidden' }}>{{ __('company.nh.commentPinned') }} {{ __('company.nh.commentBy', ['date' => \App\Support\DisplayDate::timestamp($comment->created_at), 'name' => optional($comment->author)->first_name]) }}

    {{ $comment->content }}

    @csrf @method('DELETE')
  • @endforeach
@endif

{{ __('company.nh.commentDeleteTitle') }}

{{ __('company.nh.commentDeleteText') }}