Changeset e78295c for resources/views
- Timestamp:
- 10/31/21 21:28:46 (3 years ago)
- Branches:
- master
- Children:
- 4521f25
- Parents:
- a55bb54
- Location:
- resources/views/dashboard
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
resources/views/dashboard/files/index.blade.php
ra55bb54 re78295c 107 107 @if(auth()->user()->hasPermission('manage_all_files')) 108 108 <td> 109 <a href="javascript:void(0)" class="text-secondary" data-toggle="modal" data-target="#editModal_{{$file->id}}" title="Edit">110 <i class="ti-pencil"></i>111 </a>112 109 <a href="{{ route("dashboard.files.downloadFile", ['id' => $file->id]) }}" class="text-danger ml-2"title="Download"> 113 110 <i class="ti-download"></i> … … 148 145 </div> 149 146 150 <div class="modal fade" id="editModal_{{$file->id}}" tabindex="-1" role="dialog" aria-hidden="true">151 <div class="modal-dialog modal-dialog-centered" role="document">152 <div class="modal-content">153 <div class="modal-header">154 <h5 class="modal-title" id="exampleModalCenterTitle">Rename file</h5>155 <button type="button" class="close" data-dismiss="modal" aria-label="Close">156 <i class="ti-close"></i>157 </button>158 </div>159 <div class="modal-body">160 <form action="{{ route("dashboard.files.renameFile", ["id" =>$file->id]) }}" method="post" accept-charset="utf-8">161 @method("patch")162 @csrf163 <div class="row">164 <div class="col-md-12">165 <div class="form-group">166 <label class="form-label">Current name: {{$file->name}}</label>167 <input type="text" name="name" value="{{ explode('.', $file->name)[0] }}" maxlength="255" title="Don't include: '\/.|'" pattern="^[^.\/|]+$" class="form-control" required>168 </div>169 </div>170 </div>171 <br/>172 <div class="modal-footer">173 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close174 </button>175 <button type="submit" class="btn btn-primary">Save changes</button>176 </div>177 </form>178 </div>179 180 </div>181 </div>182 </div>183 147 @endforeach 184 148 -
resources/views/dashboard/folders/files.blade.php
ra55bb54 re78295c 8 8 <div class="col-md-3 app-sidebar"> 9 9 <div class="card"> 10 <div class="card-body">11 @if(auth()->user()->hasPermission('manage_all_folders'))12 <a class="btn btn-secondary btn-block text-white" href="javascript:void(0)" data-target="#createModal{{$folder->id}}" data-toggle="modal">13 Edit folder14 </a>15 @endif16 </div>17 10 <div class="app-sidebar-menu"> 18 11 <div class="list-group list-group-flush"> … … 37 30 <div class="action-left"> 38 31 <ul class="list-inline"> 39 @if(auth()->user()->hasPermission('manage_all_folders'))40 <li class="list-inline-item mb-0">41 <a href="#" class="btn btn-outline-light dropdown-toggle" data-toggle="dropdown">42 Actions43 </a>44 <div class="dropdown-menu">45 <a class="dropdown-item" href="javascript:void(0)" data-toggle="modal" data-target="#editModal_{{$folder->id}}">46 Edit folder47 </a>48 </div>49 </li>50 @endif51 32 <li class="list-inline-item mb-0"> 52 33 @if(auth()->user()->hasPermission('download_data')) … … 108 89 </a> 109 90 <div class="dropdown-menu dropdown-menu-right"> 110 @if(auth()->user()->hasPermission('manage_all_files'))111 <a href="javascript:void(0)" class="dropdown-item" data-toggle="modal" data-target="#editFileModal_{{$file->id}}">112 Rename113 </a>114 @endif115 91 @if(auth()->user()->hasPermission('download_data')) 116 92 <a href="{{ route("dashboard.files.downloadFile", $file->id) }}" class="dropdown-item"> … … 158 134 </div> 159 135 160 <div class="modal fade" id="editFileModal_{{$file->id}}" tabindex="-1" role="dialog" aria-hidden="true">161 <div class="modal-dialog modal-dialog-centered modal-lg" role="document">162 <div class="modal-content">163 <div class="modal-header">164 <h5 class="modal-title" id="exampleModalCenterTitle">Edit file name</h5>165 <button type="button" class="close" data-dismiss="modal" aria-label="Close">166 <i class="ti-close"></i>167 </button>168 </div>169 <div class="modal-body">170 <form action="{{ route("dashboard.files.renameFile", ["id" =>$file->id]) }}" method="post" accept-charset="utf-8">171 @method("patch")172 @csrf173 <div class="row">174 <div class="col-md-12">175 <div class="form-group">176 <label class="form-label">Current name: {{$file->name}}</label>177 <input type="text" name="name" value="{{ explode('.', $file->name)[0] }}" maxlength="255" title="Don't include: '\/.|'" pattern="^[^.\/|]+$" class="form-control" required>178 </div>179 </div>180 </div>181 <br/>182 <div class="modal-footer">183 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close184 </button>185 <button type="submit" class="btn btn-primary">Save changes</button>186 </div>187 </form>188 </div>189 </div>190 </div>191 </div>192 136 @empty 193 137 <div class="col-xl-3 col-lg-4 col-md-6 col-sm-12">No items found</div> 194 138 @endforelse 195 139 196 <div class="modal fade" id="editModal_{{$folder->id}}" tabindex="-1" role="dialog" aria-hidden="true">197 <div class="modal-dialog modal-dialog-centered modal-lg" role="document">198 <div class="modal-content">199 <div class="modal-header">200 <h5 class="modal-title" id="exampleModalCenterTitle">Edit folder</h5>201 <button type="button" class="close" data-dismiss="modal" aria-label="Close">202 <i class="ti-close"></i>203 </button>204 </div>205 <div class="modal-body">206 <form action="{{ route("dashboard.folders.edit", ["id" => $folder->id]) }}" method="post" accept-charset="utf-8" enctype="multipart/form-data">207 @method("patch")208 @csrf209 <div class="row">210 <div class="col-md-6">211 <div class="form-group">212 <label>Department</label>213 <select class="form-control edit_folder_deparment" name="department" required>214 @foreach ($departments as $department)215 <option value="{{ $department->id }}" data-dept-code="{{ $department->code }}" {{ old("department", $folder->department->id) == $department->id ? "selected" : "" }}>{{ $department->name }}</option>216 @endforeach217 </select>218 </div>219 </div>220 <div class="col-md-6">221 <div class="form-group">222 <label>Archive ID</label>223 <input type="text" name="arch_id" value="{{ old("arch_id", $folder->arch_id) }}" class="form-control" placeholder="Archive ID" required>224 </div>225 </div>226 </div>227 <div class="row">228 <div class="col-md-6">229 <div class="form-group">230 <label>Name</label>231 <input type="text" name="name" value="{{ old("name", $folder->name) }}" class="form-control" placeholder="Name" minlength="2" maxlength="30" required>232 </div>233 </div>234 <div class="col-md-6">235 <div class="form-group">236 <label>Note</label>237 <textarea class="form-control" name="note" maxlength="80">238 {{ old("note", $folder->note) }}239 </textarea>240 </div>241 </div>242 </div>243 <div class="row">244 <div class="col-md-6">245 <input type="file" class="form-control" id="file-item" name="file_item[]" accept="{{ $fileTypes }}" multiple>246 </div>247 </div>248 <br/>249 <div class="modal-footer">250 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close251 </button>252 <button type="submit" class="btn btn-primary">Save changes</button>253 </div>254 </form>255 </div>256 257 </div>258 </div>259 </div>260 261 <div class="modal fade" id="createModal" tabindex="-1" role="dialog" aria-hidden="true">262 <div class="modal-dialog modal-dialog-centered modal-lg" role="document">263 <div class="modal-content">264 <div class="modal-header">265 <h5 class="modal-title" id="exampleModalCenterTitle">Create folder</h5>266 <button type="button" class="close" data-dismiss="modal" aria-label="Close">267 <i class="ti-close"></i>268 </button>269 </div>270 <div class="modal-body">271 <form action="{{ route("dashboard.folders.store") }}" method="post" accept-charset="utf-8" enctype="multipart/form-data">272 @csrf273 <div class="row">274 <div class="col-md-6">275 <div class="form-group">276 <label for="exampleFormControlSelect1">Department</label>277 @if($departments->count())278 <select class="form-control new_folder_deparment" name="department" required>279 @foreach ($departments as $department)280 <option value="{{ $department->id }}" data-dept-code="{{ $department->code }}" {{ (old("department") == $department->id ? "selected" : "") }}>{{ $department->name }}</option>281 @endforeach282 @else283 <p>You haven't created any departments yet. <a class="text-primary" href="{{ route("dashboard.departments.create") }}">Create now.</a></p>284 @endif285 </select>286 </div>287 </div>288 <div class="col-md-6">289 <div class="form-group">290 <label>Archive ID</label>291 <input type="text" name="arch_id" value="" class="form-control" placeholder="Archive ID" required>292 </div>293 </div>294 </div>295 <div class="row">296 <div class="col-md-6">297 <div class="form-group">298 <label>Name</label>299 <input type="text" name="name" value="{{ old("name") }}" minlength="2" maxlength="30" class="form-control" placeholder="Name" required>300 </div>301 </div>302 <div class="col-md-6">303 <div class="form-group">304 <label>Note</label>305 <textarea class="form-control" name="note" maxlength="80"> {{old("note")}} </textarea>306 </div>307 </div>308 </div>309 <div class="row">310 <div class="col-md-6">311 <input type="file" class="form-control" id="file-item" name="file_item[]" accept="{{ $fileTypes }}" multiple>312 </div>313 <div class="col-md-6">314 <div class="form-group">315 <div class="form-check">316 <input class="form-check-input" type="checkbox" value="{{old("is_important")}}" id="is_important" name="is_important">317 <label class="form-check-label">318 Mark as important319 </label>320 </div>321 </div>322 </div>323 </div>324 <br/>325 <div class="modal-footer">326 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close327 </button>328 <button type="submit" class="btn btn-primary">Save changes</button>329 </div>330 </form>331 </div>332 333 </div>334 </div>335 </div>336 140 </div> 337 141 -
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.