UI fix
This commit is contained in:
1 parent
ee2a29cb36
commit
4f597505cc
30 files changed
+830
-305
No files matched your search
@@ -3,18 +3,24 @@
|
||||
<html lang="ru">
|
||||
<head>{{template "html_head" .}}</head>
|
||||
<body>
|
||||
{{template "page_header" .}}
|
||||
<main class="container-fluid py-3">
|
||||
<input type="checkbox" id="nav-toggle" class="nav-toggle">
|
||||
<div class="shell">
|
||||
{{template "sidebar_nav" .}}
|
||||
<div>
|
||||
{{template "topbar_mobile" .}}
|
||||
<main class="main">
|
||||
<div id="error-banner">{{template "banner_inner" .Banner}}</div>
|
||||
{{template "sites_content" .}}
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{{end}}
|
||||
|
||||
{{define "sites_content"}}
|
||||
<h1>Площадки</h1>
|
||||
<p class="muted">Ровно три слота (1, 2, 3) — жёсткое ограничение схемы БД control-api.
|
||||
<div class="topbar"><h1>Площадки</h1></div>
|
||||
<p class="muted" style="margin-bottom:16px">Ровно три слота (1, 2, 3) — жёсткое ограничение схемы БД control-api.
|
||||
Пустой слот — площадка не используется, входящие проверки для неё не ожидаются.</p>
|
||||
|
||||
<div id="sites-table-wrap">
|
||||
@@ -23,27 +29,31 @@
|
||||
{{end}}
|
||||
|
||||
{{define "sites_table"}}
|
||||
<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>
|
||||
<div class="panel">
|
||||
<div class="table-scroll">
|
||||
<table>
|
||||
<thead><tr><th>Слот</th><th>site_id</th><th></th></tr></thead>
|
||||
<tbody>
|
||||
{{range .Items}}
|
||||
<tr>
|
||||
<td>{{.Index}}</td>
|
||||
<td>
|
||||
<td class="num" data-label="Слот">{{.Index}}</td>
|
||||
<td data-label="site_id">
|
||||
<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>
|
||||
<input type="text" name="site_id" value="{{.SiteID}}" required>
|
||||
<button type="submit" class="btn btn-ghost btn-sm">Сохранить</button>
|
||||
</form>
|
||||
</td>
|
||||
<td class="actions-cell">
|
||||
<td data-label="">
|
||||
<div class="actions">
|
||||
{{if .SiteID}}
|
||||
<button class="btn btn-sm btn-outline-danger" hx-delete="/sites/{{.Index}}" hx-target="#sites-table-wrap" hx-swap="innerHTML" hx-confirm="Освободить слот {{.Index}}?">Очистить</button>
|
||||
<button class="btn btn-danger-ghost btn-sm" hx-delete="/sites/{{.Index}}" hx-target="#sites-table-wrap" hx-swap="innerHTML" hx-confirm="Освободить слот {{.Index}}?">Очистить</button>
|
||||
{{end}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
Reference in new issue
Block a user