2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 21:45:39 +00:00

Merge branch 'master' of https://github.com/inventree/InvenTree into matmair/issue2201

This commit is contained in:
Matthias
2021-11-01 12:35:25 +01:00
24 changed files with 101 additions and 137 deletions

View File

@ -7,6 +7,8 @@
{% inventree_title %} | {% trans "Index" %}
{% endblock %}
{% block breadcrumb_list %}
{% endblock %}
{% block sidebar %}
<!-- Sidebar data is filled dynamically for the index page-->

View File

@ -8,6 +8,9 @@
{% inventree_title %} | {% trans "Search Results" %}
{% endblock %}
{% block breadcrumb_list %}
{% endblock %}
{% block content %}
<div class='panel panel-inventree'>

View File

@ -1,10 +1,8 @@
{% load i18n %}
<div id='attachment-buttons'>
<div class='btn-group'>
<div class='filter-list' id='filter-list-related'>
<!-- An empty div in which the filter list will be constructed -->
</div>
<div class='btn-group' role='group'>
{% include "filter_list.html" with id="related" %}
</div>
</div>

View File

@ -0,0 +1 @@
<div class='filter-list d-flex flex-row form-row' id='filter-list-{{ id }}'><!-- Empty div for table filters --></div>

View File

@ -281,7 +281,7 @@ function setupFilterList(tableKey, table, target) {
// One blank slate, please
element.empty();
element.append(`<button id='reload-${tableKey}' title='{% trans "Reload data" %}' class='btn btn-outline-secondary filter-tag'><span class='fas fa-redo-alt'></span></button>`);
element.append(`<button id='reload-${tableKey}' title='{% trans "Reload data" %}' class='btn btn-outline-secondary filter-button'><span class='fas fa-redo-alt'></span></button>`);
// Callback for reloading the table
element.find(`#reload-${tableKey}`).click(function() {
@ -293,11 +293,10 @@ function setupFilterList(tableKey, table, target) {
return;
}
// If there are filters currently "in use", add them in!
element.append(`<button id='${add}' title='{% trans "Add new filter" %}' class='btn btn-outline-secondary filter-tag'><span class='fas fa-filter'></span></button>`);
element.append(`<button id='${add}' title='{% trans "Add new filter" %}' class='btn btn-outline-secondary filter-button'><span class='fas fa-filter'></span></button>`);
if (Object.keys(filters).length > 0) {
element.append(`<button id='${clear}' title='{% trans "Clear all filters" %}' class='btn btn-outline-secondary filter-tag'><span class='fas fa-backspace icon-red'></span></button>`);
element.append(`<button id='${clear}' title='{% trans "Clear all filters" %}' class='btn btn-outline-secondary filter-button'><span class='fas fa-backspace icon-red'></span></button>`);
}
for (var key in filters) {
@ -320,7 +319,7 @@ function setupFilterList(tableKey, table, target) {
html += generateAvailableFilterList(tableKey);
html += generateFilterInput(tableKey);
html += `<button title='{% trans "Create filter" %}' class='btn btn-outline-secondary filter-tag' id='${make}'><span class='fas fa-plus'></span></button>`;
html += `<button title='{% trans "Create filter" %}' class='btn btn-outline-secondary filter-button' id='${make}'><span class='fas fa-plus'></span></button>`;
element.append(html);

View File

@ -10,7 +10,10 @@
<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>
<div class="navbar-collapse collapse">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-objects" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse" id="navbar-objects">
<ul class="navbar-nav">
{% if roles.part.view %}
<li class='nav-item'>
@ -108,3 +111,7 @@
</div>
</nav>
{% if sticky %}
<div class='navbar-spacer'></div>
{% endif %}

View File

@ -57,4 +57,4 @@
{% block page_content %}
{% endblock %}
{% endblock %}
{% endblock %}

View File

@ -1,5 +1,5 @@
{% load i18n %}
<span title='{% trans text %}' class="list-group-item sidebar-list-group-item border-end-0 d-inline-block text-truncate" data-bs-parent="#sidebar">
<span title='{% trans text %}' class="list-group-item sidebar-list-group-item border-end-0 d-inline-block text-truncate bg-light" data-bs-parent="#sidebar">
<h6>
<i class="bi bi-bootstrap"></i>
{% if icon %}<span class='sidebar-item-icon fas {{ icon }}'></span>{% endif %}

View File

@ -67,9 +67,7 @@
{% endif %}
{% endif %}
{% endif %}
<div class='filter-list' id='filter-list-stock'>
<!-- An empty div in which the filter list will be constructed -->
</div>
{% include "filter_list.html" with id="stock" %}
</div>
</div>
</div>