A small IT asset inventory system built around a nested folder tree, matching the project brief: Go + html/template + Bootstrap 5 + vanilla JS, SQLite storage (WAL, FKs, migrations), embedded templates/static assets, single compiled binary. - AJAX-driven inventory tree: lazy-loaded folder expansion with per-user persisted expand state, drag-and-drop move for folders/assets, safe delete-with-relocate-or-cascade confirmation, search with breadcrumbs. - Assets: CRUD, duplicate, move, auto-generated IT-000001-style IDs, CSV import (with optional folder auto-create) and export. - Admin-defined item types with custom fields (text/long_text/number/date/ boolean/dropdown/url/ip_address). - Configurable statuses, session-based auth (bcrypt, secure cookies), admin/user roles, user management. - CLI: serve, version, database migrate, database backup; /healthz; graceful shutdown; Dockerfile/docker-compose/systemd unit; Go test suite.
34 lines
1.1 KiB
HTML
34 lines
1.1 KiB
HTML
{{define "panel_search"}}
|
|
<div class="panel-content p-3">
|
|
<nav aria-label="breadcrumb">
|
|
<ol class="breadcrumb mb-2">
|
|
<li class="breadcrumb-item"><a href="#" class="breadcrumb-link" data-type="root">Inventory</a></li>
|
|
<li class="breadcrumb-item active">Search: "{{.Query}}"</li>
|
|
</ol>
|
|
</nav>
|
|
|
|
<h5 class="mb-3">{{len .Results}} result(s) for "{{.Query}}"</h5>
|
|
|
|
{{if .Results}}
|
|
<div class="list-group">
|
|
{{range .Results}}
|
|
<a href="#" class="list-group-item list-group-item-action asset-link" data-id="{{.ID}}">
|
|
<div class="d-flex align-items-center">
|
|
<i class="bi {{iconOr .ItemTypeIcon "bi-box-seam"}} me-2 fs-5 text-body-secondary"></i>
|
|
<div>
|
|
<div class="fw-semibold">{{.AssetTag}} — {{.Name}}</div>
|
|
<div class="text-body-secondary small">
|
|
Inventory{{range .FolderPath}} / {{.Name}}{{end}}
|
|
</div>
|
|
</div>
|
|
<span class="badge text-bg-{{.StatusColor}} ms-auto">{{.StatusName}}</span>
|
|
</div>
|
|
</a>
|
|
{{end}}
|
|
</div>
|
|
{{else}}
|
|
<p class="text-body-secondary">No matches found.</p>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|