Просмотр файла resources/views/admin/photos/index.blade.php

Размер файла: 2.79Kb
  1. @extends('layout')
  2.  
  3. @section('title', __('index.photos'))
  4.  
  5. @section('header')
  6. <div class="float-right">
  7. <a class="btn btn-success" href="/photos/create">{{ __('main.add') }}</a>
  8. <a class="btn btn-light" href="/photos?page={{ $photos->currentPage() }}"><i class="fas fa-wrench"></i></a>
  9. </div>
  10.  
  11. <h1>{{ __('index.photos') }}</h1>
  12. @stop
  13.  
  14. @section('breadcrumb')
  15. <nav>
  16. <ol class="breadcrumb">
  17. <li class="breadcrumb-item"><a href="/"><i class="fas fa-home"></i></a></li>
  18. <li class="breadcrumb-item"><a href="/admin">{{ __('index.panel') }}</a></li>
  19. <li class="breadcrumb-item active">{{ __('index.photos') }}</li>
  20. </ol>
  21. </nav>
  22. @stop
  23.  
  24. @section('content')
  25. @if ($photos->isNotEmpty())
  26. @csrf
  27. @foreach ($photos as $photo)
  28. <div class="section mb-3 shadow">
  29. <div class="section-header d-flex align-items-center">
  30. <div class="flex-grow-1">
  31. <div class="section-title">
  32. <i class="fa fa-image"></i>
  33. <a href="/photos/{{ $photo->id }}">{{ $photo->title }}</a>
  34. </div>
  35. </div>
  36.  
  37. <div class="text-right">
  38. <a href="/admin/photos/edit/{{ $photo->id }}?page={{ $photos->currentPage() }}" data-toggle="tooltip" title="{{ __('main.edit') }}"><i class="fas fa-pencil-alt text-muted"></i></a>
  39. <a href="/admin/photos/delete/{{ $photo->id }}?page={{ $photos->currentPage() }}&amp;token={{ $_SESSION['token'] }}" onclick="return confirm('{{ __('photos.confirm_delete_photo') }}')" data-toggle="tooltip" title="{{ __('main.delete') }}"><i class="fas fa-times text-muted"></i></a>
  40. </div>
  41. </div>
  42.  
  43. <div class="section-content">
  44. @include('app/_carousel', ['model' => $photo, 'path' => '/photos'])
  45.  
  46. @if ($photo->text)
  47. {!! bbCode($photo->text) !!}<br>
  48. @endif
  49.  
  50. {{ __('main.added') }}: {!! $photo->user->getProfile() !!} ({{ dateFixed($photo->created_at) }})<br>
  51. <a href="/photos/comments/{{ $photo->id }}">{{ __('main.comments') }}</a> ({{ $photo->count_comments }})
  52. <a href="/photos/end/{{ $photo->id }}">&raquo;</a>
  53. </div>
  54. </div>
  55. @endforeach
  56.  
  57. {{ $photos->links() }}
  58.  
  59. {{ __('photos.total_photos') }}: <b>{{ $photos->total() }}</b><br>
  60.  
  61. @if (isAdmin('boss'))
  62. <i class="fa fa-sync"></i> <a href="/admin/photos/restatement?token={{ $_SESSION['token'] }}">{{ __('main.recount') }}</a><br>
  63. @endif
  64. @else
  65. {!! showError(__('photos.empty_photos')) !!}
  66. @endif
  67. @stop