Commit 6009cab89c
Verified · cmc
Layout: unified · split
internal/web/templates/settings.html +13 −13
| @@ -9,13 +9,13 @@ | |||
| 9 | <input type="hidden" name="field" value="description"> | 9 | <input type="hidden" name="field" value="description"> |
| 10 | <label for="description">Description</label> | 10 | <label for="description">Description</label> |
| 11 | <input type="text" id="description" name="description" value="{{.Desc}}" placeholder="one line, shown in listings"> | 11 | <input type="text" id="description" name="description" value="{{.Desc}}" placeholder="one line, shown in listings"> |
| 12 | <button type="submit">Save</button> | 12 | <button type="submit">Save description</button> |
| 13 | </form> | 13 | </form> |
| 14 | <form method="post" action="{{$base}}" class="setform"> | 14 | <form method="post" action="{{$base}}" class="setform"> |
| 15 | <input type="hidden" name="field" value="website"> | 15 | <input type="hidden" name="field" value="website"> |
| 16 | <label for="website">Website</label> | 16 | <label for="website">Website</label> |
| 17 | <input type="text" id="website" name="website" value="{{.Repo.Settings.Website}}" placeholder="https://example.org"> | 17 | <input type="text" id="website" name="website" value="{{.Repo.Settings.Website}}" placeholder="https://example.org"> |
| 18 | <button type="submit">Save</button> | 18 | <button type="submit">Save website</button> |
| 19 | </form> | 19 | </form> |
| 20 | {{if .Branches}}<form method="post" action="{{$base}}" class="setform"> | 20 | {{if .Branches}}<form method="post" action="{{$base}}" class="setform"> |
| 21 | <input type="hidden" name="field" value="default-branch"> | 21 | <input type="hidden" name="field" value="default-branch"> |
| @@ -23,7 +23,7 @@ | |||
| 23 | <select id="default-branch" name="default-branch"> | 23 | <select id="default-branch" name="default-branch"> |
| 24 | {{$cur := .Repo.DefaultBranch}}{{range .Branches}}<option value="{{.Name}}"{{if eq .Name $cur}} selected{{end}}>{{.Name}}</option>{{end}} | 24 | {{$cur := .Repo.DefaultBranch}}{{range .Branches}}<option value="{{.Name}}"{{if eq .Name $cur}} selected{{end}}>{{.Name}}</option>{{end}} |
| 25 | </select> | 25 | </select> |
| 26 | <button type="submit">Save</button> | 26 | <button type="submit">Save default branch</button> |
| 27 | </form> | 27 | </form> |
| 28 | {{end}}<form method="post" action="{{$base}}" class="setform"> | 28 | {{end}}<form method="post" action="{{$base}}" class="setform"> |
| 29 | <input type="hidden" name="field" value="topics"> | 29 | <input type="hidden" name="field" value="topics"> |
| @@ -43,13 +43,13 @@ | |||
| 43 | <option value="public"{{if eq .Repo.Visibility "public"}} selected{{end}}>Public</option> | 43 | <option value="public"{{if eq .Repo.Visibility "public"}} selected{{end}}>Public</option> |
| 44 | <option value="private"{{if eq .Repo.Visibility "private"}} selected{{end}}>Private</option> | 44 | <option value="private"{{if eq .Repo.Visibility "private"}} selected{{end}}>Private</option> |
| 45 | </select> | 45 | </select> |
| 46 | <button type="submit">Save</button> | 46 | <button type="submit">Save visibility</button> |
| 47 | </form> | 47 | </form> |
| 48 | <form method="post" action="{{$base}}" class="setform"> | 48 | <form method="post" action="{{$base}}" class="setform"> |
| 49 | <input type="hidden" name="field" value="git-daemon"> | 49 | <input type="hidden" name="field" value="git-daemon"> |
| 50 | <label for="git-daemon">Serve over git://</label> | 50 | <label for="git-daemon">Serve over git://</label> |
| 51 | <input type="checkbox" id="git-daemon" name="git-daemon" value="on"{{if .Repo.Settings.GitDaemon}} checked{{end}}> | 51 | <input type="checkbox" id="git-daemon" name="git-daemon" value="on"{{if .Repo.Settings.GitDaemon}} checked{{end}}> |
| 52 | <button type="submit">Save</button> | 52 | <button type="submit">Save git://</button> |
| 53 | </form> | 53 | </form> |
| 54 | 54 | ||
| 55 | <h2>Merge gates</h2> | 55 | <h2>Merge gates</h2> |
| @@ -58,31 +58,31 @@ | |||
| 58 | <input type="hidden" name="field" value="require-checks"> | 58 | <input type="hidden" name="field" value="require-checks"> |
| 59 | <label for="require-checks">Require green checks</label> | 59 | <label for="require-checks">Require green checks</label> |
| 60 | <input type="checkbox" id="require-checks" name="require-checks" value="on"{{if .Repo.Settings.RequireChecks}} checked{{end}}> | 60 | <input type="checkbox" id="require-checks" name="require-checks" value="on"{{if .Repo.Settings.RequireChecks}} checked{{end}}> |
| 61 | <button type="submit">Save</button> | 61 | <button type="submit">Save checks</button> |
| 62 | </form> | 62 | </form> |
| 63 | <form method="post" action="{{$base}}" class="setform"> | 63 | <form method="post" action="{{$base}}" class="setform"> |
| 64 | <input type="hidden" name="field" value="require-approvals"> | 64 | <input type="hidden" name="field" value="require-approvals"> |
| 65 | <label for="approvals">Required approvals</label> | 65 | <label for="approvals">Required approvals</label> |
| 66 | <input type="number" id="approvals" name="approvals" min="0" max="10" value="{{.Repo.Settings.RequireApprovals}}"> | 66 | <input type="number" id="approvals" name="approvals" min="0" max="10" value="{{.Repo.Settings.RequireApprovals}}"> |
| 67 | <button type="submit">Save</button> | 67 | <button type="submit">Save approvals</button> |
| 68 | </form> | 68 | </form> |
| 69 | <form method="post" action="{{$base}}" class="setform"> | 69 | <form method="post" action="{{$base}}" class="setform"> |
| 70 | <input type="hidden" name="field" value="require-resolved"> | 70 | <input type="hidden" name="field" value="require-resolved"> |
| 71 | <label for="require-resolved">Require resolved threads</label> | 71 | <label for="require-resolved">Require resolved threads</label> |
| 72 | <input type="checkbox" id="require-resolved" name="require-resolved" value="on"{{if .Repo.Settings.RequireResolved}} checked{{end}}> | 72 | <input type="checkbox" id="require-resolved" name="require-resolved" value="on"{{if .Repo.Settings.RequireResolved}} checked{{end}}> |
| 73 | <button type="submit">Save</button> | 73 | <button type="submit">Save threads</button> |
| 74 | </form> | 74 | </form> |
| 75 | <form method="post" action="{{$base}}" class="setform"> | 75 | <form method="post" action="{{$base}}" class="setform"> |
| 76 | <input type="hidden" name="field" value="require-codeowners"> | 76 | <input type="hidden" name="field" value="require-codeowners"> |
| 77 | <label for="require-codeowners">Require CODEOWNERS approval</label> | 77 | <label for="require-codeowners">Require CODEOWNERS approval</label> |
| 78 | <input type="checkbox" id="require-codeowners" name="require-codeowners" value="on"{{if .Repo.Settings.RequireCodeowners}} checked{{end}}> | 78 | <input type="checkbox" id="require-codeowners" name="require-codeowners" value="on"{{if .Repo.Settings.RequireCodeowners}} checked{{end}}> |
| 79 | <button type="submit">Save</button> | 79 | <button type="submit">Save CODEOWNERS</button> |
| 80 | </form> | 80 | </form> |
| 81 | <form method="post" action="{{$base}}" class="setform"> | 81 | <form method="post" action="{{$base}}" class="setform"> |
| 82 | <input type="hidden" name="field" value="require-signed"> | 82 | <input type="hidden" name="field" value="require-signed"> |
| 83 | <label for="require-signed">Require signed commits</label> | 83 | <label for="require-signed">Require signed commits</label> |
| 84 | <input type="checkbox" id="require-signed" name="require-signed" value="on"{{if .Repo.Settings.RequireSignedCommits}} checked{{end}}> | 84 | <input type="checkbox" id="require-signed" name="require-signed" value="on"{{if .Repo.Settings.RequireSignedCommits}} checked{{end}}> |
| 85 | <button type="submit">Save</button> | 85 | <button type="submit">Save signing</button> |
| 86 | </form> | 86 | </form> |
| 87 | 87 | ||
| 88 | <h2>Protected branches</h2> | 88 | <h2>Protected branches</h2> |
| @@ -109,7 +109,7 @@ | |||
| 109 | <input type="hidden" name="field" value="require-mr"> | 109 | <input type="hidden" name="field" value="require-mr"> |
| 110 | <label for="require-mr">Merge requests only</label> | 110 | <label for="require-mr">Merge requests only</label> |
| 111 | <input type="checkbox" id="require-mr" name="require-mr" value="on"{{if .Repo.Settings.RequireMR}} checked{{end}}> | 111 | <input type="checkbox" id="require-mr" name="require-mr" value="on"{{if .Repo.Settings.RequireMR}} checked{{end}}> |
| 112 | <button type="submit">Save</button> | 112 | <button type="submit">Save merge-only</button> |
| 113 | </form> | 113 | </form> |
| 114 | <p class="meta">With merge requests only, a protected branch refuses every direct push once it exists; the merge gates above are then what a change has to pass.</p> | 114 | <p class="meta">With merge requests only, a protected branch refuses every direct push once it exists; the merge gates above are then what a change has to pass.</p> |
| 115 | 115 | ||
| @@ -137,7 +137,7 @@ | |||
| 137 | <input type="hidden" name="field" value="deps"> | 137 | <input type="hidden" name="field" value="deps"> |
| 138 | <label for="deps">Check for updates</label> | 138 | <label for="deps">Check for updates</label> |
| 139 | <input type="checkbox" id="deps" name="deps" value="on"{{if .DepsEnabled}} checked{{end}}> | 139 | <input type="checkbox" id="deps" name="deps" value="on"{{if .DepsEnabled}} checked{{end}}> |
| 140 | <button type="submit">Save</button> | 140 | <button type="submit">Save dependency checks</button> |
| 141 | </form> | 141 | </form> |
| 142 | <p class="meta">Compares the manifests on <code>{{.Repo.DefaultBranch}}</code> against | 142 | <p class="meta">Compares the manifests on <code>{{.Repo.DefaultBranch}}</code> against |
| 143 | proxy.golang.org, npm, crates.io, and PyPI once a day, and tracks what is behind | 143 | proxy.golang.org, npm, crates.io, and PyPI once a day, and tracks what is behind |
| @@ -182,7 +182,7 @@ depends on.</p> | |||
| 182 | <input type="hidden" name="field" value="archive"> | 182 | <input type="hidden" name="field" value="archive"> |
| 183 | <label for="archive">Archived (read-only)</label> | 183 | <label for="archive">Archived (read-only)</label> |
| 184 | <input type="checkbox" id="archive" name="archive" value="on"{{if .Repo.Settings.Archived}} checked{{end}}> | 184 | <input type="checkbox" id="archive" name="archive" value="on"{{if .Repo.Settings.Archived}} checked{{end}}> |
| 185 | <button type="submit">Save</button> | 185 | <button type="submit">Save archive</button> |
| 186 | </form> | 186 | </form> |
| 187 | <p class="meta">Deleting or transferring a repository is a CLI operation: | 187 | <p class="meta">Deleting or transferring a repository is a CLI operation: |
| 188 | <code>gitbay repo delete {{.Repo.OwnerName}}/{{.Repo.Name}} --yes</code></p> | 188 | <code>gitbay repo delete {{.Repo.OwnerName}}/{{.Repo.Name}} --yes</code></p> |