- Statuses can now be bulk-imported/updated via CSV (Name, Color columns; matches and updates existing statuses by name). New internal/statuses/csv.go, tested. - Icon fields (folder create/rename, item type form) are now a searchable dropdown of the 50 most common Bootstrap Icons instead of a free-text box, via a small reusable .icon-picker widget in app.js/app.css. - CSV asset import is now folder-scoped when triggered from the tree: right-click a folder (or its background) > Import CSV... imports every row directly into that folder, so the CSV needs no Folder column at all, and the option no longer appears at the top level. The original global, Folder-path-aware import (with auto-create-missing-folders) moved to a new admin-only Settings > Import / Export page, alongside the new Statuses import and format examples for both. assets.Import gained ImportOptions.TargetFolderID to drive the folder-scoped mode. - Site Name (Settings > General) now actually renders in the navbar brand and <title>, via a per-App "siteName" template func bound in loadTemplates. The brand is plain text now, not a link to /inventory.
54 lines
2.1 KiB
HTML
54 lines
2.1 KiB
HTML
{{define "layout"}}<!doctype html>
|
|
<html lang="en" data-bs-theme="light">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{{siteName}}</title>
|
|
<link rel="stylesheet" href="/static/css/bootstrap.min.css">
|
|
<link rel="stylesheet" href="/static/icons/bootstrap-icons.css">
|
|
<link rel="stylesheet" href="/static/css/app.css">
|
|
</head>
|
|
<body class="role-{{.User.Role}}">
|
|
<nav class="navbar navbar-expand-lg app-navbar border-bottom px-3">
|
|
<span class="navbar-brand fw-semibold d-flex align-items-center gap-2 mb-0">
|
|
<i class="bi bi-diagram-3-fill"></i> {{siteName}}
|
|
</span>
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navMain">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navMain">
|
|
<ul class="navbar-nav me-auto">
|
|
<li class="nav-item"><a class="nav-link" href="/inventory">Inventory</a></li>
|
|
</ul>
|
|
<ul class="navbar-nav">
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle d-flex align-items-center gap-1" href="#" role="button" data-bs-toggle="dropdown">
|
|
<i class="bi bi-person-circle"></i> {{.User.Username}}
|
|
{{if .User.IsAdmin}}<span class="badge text-bg-secondary ms-1">admin</span>{{end}}
|
|
</a>
|
|
<ul class="dropdown-menu dropdown-menu-end">
|
|
{{if .User.IsAdmin}}
|
|
<li><a class="dropdown-item" href="/settings"><i class="bi bi-gear me-2"></i>Settings</a></li>
|
|
<li><hr class="dropdown-divider"></li>
|
|
{{end}}
|
|
<li>
|
|
<form action="/logout" method="post" class="px-3 py-1">
|
|
<button type="submit" class="btn btn-sm btn-outline-secondary w-100">Sign out</button>
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
|
|
<main>
|
|
{{template "content" .}}
|
|
</main>
|
|
|
|
<script src="/static/js/bootstrap.bundle.min.js"></script>
|
|
<script src="/static/js/app.js"></script>
|
|
</body>
|
|
</html>
|
|
{{end}}
|