112 lines
No EOL
4.5 KiB
HTML
112 lines
No EOL
4.5 KiB
HTML
{% import "fragments/_breadcrumb_fragment.html" as breadcrumbs %}
|
|
{% import "fragments/_icon_fragment.html" as icons %}
|
|
{% import "fragments/_link_fragment.html" as links %}
|
|
{% import "fragments/_table_fragment.html" as tables %}
|
|
|
|
<!-- templates/layout.html -->
|
|
<!doctype html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{% block title %}Inventory{% endblock %}</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/css/bootstrap.min.css" rel="stylesheet"
|
|
integrity="sha384-4Q6Gf2aSP4eDXB8Miphtr37CMZZQ5oXLH2yaXMJ2w8e2ZtHTl7GptT4jmndRuHDT" crossorigin="anonymous">
|
|
<link
|
|
href="https://cdn.datatables.net/v/bs5/jq-3.7.0/moment-2.29.4/dt-2.3.2/b-3.2.3/b-colvis-3.2.3/b-print-3.2.3/cr-2.1.1/cc-1.0.4/r-3.0.4/rg-1.5.1/rr-1.5.0/sc-2.4.3/sr-1.4.1/datatables.min.css"
|
|
rel="stylesheet" integrity="sha384-gdnBcErvPbrURVoR9w3NhVMliw+ZmcTCmq+64xj2Ksx21nRJFX3qW0zFvBotL5rm"
|
|
crossorigin="anonymous">
|
|
<style>
|
|
{
|
|
% block style %
|
|
}
|
|
|
|
.sticky-top {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 1020;
|
|
}
|
|
|
|
table td,
|
|
th {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
input[type="checkbox"][disabled] {
|
|
pointer-events: none;
|
|
opacity: 1;
|
|
filter: none;
|
|
appearance: auto;
|
|
-webkit-appearance: checkbox;
|
|
background-color: white !important;
|
|
color: black !important;
|
|
}
|
|
|
|
input[type="checkbox"][disabled]::-moz-checkbox {
|
|
background-color: white;
|
|
}
|
|
|
|
{
|
|
% endblock %
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body class="bg-tertiary text-primary-emphasis">
|
|
<nav class="navbar navbar-expand bg-body-tertiary border-bottom">
|
|
<div class="container-fluid">
|
|
<a class="navbar-brand" href="{{ url_for('index') }}">
|
|
Inventory Manager
|
|
</a>
|
|
<button class="navbar-toggler">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navbarNav">
|
|
<ul class="navbar-nav me-auto">
|
|
{{ links.navigation_link(endpoint = 'inventory_index', label = 'Inventory') }}
|
|
{{ links.navigation_link(endpoint = 'list_users', label = 'Users') }}
|
|
{{ links.navigation_link(endpoint = 'list_worklog', label = 'Worklog') }}
|
|
</ul>
|
|
<form class="d-flex" method="GET" action="{{ url_for('main.search') }}">
|
|
<input type="text" class="form-control me-2" placeholder="Search" name="q" id="search" />
|
|
<button class="btn btn-primary" type="submit" id="searchButton" disabled>Search</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<main class="container-flex m-5">{% block content %}{% endblock %}</main>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/js/bootstrap.bundle.min.js"
|
|
integrity="sha384-j1CDi7MgGQ12Z7Qab0qlWQ/Qqz24Gc6BM0thvEMVjHnfYGF0rmFCozFSxQBxwHKO"
|
|
crossorigin="anonymous"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js"
|
|
integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww=="
|
|
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
|
|
<script
|
|
src="https://cdn.datatables.net/v/bs5/jq-3.7.0/moment-2.29.4/dt-2.3.2/b-3.2.3/b-colvis-3.2.3/b-print-3.2.3/cr-2.1.1/cc-1.0.4/r-3.0.4/rg-1.5.1/rr-1.5.0/sc-2.4.3/sr-1.4.1/datatables.min.js"
|
|
integrity="sha384-tNYRX2RiDDDRKCJgPF8Pw3rTxC1GUe1pt5qH1SBmwcazrEUj7Ii4C1Tz9wCCRUI4"
|
|
crossorigin="anonymous"></script>
|
|
<script src="{{ url_for('static', filename='js/datalist.js') }}"></script>
|
|
<script>
|
|
const searchInput = document.querySelector('#search');
|
|
const searchButton = document.querySelector('#searchButton');
|
|
|
|
searchInput.addEventListener('input', () => {
|
|
searchButton.disabled = searchInput.value.trim() === '';
|
|
});
|
|
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
$('table[id^="datatable-"]').DataTable({
|
|
pageLength: 25,
|
|
lengthChange: false,
|
|
ordering: true,
|
|
stateSave: true
|
|
})
|
|
})
|
|
{% block script %} {% endblock %}
|
|
</script>
|
|
</body>
|
|
|
|
</html> |