Changeset ea7b12a for resources/views/dashboard/documents
- Timestamp:
- 10/19/21 17:46:21 (3 years ago)
- Branches:
- develop, master
- Children:
- 6b95845
- Parents:
- b9c4a92
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
resources/views/dashboard/documents/edit.blade.php
rb9c4a92 rea7b12a 4 4 5 5 @section('pageTitle', 'Edit document') 6 7 @section('head') 8 <!-- Datatable --> 9 <link rel="stylesheet" href="{{ url('vendors/dataTable/dataTables.min.css') }}" type="text/css"> 10 @endsection 6 11 7 12 @section('content') … … 79 84 </div> 80 85 </div> 86 87 </div> 88 89 <div class="col-md-12"> 90 <div class="card"> 91 <div class="card-body"> 92 <div class="table-responsive"> 93 <table id="user-list" class="table table-lg"> 94 <thead> 95 <tr> 96 <th></th> 97 <th>ID</th> 98 <th>Size</th> 99 <th>Name</th> 100 <th>Created at</th> 101 <th>Location</th> 102 <th>Actions</th> 103 </tr> 104 </thead> 105 <tbody> 106 @foreach($files as $file) 107 <tr> 108 <td></td> 109 <td>{{ $file->id }}</td> 110 <td>{{ $file->getSize($file->location) }} MB</td> 111 <td>{{ $file->name }}</td> 112 <td>{{ date('d.m.Y - H:i', strtotime($file->created_at)) }}</td> 113 <!-- Trigger --> 114 <td> <span id="copy_{{$department->id}}"></span> 115 <button class="btn btn-sm btn-primary text-white" data-clipboard-target="#copy_{{ $department->id }}"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16"> 116 <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/> 117 <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/> 118 </svg></button> 119 </td> 120 <td> 121 <a href="javascript:void(0)" class="text-secondary" data-toggle="modal" data-target="#editModal_{{$file->id}}" title="Edit"> 122 <i class="ti-pencil"></i> 123 </a> 124 <a href="{{ route("dashboard.documents.downloadFile", $file->id) }}" class="text-secondary" title="Edit"> 125 <i class="ti-download"></i> 126 </a> 127 <a href="javascript:void(0)" class="text-danger ml-2" data-toggle="modal" data-target="#deleteModal_{{$file->id}}" title="Delete"> 128 <i class="ti-trash"></i> 129 </a> 130 </td> 131 </tr> 132 <div class="modal fade" id="deleteModal_{{$file->id}}" tabindex="-1" role="dialog" aria-hidden="true"> 133 <div class="modal-dialog modal-dialog-centered" role="document"> 134 <div class="modal-content"> 135 <div class="modal-header"> 136 <h5 class="modal-title" id="exampleModalCenterTitle">Delete confirmation</h5> 137 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 138 <i class="ti-close"></i> 139 </button> 140 </div> 141 <div class="modal-body"> 142 <form action="{{ route("dashboard.documents.deleteFile", $file->id) }}" method="POST"> 143 @csrf 144 @method('DELETE') 145 <p>Are you sure you want to delete file {{$file->name}}?</p> 146 <div class="modal-footer"> 147 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close 148 </button> 149 <button type="submit" class="btn btn-primary">Save changes</button> 150 </div> 151 </form> 152 </div> 153 154 </div> 155 </div> 156 </div> 157 158 <div class="modal fade" id="editModal_{{$file->id}}" tabindex="-1" role="dialog" aria-hidden="true"> 159 <div class="modal-dialog modal-dialog-centered" role="document"> 160 <div class="modal-content"> 161 <div class="modal-header"> 162 <h5 class="modal-title" id="exampleModalCenterTitle">Edit department</h5> 163 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 164 <i class="ti-close"></i> 165 </button> 166 </div> 167 <div class="modal-body"> 168 <form action="{{ route("dashboard.documents.renameFile", ["id" =>$file->id]) }}" method="post" accept-charset="utf-8"> 169 @method("patch") 170 @csrf 171 <div class="row"> 172 <div class="col-md-6"> 173 <div class="form-group"> 174 <label class="form-label">Name</label> 175 <input type="text" name="name" value="{{ explode('.', $file->name)[0] }}" minlength="2" maxlength="30" class="form-control" placeholder="Name" required> 176 </div> 177 </div> 178 </div> 179 <input type="submit" value="Save changes" class="btn btn-primary pull-right m-10"> 180 </form> 181 </div> 182 183 </div> 184 </div> 185 </div> 186 @endforeach 187 188 <div class="modal fade" id="createModal" tabindex="-1" role="dialog" aria-hidden="true"> 189 <div class="modal-dialog modal-dialog-centered" role="document"> 190 <div class="modal-content"> 191 <div class="modal-header"> 192 <h5 class="modal-title" id="exampleModalCenterTitle">Create department</h5> 193 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 194 <i class="ti-close"></i> 195 </button> 196 </div> 197 <div class="modal-body"> 198 <form action="{{ route("dashboard.departments.store") }}" method="post" accept-charset="utf-8"> 199 @csrf 200 <div class="row"> 201 <div class="col-md-6"> 202 <div class="form-group"> 203 <label>Name</label> 204 <input type="text" name="name" value="{{ old('name') }}" minlength="2" maxlength="30" class="form-control" placeholder="Name" required> 205 </div> 206 </div> 207 <div class="col-md-6"> 208 <div class="form-group"> 209 <label>Code</label> 210 <input type="text" name="code" value="{{ old('code') }}" minlength="2" maxlength="30" class="form-control" placeholder="Code" required> 211 </div> 212 </div> 213 </div> 214 <input type="submit" value="Save changes" class="submitBtn btn btn-primary pull-right m-10"> 215 </form> 216 </div> 217 218 </div> 219 </div> 220 </div> 221 222 </tbody> 223 </table> 224 </div> 225 </div> 226 </div> 81 227 </div> 82 228 </div> 83 229 84 230 @endsection 231 232 @section('script') 233 <script src="{{ url('assets/js/examples/pages/user-list.js') }}"></script> 234 <!-- Datatable --> 235 <script src="{{ url('vendors/dataTable/dataTables.min.js') }}"></script> 236 @endsection
Note:
See TracChangeset
for help on using the changeset viewer.