feat(webui): implement state versions list
This commit is contained in:
parent
80958d5b0f
commit
26e10a9399
12 changed files with 195 additions and 10 deletions
|
@ -12,11 +12,10 @@
|
|||
<span>Login</span>
|
||||
</a>
|
||||
{{ else }}
|
||||
<a href="/states"{{ if eq .Page.Section "states" }} class="active"{{ end}}>
|
||||
<a href="/states"{{ if eq .Page.Section "states" }} class="fill"{{ end}}>
|
||||
<i>home_storage</i>
|
||||
<span>States</span>
|
||||
</a>
|
||||
<hr>
|
||||
<a href="/logout">
|
||||
<i>logout</i>
|
||||
<span>Logout</span>
|
||||
|
@ -39,6 +38,11 @@
|
|||
<nav class="bottom s">{{ template "nav" . }}</nav>
|
||||
<header>
|
||||
<nav>
|
||||
{{ if ne .Page.Precedent "" }}
|
||||
<a href="{{ .Page.Precedent }}" class="button circle chip">
|
||||
<i>arrow_back</i>
|
||||
</a>
|
||||
{{ end }}
|
||||
<h5 class="max center-align">{{ .Page.Title }}</h5>
|
||||
</nav>
|
||||
</header>
|
||||
|
|
30
pkg/webui/html/state.html
Normal file
30
pkg/webui/html/state.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
{{ define "main" }}
|
||||
<main class="responsive" id="main">
|
||||
<p>
|
||||
Locked:
|
||||
{{ if eq .State.Lock nil }}no{{ else }}
|
||||
<span>yes</span>
|
||||
<div class="tooltip left max">
|
||||
<b>Lock</b>
|
||||
<p>{{ .State.Lock }}</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
</p>
|
||||
<table class="clickable-rows no-space">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>By</th>
|
||||
<th>Created</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range .Versions }}
|
||||
<tr>
|
||||
<td><a href="/version/{{ .Id }}">{{ index $.Usernames .AccountId }}</a></td>
|
||||
<td><a href="/version/{{ .Id }}">{{ .Created }}</a></td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</main>
|
||||
{{ end }}
|
|
@ -1,6 +1,6 @@
|
|||
{{ define "main" }}
|
||||
<main class="responsive" id="main">
|
||||
<table class="clickable-rows no-space stripes">
|
||||
<table class="clickable-rows no-space">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Path</th>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue