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

Размер файла: 2.33Kb
  1. @extends('layout')
  2.  
  3. @section('title', __('loads.top_downs') . ' (' . __('main.page_num', ['page' => $downs->currentPage()]) . ')')
  4.  
  5. @section('header')
  6. <h1>{{ __('loads.top_downs') }}</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="/loads">{{ __('index.loads') }}</a></li>
  14. <li class="breadcrumb-item active">{{ __('loads.top_downs') }}</li>
  15. </ol>
  16. </nav>
  17. @stop
  18.  
  19. @section('content')
  20. {{ __('main.sort') }}:
  21. <?php $active = ($order === 'loads') ? 'success' : 'light text-dark'; ?>
  22. <a href="/loads/top?sort=loads" class="badge bg-{{ $active }}">{{ __('main.downloads') }}</a>
  23.  
  24. <?php $active = ($order === 'rating') ? 'success' : 'light text-dark'; ?>
  25. <a href="/loads/top?sort=rating" class="badge bg-{{ $active }}">{{ __('main.rating') }}</a>
  26.  
  27. <?php $active = ($order === 'count_comments') ? 'success' : 'light text-dark'; ?>
  28. <a href="/loads/top?sort=comments" class="badge bg-{{ $active }}">{{ __('main.comments') }}</a>
  29. <hr>
  30.  
  31. @if ($downs->isNotEmpty())
  32. @foreach ($downs as $data)
  33. <div class="section mb-3 shadow">
  34. <div class="section-header d-flex align-items-center">
  35. <div class="flex-grow-1">
  36. <div class="section-title">
  37. <i class="fa fa-file"></i>
  38. <a href="/downs/{{ $data->id }}">{{ $data->title }}</a>
  39. </div>
  40. </div>
  41.  
  42. <div class="text-end js-rating">
  43. <b>{{ formatNum($data->rating) }}</b>
  44. </div>
  45. </div>
  46.  
  47. <div class="section-content">
  48. {{ __('loads.load') }}: <a href="/loads/{{ $data->category->id }}">{{ $data->category->name }}</a><br>
  49. {{ __('main.downloads') }}: {{ $data->loads }}<br>
  50. <a href="/downs/comments/{{ $data->id }}">{{ __('main.comments') }}</a> ({{ $data->count_comments }})
  51. <a href="/downs/end/{{ $data->id }}">&raquo;</a>
  52. </div>
  53. </div>
  54. @endforeach
  55. @else
  56. {{ showError(__('loads.empty_downs')) }}
  57. @endif
  58.  
  59. {{ $downs->links() }}
  60. @stop