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

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