source: resources/views/dashboard/folders/files.blade.php@ e78295c

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

added version

  • Property mode set to 100644
File size: 8.2 KB
RevLine 
[c6b84df]1@extends('layouts.app')
2
3@section("title", "SaveSpace - Folder")
4
5@section('content')
6
7 <div class="row app-block mb-4">
8 <div class="col-md-3 app-sidebar">
9 <div class="card">
10 <div class="app-sidebar-menu">
11 <div class="list-group list-group-flush">
12 <a href="{{route("dashboard.folders.index")}}" class="list-group-item d-flex align-items-center">
13 <i data-feather="folder" class="width-15 height-15 mr-2"></i>
14 Folders
15 </a>
16 @foreach($folders as $obj)
17 <a href="{{ route("dashboard.folders.files", ["id" => $obj->id]) }}" class="list-group-item d-flex align-items-center">
18 <i data-feather="folder" class="width-15 height-15 mr-2"></i>
19 {{$obj->name}}
20 <span class="small ml-auto">{{$obj->files->count()}}</span>
21 </a>
22 @endforeach
23 </div>
24 </div>
25 </div>
26 </div>
27 <div class="col-md-9 app-content">
28 <div class="app-content-overlay"></div>
29 <div class="app-action">
30 <div class="action-left">
31 <ul class="list-inline">
32 <li class="list-inline-item mb-0">
[0df7a93]33 @if(auth()->user()->hasPermission('download_data'))
[c6b84df]34 <a href="{{ route("dashboard.folders.downloadFolder", ['id' => $folder->id]) }}" class="btn btn-outline-light">
35 Download folder
36 </a>
[0df7a93]37 @endif
[c6b84df]38 </li>
39 </ul>
40 </div>
41 <div class="action-right">
42 <form action="{{ route("dashboard.folders.files", $folder->id) }}" method="get" class="d-flex mr-3">
43 <div class="input-group">
44 <input type="text" name="search" class="form-control" placeholder="Search files"
45 aria-describedby="button-addon1" required>
46 <div class="input-group-append">
47 <button class="btn btn-outline-light searchSubmitBtn" type="submit" value="Search">
48 <i data-feather="search"></i>
49 </button>
50 </div>
51 </div>
52 </form>
53 </div>
54 </div>
55
56 <p>Files</p>
57
58 <div class="row">
59 @forelse($files as $file)
60 <div class="col-xl-3 col-lg-4 col-md-6 col-sm-12">
61 <div class="card app-file-list">
62 <div class="app-file-icon">
63 @if(in_array(explode('.', $file->name)[1], $excelExt))
64 <i class="fa fa-file-excel-o text-success"></i>
65 @else @if(in_array(explode('.', $file->name)[1], $textExt))
66 <i class="fa fa-file-word-o text-info"></i>
67 @else @if(explode('.', $file->name)[1] == 'pdf')
68 <i class="fa fa-file-pdf-o text-danger"></i>
69 @else @if(in_array(explode('.', $file->name)[1], $imageExt))
[ff5b46e]70{{-- <div class="col-xl-1 col-lg-1 col-md-1 col-sm-2">--}}
71{{-- <a href="{{ url('/storage/' . $file->location) }}" class="image-popup-gallery-item">--}}
72{{-- <div class="image-hover">--}}
73{{-- <img src="{{ url('/storage/' . $file->location) }}" class="rounded" width="100" alt="image">--}}
74{{-- </div>--}}
75{{-- </a>--}}
76{{-- </div>--}}
[c6b84df]77 <div class="col-xl-1 col-lg-1 col-md-1 col-sm-2">
[ff5b46e]78 <i class="fa fa-file-image-o text-danger fa-2x"></i>
[c6b84df]79 </div>
80 @else
81 <i class="fa fa-file-text-o text-warning"></i>
82 @endif
83 @endif
84 @endif
85 @endif
86 <div class="dropdown position-absolute top-0 right-0 mr-3">
87 <a href="#" class="btn btn-outline-light btn-sm" data-toggle="dropdown">
88 <i class="fa fa-ellipsis-h"></i>
89 </a>
90 <div class="dropdown-menu dropdown-menu-right">
[0df7a93]91 @if(auth()->user()->hasPermission('download_data'))
[c6b84df]92 <a href="{{ route("dashboard.files.downloadFile", $file->id) }}" class="dropdown-item">
93 Download
94 </a>
[0df7a93]95 @endif
96 @if(auth()->user()->hasPermission('manage_all_files'))
[c6b84df]97 <a href="javascript:void(0)" class="dropdown-item" data-toggle="modal" data-target="#deleteModal_{{$file->id}}">
98 Delete
99 </a>
[0df7a93]100 @endif
[c6b84df]101 </div>
102 </div>
103 </div>
104 <div class="p-2 small">
105 <div>{{$file->name}}</div>
106 <div class="text-muted">{{ $file->getSize($file->location) }} MB</div>
107 </div>
108 </div>
109 </div>
110 <div class="modal fade" id="deleteModal_{{$file->id}}" tabindex="-1" role="dialog" aria-hidden="true">
111 <div class="modal-dialog modal-dialog-centered" role="document">
112 <div class="modal-content">
113 <div class="modal-header">
114 <h5 class="modal-title" id="exampleModalCenterTitle">Delete confirmation</h5>
115 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
116 <i class="ti-close"></i>
117 </button>
118 </div>
119 <div class="modal-body">
120 <form action="{{ route("dashboard.files.deleteFile", $file->id) }}" method="POST">
121 @csrf
122 @method('DELETE')
123 <p>Are you sure you want to delete file {{$file->name}}?</p>
124 <div class="modal-footer">
125 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close
126 </button>
127 <button type="submit" class="btn btn-primary">Save changes</button>
128 </div>
129 </form>
130 </div>
131
132 </div>
133 </div>
134 </div>
135
[4b7e2d3]136 @empty
137 <div class="col-xl-3 col-lg-4 col-md-6 col-sm-12">No items found</div>
138 @endforelse
139
[c6b84df]140 </div>
141
142 @if(!Request::query('search'))
143 {{$files->appends($_GET)->links('layouts.pagination') }}
144 @endif
145
146 </div>
147
148 </div>
149
150@endsection
151
152@yield('script')
153
154
Note: See TracBrowser for help on using the repository browser.