use bootstrap 5 for UI, compact UI
This commit is contained in:
1 parent
37910e410b
commit
ee2a29cb36
18 files changed
+284
-161
No files matched your search
@@ -4,7 +4,7 @@
|
||||
<head>{{template "html_head" .}}</head>
|
||||
<body>
|
||||
{{template "page_header" .}}
|
||||
<main>
|
||||
<main class="container-fluid py-3">
|
||||
<div id="error-banner">{{template "banner_inner" .Banner}}</div>
|
||||
{{template "sites_content" .}}
|
||||
</main>
|
||||
@@ -23,25 +23,27 @@
|
||||
{{end}}
|
||||
|
||||
{{define "sites_table"}}
|
||||
<table role="grid">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm table-striped align-middle">
|
||||
<thead><tr><th>Слот</th><th>site_id</th><th>Действия</th></tr></thead>
|
||||
<tbody>
|
||||
{{range .Items}}
|
||||
<tr>
|
||||
<td>{{.Index}}</td>
|
||||
<td>
|
||||
<form hx-put="/sites/{{.Index}}" hx-target="#sites-table-wrap" hx-swap="innerHTML" style="display:flex;gap:.5rem;margin:0">
|
||||
<input type="text" name="site_id" value="{{.SiteID}}" style="margin:0" required>
|
||||
<button type="submit" class="secondary" style="margin:0">Сохранить</button>
|
||||
<form class="inline-form" hx-put="/sites/{{.Index}}" hx-target="#sites-table-wrap" hx-swap="innerHTML">
|
||||
<input type="text" name="site_id" value="{{.SiteID}}" class="form-control form-control-sm" required>
|
||||
<button type="submit" class="btn btn-sm btn-outline-secondary">Сохранить</button>
|
||||
</form>
|
||||
</td>
|
||||
<td class="actions-cell">
|
||||
{{if .SiteID}}
|
||||
<button class="contrast" hx-delete="/sites/{{.Index}}" hx-target="#sites-table-wrap" hx-swap="innerHTML" hx-confirm="Освободить слот {{.Index}}?">Очистить</button>
|
||||
<button class="btn btn-sm btn-outline-danger" hx-delete="/sites/{{.Index}}" hx-target="#sites-table-wrap" hx-swap="innerHTML" hx-confirm="Освободить слот {{.Index}}?">Очистить</button>
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
Reference in new issue
Block a user