uploads.gohtml (1842B)
1 {{ define "sub-extra-head" }} 2 <style> 3 .btn-xs { 4 margin: 0 !important; 5 padding: 0 4px !important; 6 font-size: 11px !important; 7 } 8 </style> 9 {{ end }} 10 11 {{ define "sub-content" }} 12 13 <div class="card mb-3"> 14 <div class="card-header"> 15 {{ t "File uploaded" . }} 16 </div> 17 <div class="card-body"> 18 <div class="mb-3">{{ .Data.TotalSize | int64bytes }} / 100 MB</div> 19 <table class="table table-sm table-striped table-hover"> 20 <tr> 21 <th>File name</th> 22 <th>File size</th> 23 <th class="text-center">Password?</th> 24 <th>Created at</th> 25 <th class="text-right">Actions</th> 26 </tr> 27 {{ range .Data.Files }} 28 <tr> 29 <td><a href="/uploads/{{ .FileName }}">{{ .OrigFileName }}</a></td> 30 <td>{{ .FileSize | int64bytes }}</td> 31 <td class="text-center"> 32 {{ (ne .Password "") | fmtBool }} 33 </td> 34 <td>{{ .CreatedAt.Format "Jan 02, 2006 15:04:05" }}</td> 35 <td class="text-right"> 36 <form method="post"> 37 <input type="hidden" name="formName" value="deleteUpload" /> 38 <input type="hidden" name="csrf" value="{{ $.CSRF }}" /> 39 <input type="hidden" name="file_name" value="{{ .FileName }}" /> 40 <button type="submit" class="btn btn-danger btn-xs">×</button> 41 </form> 42 </td> 43 </tr> 44 {{ else }} 45 <tr> 46 <td colspan="5"><em>No file to display</em></td> 47 </tr> 48 {{ end }} 49 </table> 50 </div> 51 </div> 52 53 {{ end }}