Changeset e78295c for resources/views/dashboard/folders/index.blade.php
- Timestamp:
- 10/31/21 21:28:46 (3 years ago)
- Branches:
- master
- Children:
- 4521f25
- Parents:
- a55bb54
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
resources/views/dashboard/folders/index.blade.php
ra55bb54 re78295c 31 31 <i data-feather="upload-cloud" class="width-15 height-15 mr-2"></i> 32 32 Recents 33 </a>34 <a href="{{ URL::current()."?sort=important" }}" class="list-group-item d-flex align-items-center">35 <i data-feather="star" class="width-15 height-15 mr-2"></i>36 Important37 <span class="small ml-auto">{{ $countImportant }}</span>38 33 </a> 39 34 </div> … … 133 128 <div class="card"> 134 129 <div class="card-body"> 135 <i class="fa fa-folder fa-2x pr-2" aria-hidden="true"> 136 </i><span class="card-title" style="font-size: 1.5rem;">{{$folder->name}}</span> 137 @if($folder->is_important) 138 <i class="fa fa-star" style="color:orange;"></i> 139 @endif 130 <i class="fa fa-folder fa-2x pr-2" aria-hidden="true"></i> 131 <span class="card-title" style="font-size: 1.5rem;">{{$folder->name}}</span> 132 140 133 <div class="d-flex align-items-center"> 141 134 <div class="dropdown ml-auto"> … … 144 137 </a> 145 138 <div class="dropdown-menu dropdown-menu-right"> 146 <a href="{{ route("dashboard.folders.files", ["id" => $folder->id]) }}" class="dropdown-item">View Files</a> 147 @if(auth()->user()->hasPermission('manage_all_folders')) 148 <a href="javascript:void(0)" class="dropdown-item" data-toggle="modal" data-target="#editModal_{{$folder->id}}">Edit</a> 149 @endif 139 <a href="{{ route("dashboard.folders.files", ["id" => $folder->id]) }}" class="dropdown-item">View files</a> 150 140 @if(auth()->user()->hasPermission('download_data')) 151 141 <a href="{{ route("dashboard.folders.downloadFolder", ['id' => $folder->id]) }}" class="dropdown-item">Download</a> 152 142 @endif 153 143 @if(auth()->user()->hasPermission('manage_all_folders')) 154 <button class="dropdown-item action-dropdown-item"155 href="javascript:void(0)" onclick="toggleImportant({{$folder->id}})">156 @if($folder->is_important)157 Mark as not important158 @else159 Mark as important160 @endif161 </button>162 @endif163 @if(auth()->user()->hasPermission('manage_all_folders'))164 144 <a href="javascript:void(0)" class="dropdown-item" data-toggle="modal" data-target="#deleteModal_{{$folder->id}}">Delete</a> 165 145 @endif … … 168 148 </div> 169 149 <div class="text-muted small mt-1 mb-3">Number of files: {{$folder->files->count()}}</div> 170 <p class="badge bg-success-bright text-success">{{$folder->arch_id}}</p> 150 <p class="badge bg-success-bright text-success">Version: {{$folder->version}}</p> 151 <p>Archive ID: {{$folder->arch_id}}</p> 171 152 <p>Note: {{$folder->note}}</p> 172 153 <div class="row"> … … 179 160 <div class="card-footer"> 180 161 <small class="text-muted">Last updated: {{ date('d.m.Y H:i', strtotime($folder->updated_at)) }}</small> 181 </div> 182 </div> 183 </div> 184 185 <form id="toggleImportant_{{ $folder->id }}" 186 action="{{ route("dashboard.folders.toggleImportant", ["id" => $folder->id]) }}" 187 method="post"> 188 @csrf 189 @method("patch") 190 </form> 191 192 <div class="modal fade" id="editModal_{{$folder->id}}" tabindex="-1" role="dialog" aria-hidden="true"> 193 <div class="modal-dialog modal-dialog-centered modal-lg" role="document"> 194 <div class="modal-content"> 195 <div class="modal-header"> 196 <h5 class="modal-title" id="exampleModalCenterTitle">Edit folder</h5> 197 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 198 <i class="ti-close"></i> 199 </button> 200 </div> 201 <div class="modal-body"> 202 <form action="{{ route("dashboard.folders.edit", ["id" => $folder->id]) }}" method="post" accept-charset="utf-8" enctype="multipart/form-data"> 203 @method("patch") 204 @csrf 205 <div class="row"> 206 <div class="col-md-6"> 207 <div class="form-group"> 208 <label>Folder</label> 209 <select class="form-control edit_folder_deparment" name="department" required> 210 @foreach ($departments as $department) 211 <option value="{{ $department->id }}" data-dept-code="{{ $department->code }}" {{ old("department", $folder->department->id) == $department->id ? "selected" : "" }}>{{ $department->name }}</option> 212 @endforeach 213 </select> 214 </div> 215 </div> 216 <div class="col-md-6"> 217 <div class="form-group"> 218 <label>Archive ID</label> 219 <input type="text" name="arch_id" value="{{ old("arch_id", $folder->arch_id) }}" class="form-control" placeholder="Archive ID" required> 220 </div> 221 </div> 222 </div> 223 <div class="row"> 224 <div class="col-md-6"> 225 <div class="form-group"> 226 <label>Name</label> 227 <input type="text" name="name" value="{{ old("name", $folder->name) }}" class="form-control" placeholder="Name" minlength="2" maxlength="30" required> 228 </div> 229 </div> 230 <div class="col-md-6"> 231 <div class="form-group"> 232 <label>Note</label> 233 <textarea class="form-control" name="note" maxlength="80"> 234 {{ old("note", $folder->note) }} 235 </textarea> 236 </div> 237 </div> 238 </div> 239 <div class="row"> 240 <div class="col-md-6"> 241 <input type="file" class="form-control" id="file-item" name="file_item[]" accept="{{ $fileTypes }}" multiple> 242 </div> 243 </div> 244 <br/> 245 <div class="modal-footer"> 246 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close 247 </button> 248 <button type="submit" class="btn btn-primary">Save changes</button> 249 </div> 250 </form> 251 </div> 162 252 163 </div> 253 164 </div> … … 334 245 <input type="file" class="form-control" id="file-item" name="file_item[]" accept="{{ $fileTypes }}" multiple> 335 246 </div> 336 <div class="col-md-6">337 <div class="form-group">338 <div class="form-check">339 <input class="form-check-input" type="checkbox" value=" {{ old('is_important') }} " id="is_important" name="is_important">340 <label class="form-check-label">341 Mark as important342 </label>343 </div>344 </div>345 </div>346 247 </div> 347 248 <br/> … … 370 271 @yield('script') 371 272 372 <script>373 function toggleImportant(id) {374 document.getElementById('toggleImportant_' + id).submit();375 }376 </script>377 378 273 @endsection
Note:
See TracChangeset
for help on using the changeset viewer.