2021-07-30 20:52:18 +02:00
|
|
|
{% load static %}
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
|
2021-08-07 17:37:36 +02:00
|
|
|
<link href="{% static 'css/icons/bootstrap-icons.css' %}" rel="stylesheet">
|
2021-11-09 14:50:57 +01:00
|
|
|
<link href="{% static 'css/shimatta-kenkyusho-base.css' %}" rel="stylesheet">
|
2021-07-30 20:52:18 +02:00
|
|
|
<title>{{ base.title }}</title>
|
2021-11-11 20:51:02 +01:00
|
|
|
<script type="text/javascript">
|
|
|
|
const fallback_img_path = "{% static 'css/icons/card-image.svg' %}";
|
|
|
|
</script>
|
2021-07-30 20:52:18 +02:00
|
|
|
{% block customhead %}
|
|
|
|
{% endblock customhead %}
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<nav class="navbar navbar-expand-lg bg-dark navbar-dark">
|
|
|
|
<div class="container">
|
|
|
|
<a href="/" class="navbar-brand">{{ base.navbar.brand }}</a>
|
|
|
|
|
|
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navmenu">
|
|
|
|
<span class="navbar-toggler-icon"></span>
|
|
|
|
</button>
|
|
|
|
<div class="collapse navbar-collapse" id="navmenu">
|
|
|
|
<ul class="navbar-nav">
|
|
|
|
{% for item in base.navbar.navitems %}
|
|
|
|
<li class="nav-item"><a href="{{ item.link }}" class="nav-link {{ item.active_class }}">{{ item }}</a></li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2021-08-07 17:37:36 +02:00
|
|
|
{% if base.navbar.has_user %}
|
2021-08-14 00:25:19 +02:00
|
|
|
<form action="" method="post" class="ms-auto" autocomplete="off">
|
2021-08-07 17:37:36 +02:00
|
|
|
{% csrf_token %}
|
|
|
|
<input type="search" name="qr_search" id="qr_search_field" aria-label="QR Scan" placeholder="QR Search" class="form-control me-2 text-success">
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
2021-07-30 20:52:18 +02:00
|
|
|
<ul class="navbar-nav ms-auto">
|
|
|
|
{% if base.navbar.has_user %}
|
|
|
|
<li class="nav-item dropdown">
|
|
|
|
<a href="#" class="nav-link dropdown-toggle text-primary" id="navbar-user-dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">{{ base.navbar.username }}</a>
|
|
|
|
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbar-user-dropdown">
|
2021-11-09 16:35:11 +01:00
|
|
|
<li><a class="dropdown-item" href="{% url 'change-pw' %}">Change Password</a></li>
|
2021-08-07 17:37:36 +02:00
|
|
|
<li><a class="dropdown-item" href="{% url 'logout' %}">Logout</a></li>
|
2021-08-07 19:50:16 +02:00
|
|
|
<li><a class="dropdown-item" href="{% url 'api-root' %}">REST API</a></li>
|
2021-07-30 20:52:18 +02:00
|
|
|
{% if base.navbar.show_admin %}
|
2021-08-07 17:37:36 +02:00
|
|
|
<li><a class="dropdown-item text-success" href="{% url 'admin:index' %}">Administration</a></li>
|
2021-07-30 20:52:18 +02:00
|
|
|
{% endif %}
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
{% else %}
|
2021-08-07 17:37:36 +02:00
|
|
|
<li class="nav-item"><a href="{% url 'login' %}" class="nav-link{% if base.login_active %} active{% endif %}">Login</a></li>
|
2021-07-30 20:52:18 +02:00
|
|
|
{% endif %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
{% block content %}
|
|
|
|
{% endblock content %}
|
|
|
|
|
|
|
|
<script type="text/javascript" src="{% static 'js/bootstrap.bundle.min.js' %}"></script>
|
2021-10-26 19:56:20 +02:00
|
|
|
<!--<script type="text/javascript" src="{% static 'js/autocomplete.min.js' %}"></script>-->
|
|
|
|
<script type="text/javascript" src="{% static 'js/csrf-token.js' %}"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
const api_urls_v1 = {
|
|
|
|
'user-list': '{% url 'user-list' %}',
|
|
|
|
'groups-list': '{% url 'user-list' %}',
|
|
|
|
'storage-list': '{% url 'storage-list' %}',
|
2024-11-10 20:46:45 +01:00
|
|
|
'storage-template-list': '{% url 'storage-template-list' %}',
|
2021-10-26 19:56:20 +02:00
|
|
|
'component-list': '{% url 'component-list' %}',
|
|
|
|
'package-list': '{% url 'package-list' %}',
|
|
|
|
'stock-list': '{% url 'stock-list' %}',
|
|
|
|
'distributor-list': '{% url 'distributor-list' %}',
|
2021-11-11 20:51:02 +01:00
|
|
|
'manufacturer-list': '{% url 'manufacturer-list' %}',
|
|
|
|
'component-type-list': '{% url 'componenttype-list' %}',
|
|
|
|
'component-parameter-type-list': '{% url 'componentparametertype-list' %}',
|
2021-10-26 19:56:20 +02:00
|
|
|
};
|
|
|
|
</script>
|
2024-11-23 17:12:37 +01:00
|
|
|
<script type="text/javascript" src="{% static 'js/kenkyusho-api-v1.js' %}"></script>
|
2021-10-29 21:18:20 +02:00
|
|
|
<script type="text/javascript" src="{% static 'js/autocomplete.js' %}"></script>
|
2022-01-01 17:18:08 +01:00
|
|
|
<script type="text/javascript" src="{% static 'js/autocomplete-foreign-key-field.js' %}"></script>
|
2024-11-17 21:44:30 +01:00
|
|
|
<!-- Initialize bootstrap popovers -->
|
|
|
|
<script type="text/javascript">
|
|
|
|
const popoverTriggerList = document.querySelectorAll('[data-bs-toggle="popover"]')
|
|
|
|
const popoverList = [...popoverTriggerList].map(popoverTriggerEl => new bootstrap.Popover(popoverTriggerEl))
|
|
|
|
</script>
|
2024-11-19 00:39:15 +01:00
|
|
|
<!-- Select search field on start of QR scan if no input is currently selevted([) -->
|
2024-11-18 23:55:12 +01:00
|
|
|
<script type="text/javascript">
|
|
|
|
window.addEventListener("keydown", (event)=>{
|
2024-11-19 00:39:15 +01:00
|
|
|
if (document.activeElement.nodeName != 'INPUT' && event.key == '[') {
|
2024-11-18 23:55:12 +01:00
|
|
|
document.getElementById("qr_search_field").focus()
|
|
|
|
}
|
|
|
|
})
|
|
|
|
</script>
|
2021-10-24 21:14:11 +02:00
|
|
|
{% block custom_scripts %}
|
|
|
|
{% endblock custom_scripts %}
|
|
|
|
|
2021-07-30 20:52:18 +02:00
|
|
|
</body>
|
2024-11-23 17:12:37 +01:00
|
|
|
</html>
|