- category wip

This commit is contained in:
2023-05-08 20:05:07 +02:00
parent 95ec75b8d7
commit 4ce9dae7ab
4 changed files with 58 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<%~ E.includeFile("partials/head.eta.html", {"title": "Settings - Category"}) %> <%~ E.includeFile("partials/controls.eta.html", {"active": "SETT_CAT"}) %>
<h1>All categories</h1>
<div class="container">
<!-- Create new category button -->
<div class="row">
<div class="col-12">
<a href="/settings/category/new" class="btn btn-primary">Create new category</a>
</div>
</div>
<!-- Table with all categories -->
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Name</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<% it.items.forEach(function(user){ %>
<tr>
<th scope="row"><%= user.id %></th>
<td><%= user.name %></td>
<td><%= user.description %></td> </tr>
<% }) %>
</tbody>
</table>
</div>
<%~ E.includeFile("partials/controlsFoot.eta.html") %> <%~ E.includeFile("partials/foot.eta.html") %>

View File

@@ -93,6 +93,15 @@
<a class="nav-link <%= it.active == 'json_import' ? 'active' : ''%>" href="/import/json"> <i class="bi bi-filetype-json"></i>JSON Import </a>
</li>
</ul>
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
<span>Settings</span>
<a class="link-secondary" href="#" aria-label="Add a new report"> </a>
</h6>
<ul class="nav flex-column mb-2">
<li class="nav-item">
<a class="nav-link <%= it.active == 'SETT_CAT' ? 'active' : ''%>" href="/allCategories"><i class="bi bi-tag"></i> Manage categories </a>
</li>
</ul>
</div>
</nav>