mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Working on navbar
This commit is contained in:
parent
c6ceea4d45
commit
1e31774ce7
@ -128,6 +128,10 @@
|
||||
object-fit: fill;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
float: left;
|
||||
}
|
||||
@ -250,6 +254,19 @@
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.label {
|
||||
display: inline;
|
||||
font-size: 75%;
|
||||
line-height: 1;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
color: white;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
border-radius: .25em;
|
||||
}
|
||||
|
||||
.label-red {
|
||||
background: var(--label-red);
|
||||
}
|
||||
@ -639,6 +656,7 @@
|
||||
padding-right: 10px;
|
||||
padding-top: 5px;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
display: inline-block;
|
||||
transition: 0.1s;
|
||||
}
|
||||
@ -929,13 +947,19 @@ input[type="submit"] {
|
||||
|
||||
.panel-heading {
|
||||
padding: 5px 10px;
|
||||
background-color: #fafafa;
|
||||
padding-left: 15px;
|
||||
padding-top: 10px;
|
||||
color: #333;
|
||||
background-color: #dcdcdc;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.panel-inventree {
|
||||
padding: 10px;
|
||||
box-shadow: 2px 2px #DDD;
|
||||
border-color: #ccc;
|
||||
margin-bottom: 20px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.panel-hidden {
|
||||
|
@ -111,7 +111,7 @@ function inventreeDocReady() {
|
||||
|
||||
modal.modal({
|
||||
backdrop: 'static',
|
||||
keyboard: 'false',
|
||||
keyboard: true,
|
||||
});
|
||||
|
||||
modal.modal('show');
|
||||
|
@ -4,10 +4,11 @@
|
||||
|
||||
{% settings_value 'BARCODE_ENABLE' as barcodes %}
|
||||
|
||||
<nav class="navbar navbar-xs navbar-default navbar-fixed-top ">
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header clearfix content-heading">
|
||||
<a class="navbar-brand" id='logo' href="{% url 'index' %}" style="padding-top: 7px; padding-bottom: 5px;"><img src="{% static 'img/inventree.png' %}" width="32" height="32" style="display:block; margin: auto;"/></a>
|
||||
<!--
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">{% trans "Toggle navigation" %}</span>
|
||||
@ -16,89 +17,103 @@
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<ul class="navbar-nav">
|
||||
{% if roles.part.view %}
|
||||
<li><a href="{% url 'part-index' %}"><span class='fas fa-shapes icon-header'></span>{% trans "Parts" %}</a></li>
|
||||
<li class='nav-item'>
|
||||
<a class='nav-link' href="{% url 'part-index' %}">
|
||||
<span class='fas fa-shapes icon-header'></span>{% trans "Parts" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if roles.stock.view %}
|
||||
<li><a href="{% url 'stock-index' %}"><span class='fas fa-boxes icon-header'></span>{% trans "Stock" %}</a></li>
|
||||
<li class='nav-item'>
|
||||
<a class='nav-link' href="{% url 'stock-index' %}">
|
||||
<span class='fas fa-boxes icon-header'></span>{% trans "Stock" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if roles.build.view %}
|
||||
<li><a href="{% url 'build-index' %}"><span class='fas fa-tools icon-header'></span>{% trans "Build" %}</a></li>
|
||||
<li class='nav-item'>
|
||||
<a class='nav-link' href="{% url 'build-index' %}">
|
||||
<span class='fas fa-tools icon-header'></span>{% trans "Build" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if roles.purchase_order.view %}
|
||||
<li class='nav navbar-nav'>
|
||||
<a class='dropdown-toggle' data-toggle='dropdown' href='#'><span class='fas fa-shopping-cart icon-header'></span>{% trans "Buy" %}</a>
|
||||
<ul class='dropdown-menu'>
|
||||
<li><a href="{% url 'supplier-index' %}"><span class='fas fa-building icon-header'></span>{% trans "Suppliers" %}</a></li>
|
||||
<li><a href="{% url 'manufacturer-index' %}"><span class='fas fa-industry icon-header'></span>{% trans "Manufacturers" %}</a></li>
|
||||
<li><a href="{% url 'po-index' %}"><span class='fas fa-list icon-header'></span>{% trans "Purchase Orders" %}</a></li>
|
||||
<li class='nav-item dropdown'>
|
||||
<a class='nav-link dropdown-toggle' href='#' id='buyMenuDropdown' role='button' data-bs-toggle='dropdown'>
|
||||
<span class='fas fa-shopping-cart icon-header'></span>{% trans "Buy" %}
|
||||
</a>
|
||||
<ul class='dropdown-menu' aria-labelledby="buyMenuDropdown">
|
||||
<li><a class='dropdown-item' href="{% url 'supplier-index' %}"><span class='fas fa-building icon-header'></span>{% trans "Suppliers" %}</a></li>
|
||||
<li><a class='dropdown-item' href="{% url 'manufacturer-index' %}"><span class='fas fa-industry icon-header'></span>{% trans "Manufacturers" %}</a></li>
|
||||
<li><a class='dropdown-item' href="{% url 'po-index' %}"><span class='fas fa-list icon-header'></span>{% trans "Purchase Orders" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if roles.sales_order.view %}
|
||||
<li class='nav navbar-nav'>
|
||||
<a class='dropdown-toggle' data-toggle='dropdown' href='#'><span class='fas fa-truck icon-header'></span>{% trans "Sell" %}</a>
|
||||
<li class='nav-item dropdown'>
|
||||
<a class='nav-link dropdown-toggle' href='#' id='sellMenuDropdown' role='button' data-bs-toggle='dropdown'>
|
||||
<span class='fas fa-truck icon-header'></span>{% trans "Sell" %}
|
||||
</a>
|
||||
<ul class='dropdown-menu'>
|
||||
<li><a href="{% url 'customer-index' %}"><span class='fas fa-user-tie icon-header'></span>{% trans "Customers" %}</a>
|
||||
<li><a href="{% url 'so-index' %}"><span class='fas fa-list icon-header'></span>{% trans "Sales Orders" %}</a></li>
|
||||
<li><a class='dropdown-item' href="{% url 'customer-index' %}"><span class='fas fa-user-tie icon-header'></span>{% trans "Customers" %}</a>
|
||||
<li><a class='dropdown-item' href="{% url 'so-index' %}"><span class='fas fa-list icon-header'></span>{% trans "Sales Orders" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{% include "search_form.html" %}
|
||||
{% if barcodes %}
|
||||
<li id='navbar-barcode-li'>
|
||||
<button id='barcode-scan' class='btn btn-default' title='{% trans "Scan Barcode" %}'>
|
||||
<span class='fas fa-qrcode'></span>
|
||||
</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class='dropdown'>
|
||||
<a class='dropdown-toggle' data-toggle='dropdown' href="#">
|
||||
{% if user.is_staff %}
|
||||
{% if not system_healthy %}
|
||||
<span class='fas fa-exclamation-triangle icon-red'></span>
|
||||
{% elif not up_to_date %}
|
||||
<span class='fas fa-info-circle icon-green'></span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<span class="fas fa-user"></span> <strong>{{ user.get_username }}</strong></a>
|
||||
<ul class='dropdown-menu'>
|
||||
{% if user.is_authenticated %}
|
||||
{% if user.is_staff %}
|
||||
<li><a href="/admin/"><span class="fas fa-user"></span> {% trans "Admin" %}</a></li>
|
||||
{% endif %}
|
||||
<li><a href="{% url 'account_logout' %}"><span class="fas fa-sign-out-alt"></span> {% trans "Logout" %}</a></li>
|
||||
{% else %}
|
||||
<li><a href="{% url 'account_login' %}"><span class="fas fa-sign-in-alt"></span> {% trans "Login" %}</a></li>
|
||||
{% endif %}
|
||||
<hr>
|
||||
<li><a href="{% url 'settings' %}"><span class="fas fa-cog"></span> {% trans "Settings" %}</a></li>
|
||||
<li id='launch-stats'><a href='#'>
|
||||
{% if system_healthy or not user.is_staff %}
|
||||
<span class='fas fa-server'></span>
|
||||
{% else %}
|
||||
<span class='fas fa-server icon-red'></span>
|
||||
{% endif %}
|
||||
</span> {% trans "System Information" %}
|
||||
</a></li>
|
||||
<li id='launch-about'>
|
||||
<a href='#'>
|
||||
{% if up_to_date %}
|
||||
<span class="fas fa-info-circle">
|
||||
{% else %}
|
||||
<span class='fas fa-info-circle icon-red'>
|
||||
{% endif %}
|
||||
</span> {% trans "About InvenTree" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% include "search_form.html" %}
|
||||
<ul class='navbar-nav'>
|
||||
{% if barcodes %}
|
||||
<li id='navbar-barcode-li'>
|
||||
<button id='barcode-scan' class='btn btn-secondary' title='{% trans "Scan Barcode" %}'>
|
||||
<span class='fas fa-qrcode'></span>
|
||||
</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class='nav-item dropdown'>
|
||||
<a class='nav-link dropdown-toggle' href='#' id='userMenuDropdown' role='button' data-bs-toggle='dropdown'>
|
||||
<span class='fas fa-user'></span> <strong>{{ user.get_username }}</strong>
|
||||
</a>
|
||||
<ul class='dropdown-menu dropdown-menu-end'>
|
||||
{% if user.is_authenticated %}
|
||||
{% if user.is_staff %}
|
||||
<li><a class='dropdown-item' href="/admin/"><span class="fas fa-user"></span> {% trans "Admin" %}</a></li>
|
||||
{% endif %}
|
||||
<li><a class='dropdown-item' href="{% url 'account_logout' %}"><span class="fas fa-sign-out-alt"></span> {% trans "Logout" %}</a></li>
|
||||
{% else %}
|
||||
<li><a class='dropdown-item' href="{% url 'account_login' %}"><span class="fas fa-sign-in-alt"></span> {% trans "Login" %}</a></li>
|
||||
{% endif %}
|
||||
<hr>
|
||||
<li><a class='dropdown-item' href="{% url 'settings' %}"><span class="fas fa-cog"></span> {% trans "Settings" %}</a></li>
|
||||
<li id='launch-stats'>
|
||||
<a class='dropdown-item' href='#'>
|
||||
{% if system_healthy or not user.is_staff %}
|
||||
<span class='fas fa-server'></span>
|
||||
{% else %}
|
||||
<span class='fas fa-server icon-red'></span>
|
||||
{% endif %}
|
||||
{% trans "System Information" %}
|
||||
</a>
|
||||
</li>
|
||||
<li id='launch-about'>
|
||||
<a class='dropdown-item' href='#'>
|
||||
{% if up_to_date %}
|
||||
<span class="fas fa-info-circle"></span>
|
||||
{% else %}
|
||||
<span class='fas fa-info-circle icon-red'></span>
|
||||
{% endif %}
|
||||
{% trans "About InvenTree" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
@ -1,11 +1,9 @@
|
||||
{% load i18n %}
|
||||
|
||||
<form class="navbar-form navbar-left" action="{% url 'search' %}" method='post'>
|
||||
<form class="d-flex" action="{% url 'search' %}" method='post'>
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<input type="text" name='search' class="form-control" id="search-bar" placeholder="{% trans 'Search' %}"{% if query_text %} value="{{ query }}"{% endif %}>
|
||||
</div>
|
||||
<button type="submit" id='search-submit' class="btn btn-default" title='{% trans "Search" %}'>
|
||||
<input type="text" name='search' class="form-control" aria-label='{% trans "Search" %}' id="search-bar" placeholder="{% trans 'Search' %}"{% if query_text %} value="{{ query }}"{% endif %}>
|
||||
<button type="submit" id='search-submit' class="btn btn-secondary" title='{% trans "Search" %}'>
|
||||
<span class='fas fa-search'></span>
|
||||
</button>
|
||||
</form>
|
||||
|
Loading…
Reference in New Issue
Block a user