Changeset e78295c for resources/views/dashboard/folders/files.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/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
Note:
See TracChangeset
for help on using the changeset viewer.