1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{{define "content" -}}
<h2>
<a href="/~{{.Repo.OwnerName}}/{{.Repo.Name}}">~{{.Repo.OwnerName}}/{{.Repo.Name}}</a>
· settings
</h2>
{{if .Error}}<div class="alert alert-danger">{{.Error}}</div>{{end}}
{{if .Notice}}<div class="alert alert-success">{{.Notice}}</div>{{end}}
<h4>General</h4>
<form method="POST">
<input type="hidden" name="action" value="update">
<div class="form-group">
<label for="description">Description</label>
<input type="text" class="form-control" name="description" id="description"
value="{{.Repo.Description}}" maxlength="1024">
</div>
<div class="form-group">
<label for="visibility">Visibility</label>
<select class="form-control" name="visibility" id="visibility">
<option value="PUBLIC" {{if eq (printf "%s" .Repo.Visibility) "PUBLIC"}}selected{{end}}>Public</option>
<option value="UNLISTED" {{if eq (printf "%s" .Repo.Visibility) "UNLISTED"}}selected{{end}}>Unlisted</option>
<option value="PRIVATE" {{if eq (printf "%s" .Repo.Visibility) "PRIVATE"}}selected{{end}}>Private</option>
</select>
</div>
<button type="submit" class="btn btn-primary">Save</button>
</form>
<div class="header-extension"></div>
<h4>Access control</h4>
{{if .ACL}}
<table class="table">
<thead><tr><th>User</th><th>Mode</th><th></th></tr></thead>
<tbody>
{{range .ACL}}
<tr>
<td>~{{.Username}}</td>
<td>{{.Mode}}</td>
<td>
<form method="POST" style="display:inline">
<input type="hidden" name="action" value="acl_remove">
<input type="hidden" name="user_id" value="{{.UserID}}">
<button type="submit" class="btn btn-sm btn-danger">Remove</button>
</form>
</td>
</tr>
{{end}}
</tbody>
</table>
{{else}}
<p class="text-muted">No collaborators.</p>
{{end}}
<form method="POST" class="form-inline">
<input type="hidden" name="action" value="acl_add">
<input type="text" class="form-control mr-2" name="username" placeholder="username" required>
<select class="form-control mr-2" name="mode">
<option value="RO">Read-only</option>
<option value="RW">Read-write</option>
</select>
<button type="submit" class="btn btn-primary">Add collaborator</button>
</form>
<div class="header-extension"></div>
<h4 class="text-danger">Danger zone</h4>
<p>Deleting a database removes its metadata and its on-disk store permanently.</p>
<form method="POST" onsubmit="return confirm('Delete {{.Repo.Name}}? This cannot be undone.')">
<input type="hidden" name="action" value="delete">
<div class="form-group">
<label for="confirm_name">Type <code>{{.Repo.Name}}</code> to confirm</label>
<input type="text" class="form-control" name="confirm_name" id="confirm_name" autocomplete="off">
</div>
<button type="submit" class="btn btn-danger">Delete database</button>
</form>
{{- end}}