mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-06 12:01:41 +00:00
Implemented tree view
Using library bootstrap-treeview - part category tree - stock location tree - Currenly is functional but looks terrible
This commit is contained in:
@@ -15,9 +15,7 @@
|
||||
|
||||
{% block css %}
|
||||
{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
<title>
|
||||
@@ -31,22 +29,42 @@ InvenTree
|
||||
|
||||
{% include "navbar.html" %}
|
||||
|
||||
<div class="container container-fluid inventree-content">
|
||||
<div class='main body wrapper'>
|
||||
|
||||
{% include "sidebar.html" %}
|
||||
|
||||
<div class="container container-fluid inventree-content" id='inventree-content'>
|
||||
{% block content %}
|
||||
<!-- Each view fills in here.. -->
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Scripts -->
|
||||
<script type="text/javascript" src="{% static 'script/jquery_3.3.1_jquery.min.js' %}"></script>
|
||||
<script type="text/javascript" src="{% static 'script/bootstrap.min.js' %}"></script>
|
||||
<script type="text/javascript" src="{% static 'script/select2/select2.js' %}"></script>
|
||||
<script type='text/javascript' src="{% static 'script/bootstrap-treeview.js' %}"></script>
|
||||
<script type='text/javascript' src="{% static 'script/trees.js' %}"></script>
|
||||
<script type='text/javascript' src="{% static 'script/sidenav.js' %}"></script>
|
||||
|
||||
{% block js_load %}
|
||||
{% endblock %}
|
||||
|
||||
<script type='text/javascript'>
|
||||
$(document).ready(function () {
|
||||
|
||||
loadTree("{% url 'api-part-tree' %}",
|
||||
"#part-tree");
|
||||
|
||||
loadTree("{% url 'api-stock-tree' %}",
|
||||
"#stock-tree");
|
||||
|
||||
$('#logo').click(function() {
|
||||
openSideNav();
|
||||
});
|
||||
|
||||
{% block js_ready %}
|
||||
|
||||
{% endblock %}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
{% load static %}
|
||||
|
||||
<nav class="navbar navbar-default">
|
||||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand" href="/"><img src="{% static 'img/inventree.png' %}" width="40" height="40"/></a>
|
||||
<a class="navbar-brand" id='logo'><img src="{% static 'img/inventree.png' %}" width="40" height="40"/></a>
|
||||
</div>
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="{% url 'part-index' %}">Parts</a></li>
|
||||
|
9
InvenTree/templates/sidebar.html
Normal file
9
InvenTree/templates/sidebar.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<div class='sidenav' id='sidenav'>
|
||||
|
||||
<div id='part-tree'></div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div id='stock-tree'></div>
|
||||
|
||||
</div>
|
Reference in New Issue
Block a user