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.
Move channel forms off the releases page
ea6ce9fe5d829a7f4153793f0a096d00331f7e29 · Keenan Nemetz · 17d ago · parent de72893e
Move channel forms off the releases page Create and edit channels on focused release subpages, leaving the releases page with the read-only channel list and its row actions. The new-release target is now a grouped branch and tag picker instead of a free-text field, matching the channel form's selection of annotated releases.
server/web/templates/releases.html +5−27
| @@ -7,7 +7,10 @@ | |||
| 7 | 7 | <h1>Releases</h1> | |
| 8 | 8 | <p class="page-sub">{{if .Tags}}{{len .Tags}} tag(s){{if .Lightweight}} · {{.Lightweight}} lightweight{{end}}{{else}}Tags with notes, artifacts, and archives.{{end}}{{if .Channels}} · {{len .Channels}} channel(s){{end}}</p> | |
| 9 | 9 | </div> | |
| 10 | {{if .CanManage}}<div class="page-head-actions"><a class="button" href="/{{.Name}}/releases/new">{{icon "plus"}}New release</a></div>{{end}} | ||
| 10 | {{if .CanManage}}<div class="page-head-actions"> | ||
| 11 | {{if .ManageChannels}}<a class="button secondary" href="/{{.Name}}/releases/channels/new">{{icon "plus"}}New channel</a>{{end}} | ||
| 12 | <a class="button" href="/{{.Name}}/releases/new">{{icon "plus"}}New release</a> | ||
| 13 | </div>{{end}} | ||
| 11 | 14 | </div> | |
| 12 | 15 | ||
| 13 | 16 | {{if or .Channels .ManageChannels}} | |
| @@ -25,7 +28,7 @@ | |||
| 25 | 28 | <td class="muted">{{if .UpdatedBy}}{{.UpdatedBy}} · {{end}}{{since .UpdatedAt.Unix}}</td> | |
| 26 | 29 | <td class="md">{{.Body}}</td> | |
| 27 | 30 | {{if $.ManageChannels}}<td class="muted"> | |
| 28 | <a href="/{{$.Name}}/releases?channel={{urlquery .Name}}#channel-form">edit</a> | ||
| 31 | <a href="/{{$.Name}}/releases/channels/edit?channel={{urlquery .Name}}">edit</a> | ||
| 29 | 32 | <form method="post" action="/{{$.Name}}/channels/{{.Name}}/clear" class="inline" data-confirm="Clear the {{.Name}} channel? The release and its files stay."> | |
| 30 | 33 | <input type="hidden" name="csrf" value="{{$.CSRF}}"> | |
| 31 | 34 | <button class="link" type="submit">clear</button> | |
| @@ -37,31 +40,6 @@ | |||
| 37 | 40 | {{else}} | |
| 38 | 41 | <p class="muted">No channels yet.</p> | |
| 39 | 42 | {{end}} | |
| 40 | |||
| 41 | {{if .ManageChannels}} | ||
| 42 | <h3 id="channel-form">{{if .ChannelForm.Editing}}Edit channel {{.ChannelForm.Name}}{{else}}New channel{{end}}</h3> | ||
| 43 | {{if .ChannelForm.Error}}<div class="flash bad">{{.ChannelForm.Error}}</div>{{end}} | ||
| 44 | <form method="post" action="/{{.Name}}/channels" class="form-block"> | ||
| 45 | <input type="hidden" name="csrf" value="{{.CSRF}}"> | ||
| 46 | {{if .ChannelForm.Editing}}<input type="hidden" name="editing" value="1">{{end}} | ||
| 47 | <div class="form-card"> | ||
| 48 | <label>Name | ||
| 49 | <input type="text" name="channel" value="{{.ChannelForm.Name}}" {{if .ChannelForm.Editing}}readonly{{else}}required pattern="[a-z0-9][a-z0-9-]*" maxlength="32" placeholder="stable" autocomplete="off"{{end}}> | ||
| 50 | </label> | ||
| 51 | <label>Release | ||
| 52 | <input type="text" name="tag" value="{{.ChannelForm.Tag}}" required list="channel-tags" placeholder="v1.0.0" autocomplete="off"> | ||
| 53 | <datalist id="channel-tags">{{range .Tags}}{{if .Annotated}}<option value="{{.Name}}">{{end}}{{end}}</datalist> | ||
| 54 | </label> | ||
| 55 | <label>Description | ||
| 56 | <textarea name="description" rows="2" maxlength="8192" placeholder="Optional note shown on this page.">{{.ChannelForm.Description}}</textarea> | ||
| 57 | </label> | ||
| 58 | </div> | ||
| 59 | <div class="form-actions"> | ||
| 60 | {{if .ChannelForm.Editing}}<a class="button secondary" href="/{{.Name}}/releases#channels">Cancel</a>{{end}} | ||
| 61 | <button type="submit">{{icon "tag"}}{{if .ChannelForm.Editing}}Save channel{{else}}Create channel{{end}}</button> | ||
| 62 | </div> | ||
| 63 | </form> | ||
| 64 | {{end}} | ||
| 65 | 43 | </div> | |
| 66 | 44 | {{end}} | |
| 67 | 45 | ||