source: resources/views/dashboard/categories/index.blade.php@ 0c07a90

Last change on this file since 0c07a90 was 0924b6c, checked in by Özkan İliyaz <iliyaz_96@…>, 4 years ago

initial commit

  • Property mode set to 100644
File size: 3.6 KB
Line 
1@extends("layouts.dashboard")
2
3@section("title", "Categories - Dashboard | TechnoBlog")
4
5@section("dashboard_content")
6
7 <div class="my-3 my-md-5">
8
9 <div class="container">
10
11 <div class="page-header">
12 <h1 class="page-title">Categories</h1>
13 </div>
14
15 <div class="row">
16
17 <div class="col-sm-12">
18 <div class="card">
19
20 <div class="card-header">
21 <h3 class="card-title pt-2">
22 List of categories
23 <br>
24 <p class="text-muted pt-2" style="font-size: 14px;">Note: If you will delete any category, &nbsp;all posts related to category will be deleted.</p>
25 </h3>
26 <a href="{{ route("dashboard.categories.create") }}" style='margin-left: auto; order: 2;'>
27 <button type="button" class="btn btn-primary">Add New</button>
28 </a>
29 </div>
30
31 <div class="table-responsive pt-5 pb-5">
32
33 <table id="dttable" class="table table-hover table-outline table-vcenter text-nowrap card-table" style="width:100%">
34 <thead>
35 <tr>
36 <th class="text-center">Name</th>
37 <th class="text-center">Color</th>
38 <th class="text-center">Status</th>
39 <th class="text-center">Created Date</th>
40 <th class="text-center">Actions</th>
41 </tr>
42 </thead>
43 <tbody>
44 @foreach ($categories as $category)
45 <tr>
46 <td>{{ $category->name }}</td>
47 <td style="background: {{ $category->color }} ;"></td>
48 <td class="text-center">
49 @if ($category->is_active)
50 Active
51 @else
52 Blocked
53 @endif
54 </td>
55 <td class="text-center">{{ date('d.m.Y', strtotime($category->created_at)) }}</td>
56 <td class="text-center">
57 <div class="item-action dropdown">
58 <a href="javascript:void(0)" data-toggle="dropdown" class="icon" aria-expanded="false"><i class="fe fe-more-vertical"></i></a>
59 <div class="dropdown-menu dropdown-menu-right" x-placement="bottom-end" style="position: absolute; transform: translate3d(15px, 20px, 0px); top: 0px; left: 0px; will-change: transform;">
60
61 <a href="{{ route("blog.category", ["category" => lcfirst($category->name)]) }}" target="_blank" class="dropdown-item"><i class="dropdown-icon fe fe-user"></i> View Posts </a>
62 <a href="{{ route("dashboard.categories.edit", ["id" => $category->id]) }}" class="dropdown-item"><i class="dropdown-icon fe fe-edit"></i> Edit Category </a>
63
64 @if ($category->is_active)
65 <a href="javascript:void(0)" class="actionLink dropdown-item" style="cursor: pointer;" data-action="{{ route("dashboard.categories.block", ["id" => $category->id]) }}" data-method="patch"><i class="dropdown-icon fe fe-lock"></i> Block </a>
66 @else
67 <a href="javascript:void(0)" class="actionLink dropdown-item" style="cursor: pointer;" data-action="{{ route("dashboard.categories.unblock", ["id" => $category->id]) }}" data-method="patch"><i class="dropdown-icon fe fe-unlock"></i> Unblock </a>
68 @endif
69
70 <div class="dropdown-divider"></div>
71 <a href="javascript:void(0)" class="actionLink dropdown-item" style="cursor: pointer;" data-action="{{ route("dashboard.categories.destroy", ["id" => $category->id]) }}" data-method="delete"><i class="dropdown-icon fe fe-trash-2 text-danger"></i> Delete </a>
72
73 </div>
74 </div>
75 </td>
76 </tr>
77 @endforeach
78 </tbody>
79 </table>
80
81 </div>
82
83 </div>
84
85 </div>
86
87 </div>
88
89 </div>
90
91 </div>
92
93@endsection
Note: See TracBrowser for help on using the repository browser.