Implement sync_from_state method for Area, Brand, Item, RoomFunction, and Room models; streamline entity management in settings
This commit is contained in:
parent
87fa623cde
commit
8a5c5db9e0
11 changed files with 204 additions and 70 deletions
|
@ -1,6 +1,8 @@
|
|||
{% import "fragments/_icon_fragment.html" as icons %}
|
||||
|
||||
{% macro category_link(endpoint, label, icon_html=none, arguments={}) %}
|
||||
<!-- Category Link Fragment -->
|
||||
|
||||
<div class="col text-center">
|
||||
<a href="{{ url_for('main.' + endpoint, **arguments) }}"
|
||||
class="d-flex flex-column justify-content-center link-success link-underline-opacity-0">
|
||||
|
@ -13,6 +15,12 @@
|
|||
{% endmacro %}
|
||||
|
||||
{% macro navigation_link(endpoint, label, icon_html=none, arguments={}, active=false) %}
|
||||
<!-- Navigation Link Fragment -->
|
||||
|
||||
{% if not active %}
|
||||
{% set active = request.endpoint == 'main.' + endpoint %}
|
||||
{% endif %}
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url_for('main.' + endpoint, **arguments) }}" class="nav-link{% if active %} active{% endif %}">
|
||||
{% if icon_html %}
|
||||
|
@ -24,6 +32,8 @@
|
|||
{% endmacro %}
|
||||
|
||||
{% macro entry_link(endpoint, id) %}
|
||||
<!-- Entry Link Fragment -->
|
||||
|
||||
<a href="{{ url_for('main.' + endpoint, id=id) }}" class="link-success link-underline-opacity-0">
|
||||
{{ icons.render_icon('link', 12) }}
|
||||
</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue