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

Размер файла: 2.91Kb
  1. @extends('layout')
  2.  
  3. @section('title', __('index.votes'))
  4.  
  5. @section('header')
  6. @if (getUser())
  7. <div class="float-end">
  8. <a class="btn btn-success" href="/votes/create">{{ __('main.create') }}</a>
  9. <a class="btn btn-light" href="/votes?page={{ $votes->currentPage() }}"><i class="fas fa-wrench"></i></a>
  10. </div>
  11. @endif
  12.  
  13. <h1>{{ __('index.votes') }}</h1>
  14. @stop
  15.  
  16. @section('breadcrumb')
  17. <nav>
  18. <ol class="breadcrumb">
  19. <li class="breadcrumb-item"><a href="/"><i class="fas fa-home"></i></a></li>
  20. <li class="breadcrumb-item"><a href="/admin">{{ __('index.panel') }}</a></li>
  21. <li class="breadcrumb-item active">{{ __('index.votes') }}</li>
  22. </ol>
  23. </nav>
  24. @stop
  25.  
  26. @section('content')
  27. @if ($votes->isNotEmpty())
  28. @foreach ($votes as $vote)
  29. <div class="section mb-3 shadow">
  30. <div class="section-title">
  31. <i class="fa fa-chart-bar"></i>
  32. <a href="/votes/{{ $vote['id'] }}">{{ $vote->title }}</a>
  33.  
  34. <div class="float-end">
  35. <a href="/admin/votes/edit/{{ $vote->id }}" data-bs-toggle="tooltip" title="{{ __('main.edit') }}"><i class="fa fa-pencil-alt text-muted"></i></a>
  36. <a href="/admin/votes/close/{{ $vote->id }}?token={{ $_SESSION['token'] }}" onclick="return confirm('{{ __('votes.confirm_close') }}')" data-bs-toggle="tooltip" title="{{ __('main.close') }}"><i class="fa fa-lock text-muted"></i></a>
  37.  
  38. @if (isAdmin('boss'))
  39. <a href="/admin/votes/delete/{{ $vote->id }}?token={{ $_SESSION['token'] }}" onclick="return confirm('{{ __('votes.confirm_delete') }}')" data-bs-toggle="tooltip" title="{{ __('main.delete') }}"><i class="fa fa-times text-muted"></i></a>
  40. @endif
  41. </div>
  42. </div>
  43.  
  44. @if ($vote->description)
  45. <div class="section-body border-bottom mb-3">
  46. {{ bbCode($vote->description) }}
  47. </div>
  48. @endif
  49.  
  50. <div class="section-body">
  51. @if ($vote->topic->id)
  52. {{ __('forums.topic') }}: <a href="/topics/{{ $vote->topic->id }}">{{ $vote->topic->title }}</a><br>
  53. @endif
  54.  
  55. {{ __('main.created') }}: {{ dateFixed($vote->created_at) }}<br>
  56. {{ __('main.votes') }}: {{ $vote->count }}<br>
  57. </div>
  58. </div>
  59. @endforeach
  60. @else
  61. {{ showError(__('votes.empty_votes')) }}
  62. @endif
  63.  
  64. {{ $votes->links() }}
  65.  
  66. @if (isAdmin('boss'))
  67. <i class="fa fa-sync"></i> <a href="/admin/votes/restatement?token={{ $_SESSION['token'] }}">{{ __('main.recount') }}</a><br>
  68. @endif
  69.  
  70. <i class="fa fa-briefcase"></i> <a href="/admin/votes/history">{{ __('votes.archive_votes') }}</a><br>
  71. @stop