Просмотр файла resources/views/blogs/active_comments.blade.php

Размер файла: 2.17Kb
  1. @extends('layout')
  2.  
  3. @section('title', __('index.blogs') . ' - ' . __('blogs.comments_list', ['user' => $user->getName()]) . ' (' . __('main.page_num', ['page' => $comments->currentPage()]) . ')')
  4.  
  5. @section('header')
  6. <h1> {{ __('blogs.comments_list', ['user' => $user->getName()]) }}</h1>
  7. @stop
  8.  
  9. @section('breadcrumb')
  10. <nav>
  11. <ol class="breadcrumb">
  12. <li class="breadcrumb-item"><a href="/"><i class="fas fa-home"></i></a></li>
  13. <li class="breadcrumb-item"><a href="/blogs">{{ __('index.blogs') }}</a></li>
  14. <li class="breadcrumb-item active">{{ __('blogs.comments_list', ['user' => $user->getName()]) }}</li>
  15. </ol>
  16. </nav>
  17. @stop
  18.  
  19. @section('content')
  20. @if ($comments->isNotEmpty())
  21. @foreach ($comments as $comment)
  22. <div class="section mb-3 shadow">
  23. <div class="section-title">
  24. <i class="fa fa-comment"></i>
  25. <a href="/articles/comment/{{ $comment->relate_id}}/{{ $comment->id}}">{{ $comment->title }}</a> ({{ $comment->count_comments }})
  26.  
  27. <div class="float-end">
  28. @if (isAdmin())
  29. <a href="#" onclick="return deleteComment(this)" data-rid="{{ $comment->relate_id }}" data-id="{{ $comment->id }}" data-type="{{ $comment->relate->getMorphClass() }}" data-token="{{ $_SESSION['token'] }}" data-bs-toggle="tooltip" title="{{ __('main.delete') }}"><i class="fa fa-times text-muted"></i></a>
  30. @endif
  31. </div>
  32. </div>
  33.  
  34. <div class="section-content">
  35. {{ bbCode($comment->text) }}<br>
  36.  
  37. {{ __('main.posted') }}: {{ $comment->user->getProfile() }} <small>({{ dateFixed($comment->created_at) }})</small><br>
  38. @if (isAdmin())
  39. <div class="small text-muted fst-italic mt-2">
  40. {{ $comment->brow }}, {{ $comment->ip }}
  41. </div>
  42. @endif
  43. </div>
  44. </div>
  45. @endforeach
  46. @else
  47. {{ showError(__('main.empty_comments')) }}
  48. @endif
  49.  
  50. {{ $comments->links() }}
  51. @stop