2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Display collapsible list of starred-parts on the index page

This commit is contained in:
Oliver Walters
2019-05-05 11:41:42 +10:00
parent aaff92ff9c
commit c75d892fd7
5 changed files with 29 additions and 1 deletions

View File

@ -3,6 +3,8 @@
{% block content %}
<h3>InvenTree</h3>
{% include "InvenTree/starred_parts.html" with collapse_id="starred" %}
{% if to_order %}
{% include "InvenTree/parts_to_order.html" with collapse_id="order" %}
{% endif %}
@ -19,4 +21,9 @@
{% block js_ready %}
{{ block.super }}
$("#to-build-table").bootstrapTable();
$("#to-order-table").bootstrapTable();
$("#starred-parts-table").bootstrapTable();
{% endblock %}

View File

@ -1,5 +1,6 @@
{% extends "collapse.html" %}
{% block collapse_title %}
<span class='glyphicon glyphicon-wrench'></span>
Parts to Build<span class='badge'>{{ to_build | length }}</span>
{% endblock %}

View File

@ -1,5 +1,6 @@
{% extends "collapse.html" %}
{% block collapse_title %}
<span class='glyphicon glyphicon-shopping-cart'></span>
Parts to Order<span class='badge'>{{ to_order | length }}</span>
{% endblock %}

View File

@ -0,0 +1,15 @@
{% extends "collapse.html" %}
{% block collapse_title %}
<span class='glyphicon glyphicon-star'></span>
Starred Parts<span class='badge'>{{ starred | length }}</span>
{% endblock %}
{% block collapse_heading %}
You have {{ starred | length }} favourite parts
{% endblock %}
{% block collapse_content %}
{% include "required_part_table.html" with parts=starred table_id="starred-parts-table" %}
{% endblock %}