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

Размер файла: 3.35Kb
  1. @extends('layout')
  2.  
  3. @section('title', $item->title)
  4.  
  5. @section('header')
  6. @if (getUser())
  7. <div class="float-end">
  8. @if (getUser('id') === $item->user->id)
  9. <a class="btn btn-success" href="/items/edit/{{ $item->id }}">{{ __('main.change') }}</a>
  10. @endif
  11.  
  12. @if (isAdmin())
  13. <div class="btn-group">
  14. <button type="button" class="btn btn-light dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  15. <i class="fas fa-wrench"></i>
  16. </button>
  17. <div class="dropdown-menu dropdown-menu-end">
  18. <a class="dropdown-item" href="/admin/items/edit/{{ $item->id }}">{{ __('main.edit') }}</a>
  19. <a class="dropdown-item" href="/admin/items/delete/{{ $item->id }}?token={{ $_SESSION['token'] }}" onclick="return confirm('{{ __('boards.confirm_delete_item') }}')">{{ __('main.delete') }}</a>
  20. </div>
  21. </div>
  22. @endif
  23. </div>
  24. @endif
  25.  
  26. <h1>{{ $item->title }}</h1>
  27. @stop
  28.  
  29. @section('breadcrumb')
  30. <nav>
  31. <ol class="breadcrumb">
  32. <li class="breadcrumb-item"><a href="/"><i class="fas fa-home"></i></a></li>
  33. <li class="breadcrumb-item"><a href="/boards">{{ __('index.boards') }}</a></li>
  34.  
  35. @if ($item->category->parent->id)
  36. <li class="breadcrumb-item"><a href="/boards/{{ $item->category->parent->id }}">{{ $item->category->parent->name }}</a></li>
  37. @endif
  38.  
  39. <li class="breadcrumb-item"><a href="/boards/{{ $item->category->id }}">{{ $item->category->name }}</a></li>
  40. <li class="breadcrumb-item active">{{ $item->title }}</li>
  41. </ol>
  42. </nav>
  43. @stop
  44.  
  45. @section('content')
  46. @if ($item->expires_at <= SITETIME)
  47. <div class="alert alert-danger">{{ __('boards.item_not_active') }}</div>
  48. @endif
  49.  
  50. <div class="row mb-3">
  51. <div class="col-md-12">
  52. @if ($item->files->isNotEmpty())
  53. <div class="row">
  54. <div class="col-md-12">
  55. @include('app/_carousel', ['model' => $item])
  56. </div>
  57. </div>
  58. @endif
  59.  
  60. <div class="row">
  61. <div class="col-md-10">
  62. <div class="section-message mb-3">
  63. {{ bbCode($item->text) }}
  64. </div>
  65. <div>
  66. @if ($item->phone)
  67. <span class="badge rounded-pill bg-primary mb-3">{{ __('boards.phone') }}: {{ $item->phone }}</span><br>
  68. @endif
  69.  
  70. <i class="fa fa-user-circle"></i> {{ $item->user->getProfile() }} / {{ dateFixed($item->updated_at) }}<br>
  71.  
  72. @if ($item->expires_at > SITETIME)
  73. <i class="fas fa-clock"></i> {{ __('boards.expires_in') }} {{ formatTime($item->expires_at - SITETIME) }}
  74. @endif
  75. </div>
  76. </div>
  77.  
  78. <div class="col-md-2">
  79. @if ($item->price)
  80. <button type="button" class="btn btn-info">{{ $item->price }} {{ setting('currency') }}</button>
  81. @endif
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. @stop