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

Размер файла: 2.56Kb
  1. @extends('layout')
  2.  
  3. @section('title', __('boards.categories'))
  4.  
  5. @section('breadcrumb')
  6. <nav>
  7. <ol class="breadcrumb">
  8. <li class="breadcrumb-item"><a href="/"><i class="fas fa-home"></i></a></li>
  9. <li class="breadcrumb-item"><a href="/admin">{{ __('index.panel') }}</a></li>
  10. <li class="breadcrumb-item"><a href="/admin/boards">{{ __('index.boards') }}</a></li>
  11. <li class="breadcrumb-item active">{{ __('boards.categories') }}</li>
  12. </ol>
  13. </nav>
  14. @stop
  15.  
  16. @section('content')
  17. @foreach ($boards as $board)
  18.  
  19. <div class="section mb-3 shadow">
  20. <div class="section-title">
  21. <i class="fa fa-folder-open"></i> <a href="/admin/board/{{ $board->id }}">{{ $board->name }}</a>
  22.  
  23. ({{ $board->count_items }})
  24.  
  25. <div class="float-right">
  26. <a href="/admin/boards/edit/{{ $board->id }}"><i class="fa fa-pencil-alt"></i></a>
  27. <a href="/admin/boards/delete/{{ $board->id }}?token={{ $_SESSION['token'] }}" onclick="return confirm('{{ __('boards.confirm_delete_category') }}')"><i class="fa fa-times"></i></a>
  28. </div>
  29. </div>
  30.  
  31. <div class="section-content">
  32. @if ($board->children->isNotEmpty())
  33. @foreach ($board->children as $child)
  34. <i class="fa fa-angle-right"></i> <b><a href="/admin/boards/{{ $child->id }}">{{ $child->name }}</a></b>
  35.  
  36. ({{ $child->count_items }})
  37.  
  38. <a href="/admin/boards/edit/{{ $child->id }}"><i class="fa fa-pencil-alt"></i></a>
  39. <a href="/admin/boards/delete/{{ $child->id }}?token={{ $_SESSION['token'] }}" onclick="return confirm('{{ __('boards.confirm_delete_category') }}')"><i class="fa fa-times"></i></a>
  40. <br>
  41. @endforeach
  42. @endif
  43. </div>
  44. </div>
  45. @endforeach
  46.  
  47. <div class="section-form mb-3 shadow">
  48. <form action="/admin/boards/create" method="post">
  49. @csrf
  50. <div class="input-group{{ hasError('name') }}">
  51. <input type="text" class="form-control" id="name" name="name" maxlength="50" value="{{ getInput('name') }}" placeholder="{{ __('boards.category') }}" required>
  52. <div class="input-group-append">
  53. <button class="btn btn-primary">{{ __('main.create') }}</button>
  54. </div>
  55. </div>
  56. <div class="invalid-feedback">{{ textError('name') }}</div>
  57. </form>
  58. </div>
  59. @stop