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.
| 1 | {{define "channel_form"}} |
| 2 | {{template "header" .}} |
| 3 | {{template "repohead" (nav .Page "releases")}} |
| 4 | |
| 5 | <div class="page-head"> |
| 6 | <div class="page-head-main"> |
| 7 | <h1>{{if .Channel.Editing}}Edit channel {{.Channel.Name}}{{else}}New channel{{end}}</h1> |
| 8 | <p class="page-sub">{{if .Channel.Editing}}The name is fixed. Choosing a different release moves the channel.{{else}}A channel is a stable name for one annotated release. Its URL serves that release's attached files.{{end}}</p> |
| 9 | </div> |
| 10 | </div> |
| 11 | |
| 12 | {{if .Channel.Error}}<div class="flash bad">{{.Channel.Error}}</div>{{end}} |
| 13 | |
| 14 | {{if .Tags}} |
| 15 | <form method="post" action="/{{.Name}}/channels" class="form-block"> |
| 16 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 17 | {{if .Channel.Editing}}<input type="hidden" name="editing" value="1">{{end}} |
| 18 | <div class="card form-card"> |
| 19 | <label>Name |
| 20 | <input type="text" name="channel" value="{{.Channel.Name}}" {{if .Channel.Editing}}readonly{{else}}required pattern="[a-z0-9][a-z0-9-]*" maxlength="32" placeholder="stable" autocomplete="off"{{end}}> |
| 21 | </label> |
| 22 | <label>Release |
| 23 | <select name="tag" required> |
| 24 | <option value=""{{if or (not .Channel.Tag) .MissingTarget}} selected{{end}} disabled>Choose an annotated release</option> |
| 25 | {{range .Tags}}<option value="{{.Name}}"{{if eq .Name $.Channel.Tag}} selected{{end}}>{{.Name}} · {{since .When}}</option>{{end}} |
| 26 | </select> |
| 27 | </label> |
| 28 | {{if .MissingTarget}}<p class="muted">Currently points at <code>{{.Channel.Tag}}</code>, which is no longer a valid annotated release. Choose a release to move it.</p>{{end}} |
| 29 | <label>Description |
| 30 | <textarea name="description" rows="3" maxlength="8192" placeholder="Optional note shown on the releases page.">{{.Channel.Description}}</textarea> |
| 31 | </label> |
| 32 | </div> |
| 33 | <div class="form-actions"> |
| 34 | <a class="button secondary" href="/{{.Name}}/releases#channels">Cancel</a> |
| 35 | <button type="submit">{{icon "tag"}}{{if .Channel.Editing}}Save channel{{else}}Create channel{{end}}</button> |
| 36 | </div> |
| 37 | </form> |
| 38 | {{else}} |
| 39 | <div class="empty-state"> |
| 40 | <p>A channel names an annotated release, and this repository does not have one yet.</p> |
| 41 | <p><a class="button" href="/{{.Name}}/releases/new">{{icon "tag"}}Create a release</a> |
| 42 | <a class="button secondary" href="/{{.Name}}/releases">Back to releases</a></p> |
| 43 | </div> |
| 44 | {{end}} |
| 45 | |
| 46 | {{template "footer" .}} |
| 47 | {{end}} |
| 48 |