
- Introduced a new route for displaying available inventory items. - Sorted inventory items by identifier in both the list and available inventory routes. - Updated the inventory index template to include a link to the new available inventory route. - Cleaned up the layout by removing the toast container.
44 lines
No EOL
1.8 KiB
HTML
44 lines
No EOL
1.8 KiB
HTML
<!-- templates/inventory_index.html -->
|
|
{% extends "layout.html" %}
|
|
|
|
{% block title %}{{ title }}{% endblock %}
|
|
|
|
{% block content %}
|
|
{{ breadcrumbs.breadcrumb_header(
|
|
title=title
|
|
) }}
|
|
|
|
<div class="container">
|
|
{% if not category %}
|
|
<div class="row">
|
|
<div class="col">
|
|
<h2 class="display-6 text-center mt-5">Browse</h2>
|
|
</div>
|
|
</div>
|
|
<div class="row text-center">
|
|
{{ links.category_link(endpoint = 'list_inventory', label = "Full Listing", icon_html = icons.render_icon('table', 32)) }}
|
|
{{ links.category_link(endpoint = 'inventory_index', label = "By User", icon_html = icons.render_icon('person', 32), arguments = {'category': 'user'}) }}
|
|
{{ links.category_link(endpoint = 'inventory_index', label = 'By Location', icon_html = icons.render_icon('map', 32), arguments = {'category': 'location'}) }}
|
|
{{ links.category_link(endpoint = 'inventory_index', label = 'By Type', icon_html = icons.render_icon('motherboard', 32), arguments = {'category': 'type'}) }}
|
|
</div>
|
|
<div class="row">
|
|
<div class="col">
|
|
<h2 class="display-6 text-center mt-5">Reports</h2>
|
|
</div>
|
|
</div>
|
|
<div class="row text-center">
|
|
{{ links.category_link(endpoint = 'inventory_available', label = 'Available', icon_html = icons.render_icon('box-seam', 32)) }}
|
|
</div>
|
|
{% else %}
|
|
<div class="container">
|
|
{% for line in listing %}
|
|
<div class="row my-3">
|
|
{% for id, name in line %}
|
|
{{ links.category_link(endpoint = 'list_inventory', label = name, arguments = {'filter_by': category, 'id': id}) }}
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %} |