source: resources/views/dashboard/users/index.blade.php@ 6b95845

develop
Last change on this file since 6b95845 was ea7b12a, checked in by beratkjufliju <kufliju@…>, 3 years ago

added files crud in table

  • Property mode set to 100644
File size: 5.9 KB
Line 
1@extends('layouts.app')
2
3@section("title", "SaveSpace - Users")
4
5@section('pageTitle', 'Users')
6
7@section('head')
8 <!-- Datatable -->
9 <link rel="stylesheet" href="{{ url('vendors/dataTable/dataTables.min.css') }}" type="text/css">
10
11@endsection
12
13@section('content')
14
15 <div class="page-header justify-content-between">
16 <nav aria-label="breadcrumb" class="d-flex align-items-start">
17 <ol class="breadcrumb">
18 <li class="breadcrumb-item">
19 <a href="{{ url('dashboard.users') }}">Users</a>
20 </li>
21 <li class="breadcrumb-item active" aria-current="page">User List</li>
22 </ol>
23 </nav>
24 <div class="dropdown">
25 <a href="{{ route("dashboard.users.create") }}" class="btn btn-primary text-white">
26 Add user
27 </a>
28 </div>
29 </div>
30
31 <div class="row">
32 <div class="col-md-12">
33 <div class="card">
34 <div class="card-body">
35 <div class="table-responsive">
36 <table id="user-list" class="table table-lg">
37 <thead>
38 <tr>
39 <th></th>
40 <th>State</th>
41 <th>Username</th>
42 <th>Name</th>
43 <th>Email</th>
44 <th>Phone Number</th>
45 <th>Created by</th>
46 <th>Created at</th>
47 <th>Updated at</th>
48 <th>Role</th>
49 <th>Status</th>
50 <th>Last seen</th>
51 <th>Actions</th>
52 </tr>
53 </thead>
54 <tbody>
55 @foreach($users as $user)
56 <tr>
57 <td></td>
58 <td>
59 @if($user->is_confirmed)
60 @if ($user->is_active)
61 <span class="badge bg-success-bright text-success">Active</span>
62 @else
63 <span class="badge bg-danger-bright text-danger">Blocked</span>
64 @endif
65 @else
66 <span class="badge bg-warning-bright text-warning">New user</span>
67 @endif
68 </td>
69 <td>
70 @include('dashboard.partials.avatar')
71 {{$user->username}}
72 </td>
73 <td>{{$user->name .' '. $user->surname}}</td>
74 <td>{{$user->email}}</td>
75 <td>{{$user->phone_number}}</td>
76 <td>{{ $user->getCreatedByName() }}</td>
77 <td>{{ date('d.m.Y - H:i', strtotime($user->created_at)) }}</td>
78 @if($user->updated_at==NULL)
79 <td>/</td>
80 @else
81 <td>{{ date('d.m.Y - H:i', strtotime($user->updated_at)) }}</td>
82 @endif
83 <td>{{ $user->role->name }}</td>
84 <td>
85 @if(Cache::has('is_online' . $user->id))
86 <span class="text-success">Online</span>
87 @else
88 <span class="text-secondary">Offline</span>
89 @endif
90 </td>
91 @if($user->last_seen==NULL)
92 <td>Never logged in</td>
93 @else
94 <td>{{ \Carbon\Carbon::parse($user->last_seen)->diffForHumans() }}</td>
95 @endif
96 @if($user->hasRole("Referent") && $user->is_confirmed)
97 <td>
98 <a href="{{ route("dashboard.users.edit", ["id" => $user->id]) }}" class="text-secondary" data-toggle="tooltip" title="Edit">
99 <i class="ti-pencil"></i>
100 </a>
101 <a href="javascript:void(0)" class="text-danger ml-2" data-action="{{ route("dashboard.users.destroy", ["id" => $user->id]) }}" data-method="delete" title="Delete">
102 <i class="ti-trash"></i>
103 </a>
104 </td>
105 @else
106 <td>Not available</td>
107 @endif
108 </tr>
109 @endforeach
110
111
112 </tbody>
113 </table>
114 </div>
115 </div>
116 </div>
117 </div>
118 </div>
119
120@endsection
121
122@section('script')
123 <script src="{{ url('assets/js/examples/pages/user-list.js') }}"></script>
124 <!-- Datatable -->
125 <script src="{{ url('vendors/dataTable/dataTables.min.js') }}"></script>
126@endsection
Note: See TracBrowser for help on using the repository browser.