index.blade.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. @component('panel.layouts.component', ['title' => 'دسته بندی '])
  2. @slot('style')
  3. @endslot
  4. @slot('subject')
  5. <h1><i class="fa fa-users"></i> دسته بندی </h1>
  6. <p>لیست دسته بندی های تعریف شده برای مدیریت سطوح دسترسی.</p>
  7. @endslot
  8. @slot('breadcrumb')
  9. <li class="breadcrumb-item">دسته بندی </li>
  10. @endslot
  11. @slot('content')
  12. <div class="row">
  13. <div class="col-md-12">
  14. @component('components.collapse-card' , ['title' => 'دسته بندی '])
  15. @slot('body')
  16. @component('components.collapse-search')
  17. @slot('form')
  18. <form class="clearfix">
  19. <div class="form-group">
  20. <label for="text-name-input">نام دسته بندی</label>
  21. <input type="text" class="form-control" id="text-name-input"
  22. placeholder="نام دسته">
  23. </div>
  24. <button type="submit" class="btn btn-primary float-left">جستجو</button>
  25. </form>
  26. @endslot
  27. @endcomponent
  28. <div class="mt-4">
  29. <a href="{{ route('categories.create') }}" type="button" class="btn btn-primary"><i
  30. class="fa fa-plus"></i> ایجاد دسته بندی</a>
  31. </div>
  32. @component('components.table')
  33. @slot('thead')
  34. <tr>
  35. <th>شماره بندی</th>
  36. <th>نام دسته بندی</th>
  37. <th>slug</th>
  38. <th>نوع دسته بندی</th>
  39. <th> parent</th>
  40. <th>توضیحات دسته بندی</th>
  41. <th> اضافه کننده دسته بندی</th>
  42. <th> مدیریت</th>
  43. </tr>
  44. @endslot
  45. @slot('tbody')
  46. @forelse ($categories as $category)
  47. <tr>
  48. <td>
  49. {{$category->id}}
  50. </td>
  51. <td>
  52. {{$category->title}}
  53. </td>
  54. <td>
  55. {{$category->slug}}
  56. </td>
  57. <td>
  58. {{$category->category_type}}
  59. </td>
  60. <td>
  61. {{$category->parent}}
  62. </td>
  63. <td><?php echo mb_substr(strip_tags($category->discription), 0, 15, 'UTF8') . '...'?></td>
  64. <td>
  65. {{$category->user->name}}
  66. </td>
  67. <td class="d-flex">
  68. <a href="{{route('categories.edit', $category->id)}}"
  69. class="btn btn-sm btn-primary mr-2">ویرایش</a>
  70. <form
  71. action="{{route('categories.destroy', $category->id)}}"
  72. method="POST"
  73. onsubmit="return confirm('آیا مطمئن هستید؟');"
  74. >
  75. @csrf
  76. @method('DELETE')
  77. <button type="submit" class="btn btn-sm btn-danger">حذف</button>
  78. </form>
  79. </td>
  80. </tr>
  81. @empty
  82. <tr>
  83. <td colspan="5" class="text-center">موردی برای نمایش وجود ندارد.</td>
  84. </tr>
  85. @endforelse
  86. @endslot
  87. @endcomponent
  88. {{--Paginate section--}}
  89. {{ $categories->withQueryString()->links() }}
  90. @endslot
  91. @endcomponent
  92. </div>
  93. </div>
  94. @endslot
  95. @slot('script')
  96. @endslot
  97. @endcomponent