~bigbes/sr-ht-dolt

ref: e518fcb9f9dee5fa16d539eaf7a9be9641f3e1f5 sr-ht-dolt/web/templates/partials.html -rw-r--r-- 644 bytes
e518fcb9 — Eugene Blikh cmd: doltsrht and doltsrht-migrate binaries, module tidy a month ago
                                                                                
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
{{define "visibilityBadge" -}}
{{if eq (printf "%s" .) "PUBLIC" -}}
<span class="badge badge-success">public</span>
{{- else if eq (printf "%s" .) "UNLISTED" -}}
<span class="badge badge-warning">unlisted</span>
{{- else -}}
<span class="badge badge-secondary">private</span>
{{- end}}
{{- end}}

{{define "repoList" -}}
{{if .}}
<div class="repo-list">
  {{range .}}
  <span>
    <a href="/~{{.OwnerName}}/{{.Name}}">~{{.OwnerName}}/{{.Name}}</a>
    {{template "visibilityBadge" .Visibility}}
  </span>
  <span class="text-muted">{{.Description}}</span>
  {{end}}
</div>
{{else}}
<p class="text-muted">No databases yet.</p>
{{end}}
{{- end}}