vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Blame · server/web/templates/release_attach.html
Line attribution on main · 63 line(s)
|
c5187449
Keenan Nemetz
17d ago
|
1 | {{define "release_attach"}} |
| 2 | {{template "header" .}} | |
| 3 | {{template "repohead" (nav .Page "releases")}} | |
| 4 | ||
| 5 | <div class="page-head"> | |
| 6 | <div class="page-head-main"> | |
|
fdd0b3e8
Keenan Nemetz
17d ago
|
7 | <h1>Manage files for {{.Tag}}</h1> |
| 8 | <p class="page-sub">{{if .Artifacts}}{{len .Artifacts}} file(s) attached · {{end}}Attach new files, or remove one already attached.</p> | |
|
c5187449
Keenan Nemetz
17d ago
|
9 | </div> |
| 10 | <div class="page-head-actions"> | |
| 11 | <a class="button secondary" href="/{{.Name}}/releases/{{esc .Tag}}">Back to release</a> | |
| 12 | </div> | |
| 13 | </div> | |
| 14 | ||
| 15 | {{if .Error}}<div class="flash bad">{{.Error}}</div>{{end}} | |
| 16 | ||
| 17 | {{if .Locked}} | |
| 18 | <div class="empty-state"> | |
| 19 | <p>This release cannot take new files until the condition above changes.</p> | |
| 20 | <p><a class="button secondary" href="/{{.Name}}/releases/{{esc .Tag}}">Back to release</a></p> | |
| 21 | </div> | |
| 22 | {{else}} | |
| 23 | <form method="post" action="/{{.Name}}/releases/{{esc .Tag}}/attach" enctype="multipart/form-data" class="form-block"> | |
| 24 | <input type="hidden" name="csrf" value="{{.CSRF}}"> | |
| 25 | <div class="card form-card"> | |
| 26 | <label>Files | |
| 27 | <input type="file" name="files" multiple required> | |
| 28 | </label> | |
| 29 | <label>or a directory | |
| 30 | <input type="file" name="files" multiple webkitdirectory> | |
| 31 | </label> | |
| 32 | <label>Publish under (optional directory) | |
| 33 | <input type="text" name="path" placeholder="apt" autocomplete="off"> | |
| 34 | </label> | |
| 35 | </div> | |
| 36 | <p class="muted">A file is attached under its name, or under the directory you name | |
| 37 | above. A browser upload is limited to {{bytes .UploadCap}}; attach a larger set with | |
| 38 | <code>vole release attach {{.Tag}} dist/*</code>.</p> | |
| 39 | <div class="form-actions"> | |
| 40 | <button type="submit">{{icon "tag"}}Attach files</button> | |
| 41 | </div> | |
| 42 | </form> | |
| 43 | {{end}} | |
| 44 | ||
| 45 | {{if .Artifacts}} | |
|
fdd0b3e8
Keenan Nemetz
17d ago
|
46 | <h2>Attached files</h2> |
| 47 | <div class="release-files"> | |
|
c5187449
Keenan Nemetz
17d ago
|
48 | <table> |
| 49 | <tr><th>File</th><th>Size</th><th>SHA-256</th><th></th></tr> | |
| 50 | {{range .Artifacts}} | |
| 51 | <tr> | |
| 52 | <td><a href="/{{$.Name}}/releases/{{esc $.Tag}}/artifacts/{{.Name}}">{{.Name}}</a></td> | |
| 53 | <td class="muted">{{bytes .Size}}</td> | |
| 54 | <td class="muted"><code>{{short .OID}}</code></td> | |
|
fdd0b3e8
Keenan Nemetz
17d ago
|
55 | <td><form method="post" action="/{{$.Name}}/releases/{{esc $.Tag}}/files/delete" class="inline" data-confirm="Remove {{.Name}} from {{$.Tag}}?"><input type="hidden" name="csrf" value="{{$.CSRF}}"><input type="hidden" name="path" value="{{.Name}}"><button class="link" type="submit">remove</button></form></td> |
|
c5187449
Keenan Nemetz
17d ago
|
56 | </tr> |
| 57 | {{end}} | |
| 58 | </table> | |
| 59 | </div> | |
| 60 | {{end}} | |
| 61 | ||
| 62 | {{template "footer" .}} | |
| 63 | {{end}} |