Changeset 0df7a93 for resources/views
- Timestamp:
- 10/24/21 20:55:11 (3 years ago)
- Branches:
- develop, master
- Children:
- 7043def
- Parents:
- e0d3f94
- Location:
- resources/views
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
resources/views/dashboard/departments/index.blade.php
re0d3f94 r0df7a93 20 20 </nav> 21 21 <div class="dropdown"> 22 @if(auth()->user()->hasPermission('manage_all_departments')) 22 23 <a href="javascript:void(0)" data-toggle="modal" data-target="#createModal" class="btn btn-primary text-white"> 23 24 <i class="fa fa-plus pr-1"></i> New 24 25 </a> 26 @endif 27 28 @if(auth()->user()->hasPermission('download_data')) 25 29 <a href="{{ route("dashboard.departments.downloadAll") }}" class="btn btn-danger text-white"> 26 30 <i class="fa fa-download pr-1"></i> Download 27 31 </a> 32 @endif 33 @if(auth()->user()->hasPermission('export_data')) 28 34 <a href="{{ route('dashboard.departments.export') }}" class="btn btn-success text-white"> 29 35 <i class="fa fa-table pr-1"></i> Export</a> 36 @endif 30 37 </div> 31 38 </div> … … 73 80 </svg></button> 74 81 </td> 82 @if(auth()->user()->hasPermission('manage_all_departments')) 75 83 <td> 76 84 <a href="javascript:void(0)" class="text-secondary" data-toggle="modal" data-target="#editModal_{{$department->id}}" title="Edit"> 77 85 <i class="ti-pencil"></i> 78 86 </a> 79 <a href="{{ route("dashboard.departments.downloadDepartment", ['id' => $department->id]) }}" class="text-danger ml-2"title="Delete"> 87 @if(auth()->user()->hasPermission('download_data')) 88 <a href="{{ route("dashboard.departments.downloadDepartment", ['id' => $department->id]) }}" class="text-danger ml-2"title="Download"> 80 89 <i class="ti-download"></i> 81 90 </a> 91 @endif 82 92 <a href="javascript:void(0)" class="text-danger ml-2" data-toggle="modal" data-target="#deleteModal_{{$department->id}}" title="Delete"> 83 93 <i class="ti-trash"></i> 84 94 </a> 85 95 </td> 96 @else 97 <td></td> 98 @endif 86 99 </tr> 87 100 <div class="modal fade" id="deleteModal_{{$department->id}}" tabindex="-1" role="dialog" aria-hidden="true"> … … 99 112 @method('DELETE') 100 113 <p>Are you sure you want to delete department {{$department->name}} with code: {{$department->code}}?</p> 101 <p>Number of documents associated: <a href="{{ route("dashboard.folders.index", ['id' => $department->id]) }}" class="text-linkedin">{{$department->folder()->count()}}</a></p>114 <p>Number of folders associated: <a href="{{ route("dashboard.folders.index", ['id' => $department->id]) }}" class="text-linkedin">{{$department->folder()->count()}}</a></p> 102 115 <div class="modal-footer"> 103 116 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close -
resources/views/dashboard/files/index.blade.php
re0d3f94 r0df7a93 20 20 </nav> 21 21 <div class="dropdown"> 22 @if(auth()->user()->hasPermission('manage_all_files')) 22 23 <a href="javascript:void(0)" data-toggle="modal" data-target="#createModal" class="btn btn-primary text-white"> 23 24 <i class="fa fa-upload pr-1"></i> Upload 24 25 </a> 26 @endif 27 @if(auth()->user()->hasPermission('download_data')) 25 28 <a href="{{ route("dashboard.departments.downloadAll") }}" class="btn btn-danger text-white"> 26 29 <i class="fa fa-download pr-1"></i> Download 27 30 </a> 31 @endif 32 @if(auth()->user()->hasPermission('export_data')) 28 33 <a href="{{ route('dashboard.files.export') }}" class="btn btn-success text-white"> 29 34 <i class="fa fa-table pr-1"></i> Export 30 35 </a> 36 @endif 31 37 </div> 32 38 </div> … … 103 109 </svg></button> 104 110 </td> 111 @if(auth()->user()->hasPermission('manage_all_files')) 105 112 <td> 106 113 <a href="javascript:void(0)" class="text-secondary" data-toggle="modal" data-target="#editModal_{{$file->id}}" title="Edit"> … … 114 121 </a> 115 122 </td> 123 @else 124 <td></td> 125 @endif 116 126 </tr> 117 127 <div class="modal fade" id="deleteModal_{{$file->id}}" tabindex="-1" role="dialog" aria-hidden="true"> -
resources/views/dashboard/folders/files.blade.php
re0d3f94 r0df7a93 9 9 <div class="card"> 10 10 <div class="card-body"> 11 @if(auth()->user()->hasPermission('manage_all_folders')) 11 12 <a class="btn btn-secondary btn-block text-white" href="javascript:void(0)" data-target="#editModal_{{$folder->id}}" data-toggle="modal"> 12 13 Upload 13 14 </a> 15 @endif 14 16 </div> 15 17 <div class="app-sidebar-menu"> … … 35 37 <div class="action-left"> 36 38 <ul class="list-inline"> 39 @if(auth()->user()->hasPermission('manage_all_folders')) 37 40 <li class="list-inline-item mb-0"> 38 41 <a href="#" class="btn btn-outline-light dropdown-toggle" data-toggle="dropdown"> … … 43 46 Upload 44 47 </a> 45 46 48 </div> 47 49 </li> 50 @endif 48 51 <li class="list-inline-item mb-0"> 52 @if(auth()->user()->hasPermission('download_data')) 49 53 <a href="{{ route("dashboard.folders.downloadFolder", ['id' => $folder->id]) }}" class="btn btn-outline-light"> 50 54 Download folder 51 55 </a> 56 @endif 52 57 </li> 53 58 </ul> … … 100 105 </a> 101 106 <div class="dropdown-menu dropdown-menu-right"> 107 @if(auth()->user()->hasPermission('manage_all_files')) 102 108 <a href="javascript:void(0)" class="dropdown-item" data-toggle="modal" data-target="#editFileModal_{{$file->id}}"> 103 109 Rename 104 110 </a> 111 @endif 112 @if(auth()->user()->hasPermission('download_data')) 105 113 <a href="{{ route("dashboard.files.downloadFile", $file->id) }}" class="dropdown-item"> 106 114 Download 107 115 </a> 116 @endif 117 @if(auth()->user()->hasPermission('manage_all_files')) 108 118 <a href="javascript:void(0)" class="dropdown-item" data-toggle="modal" data-target="#deleteModal_{{$file->id}}"> 109 119 Delete 110 120 </a> 121 @endif 111 122 </div> 112 123 </div> -
resources/views/dashboard/folders/index.blade.php
re0d3f94 r0df7a93 9 9 <div class="card"> 10 10 <div class="card-body"> 11 @if(auth()->user()->hasPermission('manage_all_folders')) 11 12 <a href="javascript:void(0)" class="btn btn-secondary btn-block file-upload-btn text-white" data-toggle="modal" data-target="#createModal"> 12 13 Add folder 13 14 </a> 15 @endif 14 16 </div> 15 17 <div class="app-sidebar-menu"> … … 62 64 <div class="action-left"> 63 65 <ul class="list-inline"> 66 @if(auth()->user()->hasPermission('manage_all_folders')) 64 67 <li class="list-inline-item mb-0"> 65 68 <a href="#" class="btn btn-outline-light dropdown-toggle" data-toggle="dropdown"> 66 69 <i data-feather="plus" class="mr-1"></i> 67 A tions70 Actions 68 71 </a> 69 72 <div class="dropdown-menu"> 70 73 <a class="dropdown-item" href="javascript:void(0)" data-toggle="modal" data-target="#createModal">Add folder</a> 74 @endif 75 @if(auth()->user()->hasPermission('export_data')) 71 76 <a href="{{ route('dashboard.folders.export') }}" class="dropdown-item text-success">Export</a> 72 77 </div> 73 78 </li> 79 @endif 74 80 <li class="list-inline-item mb-0"> 75 81 <a href="#" class="btn btn-outline-light dropdown-toggle" data-toggle="dropdown">Departments</a> … … 139 145 <div class="dropdown-menu dropdown-menu-right"> 140 146 <a href="{{ route("dashboard.folders.files", ["id" => $folder->id]) }}" class="dropdown-item">View Files</a> 147 @if(auth()->user()->hasPermission('manage_all_folders')) 141 148 <a href="javascript:void(0)" class="dropdown-item" data-toggle="modal" data-target="#editModal_{{$folder->id}}">Edit</a> 149 @endif 150 @if(auth()->user()->hasPermission('download_data')) 142 151 <a href="{{ route("dashboard.folders.downloadFolder", ['id' => $folder->id]) }}" class="dropdown-item">Download</a> 143 <button class="dropdown-item action-dropdown-item" 152 @endif 153 @if(auth()->user()->hasPermission('manage_all_folders')) 154 <button class="dropdown-item action-dropdown-item" 144 155 href="javascript:void(0)" onclick="toggleImportant({{$folder->id}})"> 145 156 @if($folder->is_important) … … 149 160 @endif 150 161 </button> 162 @endif 163 @if(auth()->user()->hasPermission('manage_all_folders')) 151 164 <a href="javascript:void(0)" class="dropdown-item" data-toggle="modal" data-target="#deleteModal_{{$folder->id}}">Delete</a> 165 @endif 152 166 </div> 153 167 </div> -
resources/views/dashboard/index.blade.php
re0d3f94 r0df7a93 159 159 @endif 160 160 @endif 161 162 163 161 </td> 164 162 <td>{{ $file->name }}</td> … … 177 175 </svg></button> 178 176 </td> 177 @if(auth()->user()->hasPermission('manage_all_files')) 179 178 <td> 180 179 <a href="javascript:void(0)" class="text-secondary" data-toggle="modal" data-target="#editModal_{{$file->id}}" title="Edit"> … … 188 187 </a> 189 188 </td> 189 @else 190 <td></td> 191 @endif 190 192 </tr> 191 193 <div class="modal fade" id="deleteModal_{{$file->id}}" tabindex="-1" role="dialog" aria-hidden="true"> -
resources/views/dashboard/settings/index.blade.php
re0d3f94 r0df7a93 24 24 <a class="nav-link {{$active_tab == 'account' ? 'active' : ""}}" id="account-tab" data-toggle="pill" href="#account" role="tab" aria-controls="account" aria-selected="true">Account</a> 25 25 <a class="nav-link {{$active_tab == 'security' ? 'active' : ""}}" id="security-tab" data-toggle="pill" href="#security" role="tab" aria-controls="security" aria-selected="false">Security</a> 26 @if(auth()->user()->hasPermission('validation_data')) 26 27 <a class="nav-link {{$active_tab == 'file-types' ? 'active' : ""}}" id="file-types-tab" data-toggle="pill" href="#file-types" role="tab" aria-controls="file-types" aria-selected="false">File validation</a> 28 @endif 27 29 </div> 28 30 </div> … … 233 235 </div> 234 236 <div class="tab-pane {{$active_tab == 'file-types' ? 'active' : ""}}" id="file-types" role="tabpanel" aria-labelledby="file-types-tab"> 235 237 @if(auth()->user()->hasPermission('validation_data')) 236 238 <div class="card"> 237 239 <div class="card-body"> … … 259 261 </div> 260 262 </div> 261 263 @endif 262 264 </div> 263 265 </div> -
resources/views/dashboard/users/index.blade.php
re0d3f94 r0df7a93 21 21 </nav> 22 22 <div class="dropdown"> 23 @if(auth()->user()->hasPermission('manage_all_users')) 23 24 <a href="javascript:void(0)" data-toggle="modal" data-target="#createModal" class="btn btn-primary text-white"> 24 25 <i class="fa fa-plus pr-1"></i> New 25 26 </a> 27 @endif 28 @if(auth()->user()->hasPermission('export_data')) 26 29 <a href="{{ route('dashboard.users.export') }}" class="btn btn-success text-white"> 27 30 <i class="fa fa-table pr-1"></i> Export 28 31 </a> 32 @endif 29 33 </div> 30 34 </div> … … 93 97 @endif 94 98 </td> 99 @if(auth()->user()->hasPermission('manage_all_users')) 95 100 @if($user->hasRole("Referent") && $user->is_confirmed) 96 101 <td> … … 98 103 <i class="ti-pencil"></i> 99 104 </a> 100 <a href="javascript:void(0)" class="text-danger ml-2" data- action="{{ route("dashboard.users.destroy", ["id" => $user->id]) }}" data-method="delete" title="Delete">105 <a href="javascript:void(0)" class="text-danger ml-2" data-toggle="modal" data-target="#deleteModal_{{$user->id}}" title="Delete"> 101 106 <i class="ti-trash"></i> 102 107 </a> … … 105 110 <td>/</td> 106 111 @endif 112 @else 113 <td></td> 114 @endif 107 115 </tr> 108 116 … … 199 207 </div> 200 208 209 <div class="modal fade" id="deleteModal_{{$user->id}}" tabindex="-1" role="dialog" aria-hidden="true"> 210 <div class="modal-dialog modal-dialog-centered" role="document"> 211 <div class="modal-content"> 212 <div class="modal-header"> 213 <h5 class="modal-title" id="exampleModalCenterTitle">Delete confirmation</h5> 214 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 215 <i class="ti-close"></i> 216 </button> 217 </div> 218 <div class="modal-body"> 219 <form action="{{ route("dashboard.users.destroy", $user->id) }}" method="POST"> 220 @csrf 221 @method('DELETE') 222 <p>Are you sure you want to delete user {{$user->username}} ?</p> 223 <p>Number of folders created: <a href="{{ route("dashboard.folders.index", ['id' => $user->id]) }}" class="text-linkedin">{{\App\Models\Folder::where('user_id', $user->id)->count()}}</a></p> 224 <div class="modal-footer"> 225 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close 226 </button> 227 <button type="submit" class="btn btn-primary">Save changes</button> 228 </div> 229 </form> 230 </div> 231 232 </div> 233 </div> 234 </div> 201 235 @endforeach 202 236 </tbody> -
resources/views/layouts/app.blade.php
re0d3f94 r0df7a93 168 168 </li> 169 169 @endif 170 @if(auth()->user()->hasPermission(" manage_all_departments"))170 @if(auth()->user()->hasPermission("view_all_departments")) 171 171 <li> 172 172 <a href="{{route("dashboard.departments.index")}}" data-toggle="tooltip" … … 176 176 </li> 177 177 @endif 178 @if(auth()->user()->hasPermission(" manage_all_folders"))178 @if(auth()->user()->hasPermission("view_all_folders")) 179 179 <li> 180 180 <a href="{{route("dashboard.folders.index")}}" data-toggle="tooltip" … … 184 184 </li> 185 185 @endif 186 @if(auth()->user()->hasPermission(" manage_all_files"))186 @if(auth()->user()->hasPermission("view_all_files")) 187 187 <li> 188 188 <a href="{{route("dashboard.files.index")}}" data-toggle="tooltip"
Note:
See TracChangeset
for help on using the changeset viewer.