~bigbes/sr-ht-dolt

ref: cdb9195f8ddc7ec1026122d43ba5a318445af7ea sr-ht-dolt/web/templates/tree.html -rw-r--r-- 1011 bytes
cdb9195f — Eugene Blikh mcpsrv: a bad commit-log cursor is a miss, not a fault 5 days 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
26
27
28
29
30
31
32
{{define "content" -}}
<h2><a href="/~{{.Repo.OwnerName}}/{{.Repo.Name}}">~{{.Repo.OwnerName}}/{{.Repo.Name}}</a> &middot; tree</h2>
{{template "viewtabs" (dict "Repo" .Repo "Views" .Views "Current" "tables" "Ref" .Ref)}}
<p class="text-muted">Tables at <code>{{.Ref}}</code></p>

{{if .Tables}}
{{range .Tables}}
<div class="header-extension"></div>
<h4>{{icon "folder"}} {{.Name}} <small class="text-muted">{{.RowCount}} rows</small>
  <a class="btn btn-sm btn-secondary"
     href="/~{{$.Repo.OwnerName}}/{{$.Repo.Name}}/table/{{$.Ref}}/{{.Name}}">rows</a>
</h4>
<table class="table table-sm">
  <thead>
    <tr><th>Column</th><th>Type</th><th>Key</th><th>Null</th></tr>
  </thead>
  <tbody>
    {{range .Columns}}
    <tr>
      <td><code>{{.Name}}</code></td>
      <td>{{.Type}}</td>
      <td>{{if .PrimaryKey}}PK{{end}}</td>
      <td>{{if .Nullable}}yes{{else}}no{{end}}</td>
    </tr>
    {{end}}
  </tbody>
</table>
{{end}}
{{else}}
<p class="text-muted">No tables at this ref.</p>
{{end}}
{{- end}}