Renamed the append_next, inherit_next, and or_next template filters to accounting_append_next, accounting_inherit_next, and accounting_or_next, to avoid name conflict.
This commit is contained in:
parent
8e524674a3
commit
708a434b5d
@ -26,17 +26,17 @@ First written: 2023/1/31
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="btn-group mb-3">
|
<div class="btn-group mb-3">
|
||||||
<a class="btn btn-primary" href="{{ url_for("accounting.account.list")|or_next }}">
|
<a class="btn btn-primary" href="{{ url_for("accounting.account.list")|accounting_or_next }}">
|
||||||
<i class="fa-solid fa-circle-chevron-left"></i>
|
<i class="fa-solid fa-circle-chevron-left"></i>
|
||||||
{{ A_("Back") }}
|
{{ A_("Back") }}
|
||||||
</a>
|
</a>
|
||||||
{% if can_edit_accounting() %}
|
{% if can_edit_accounting() %}
|
||||||
<a class="btn btn-primary d-none d-md-inline" href="{{ url_for("accounting.account.edit", account=obj)|inherit_next }}">
|
<a class="btn btn-primary d-none d-md-inline" href="{{ url_for("accounting.account.edit", account=obj)|accounting_inherit_next }}">
|
||||||
<i class="fa-solid fa-gear"></i>
|
<i class="fa-solid fa-gear"></i>
|
||||||
{{ A_("Settings") }}
|
{{ A_("Settings") }}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a class="btn btn-primary" href="{{ url_for("accounting.account.order", base=obj.base)|append_next }}">
|
<a class="btn btn-primary" href="{{ url_for("accounting.account.order", base=obj.base)|accounting_append_next }}">
|
||||||
<i class="fa-solid fa-bars-staggered"></i>
|
<i class="fa-solid fa-bars-staggered"></i>
|
||||||
{{ A_("Order") }}
|
{{ A_("Order") }}
|
||||||
</a>
|
</a>
|
||||||
@ -50,7 +50,7 @@ First written: 2023/1/31
|
|||||||
|
|
||||||
{% if can_edit_accounting() %}
|
{% if can_edit_accounting() %}
|
||||||
<div class="d-md-none material-fab">
|
<div class="d-md-none material-fab">
|
||||||
<a class="btn btn-primary" href="{{ url_for("accounting.account.edit", account=obj)|inherit_next }}">
|
<a class="btn btn-primary" href="{{ url_for("accounting.account.edit", account=obj)|accounting_inherit_next }}">
|
||||||
<i class="fa-solid fa-pen-to-square"></i>
|
<i class="fa-solid fa-pen-to-square"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -23,6 +23,6 @@ First written: 2023/2/1
|
|||||||
|
|
||||||
{% block header %}{% block title %}{{ A_("%(account)s Settings", account=account) }}{% endblock %}{% endblock %}
|
{% block header %}{% block title %}{{ A_("%(account)s Settings", account=account) }}{% endblock %}{% endblock %}
|
||||||
|
|
||||||
{% block back_url %}{{ url_for("accounting.account.detail", account=account)|inherit_next }}{% endblock %}
|
{% block back_url %}{{ url_for("accounting.account.detail", account=account)|accounting_inherit_next }}{% endblock %}
|
||||||
|
|
||||||
{% block action_url %}{{ url_for("accounting.account.update", account=account) }}{% endblock %}
|
{% block action_url %}{{ url_for("accounting.account.update", account=account) }}{% endblock %}
|
||||||
|
@ -27,7 +27,7 @@ First written: 2023/1/30
|
|||||||
|
|
||||||
<div class="btn-group mb-2">
|
<div class="btn-group mb-2">
|
||||||
{% if can_edit_accounting() %}
|
{% if can_edit_accounting() %}
|
||||||
<a class="btn btn-primary text-nowrap d-none d-md-block" href="{{ url_for("accounting.account.create")|append_next }}">
|
<a class="btn btn-primary text-nowrap d-none d-md-block" href="{{ url_for("accounting.account.create")|accounting_append_next }}">
|
||||||
<i class="fa-solid fa-plus"></i>
|
<i class="fa-solid fa-plus"></i>
|
||||||
{{ A_("New") }}
|
{{ A_("New") }}
|
||||||
</a>
|
</a>
|
||||||
@ -45,7 +45,7 @@ First written: 2023/1/30
|
|||||||
|
|
||||||
{% if can_edit_accounting() %}
|
{% if can_edit_accounting() %}
|
||||||
<div class="d-md-none material-fab">
|
<div class="d-md-none material-fab">
|
||||||
<a class="btn btn-primary" href="{{ url_for("accounting.account.create")|append_next }}">
|
<a class="btn btn-primary" href="{{ url_for("accounting.account.create")|accounting_append_next }}">
|
||||||
<i class="fa-solid fa-plus"></i>
|
<i class="fa-solid fa-plus"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -56,7 +56,7 @@ First written: 2023/1/30
|
|||||||
|
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
{% for item in list %}
|
{% for item in list %}
|
||||||
<a class="list-group-item list-group-item-action" href="{{ url_for("accounting.account.detail", account=item)|append_next }}">
|
<a class="list-group-item list-group-item-action" href="{{ url_for("accounting.account.detail", account=item)|accounting_append_next }}">
|
||||||
{{ item }}
|
{{ item }}
|
||||||
{% if item.is_offset_needed %}
|
{% if item.is_offset_needed %}
|
||||||
<span class="badge rounded-pill bg-info">{{ A_("Offset needed") }}</span>
|
<span class="badge rounded-pill bg-info">{{ A_("Offset needed") }}</span>
|
||||||
|
@ -31,7 +31,7 @@ First written: 2023/2/2
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="btn-group mb-3">
|
<div class="btn-group mb-3">
|
||||||
<a class="btn btn-primary" href="{{ url_for("accounting.account.list")|or_next }}">
|
<a class="btn btn-primary" href="{{ url_for("accounting.account.list")|accounting_or_next }}">
|
||||||
<i class="fa-solid fa-circle-chevron-left"></i>
|
<i class="fa-solid fa-circle-chevron-left"></i>
|
||||||
{{ A_("Back") }}
|
{{ A_("Back") }}
|
||||||
</a>
|
</a>
|
||||||
|
@ -26,7 +26,7 @@ First written: 2023/2/1
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="btn-group mb-3">
|
<div class="btn-group mb-3">
|
||||||
<a class="btn btn-primary" href="{{ url_for("accounting.account.list")|or_next }}">
|
<a class="btn btn-primary" href="{{ url_for("accounting.account.list")|accounting_or_next }}">
|
||||||
<i class="fa-solid fa-circle-chevron-left"></i>
|
<i class="fa-solid fa-circle-chevron-left"></i>
|
||||||
{{ A_("Back") }}
|
{{ A_("Back") }}
|
||||||
</a>
|
</a>
|
||||||
@ -38,7 +38,7 @@ First written: 2023/2/1
|
|||||||
{% if obj.accounts %}
|
{% if obj.accounts %}
|
||||||
<div>
|
<div>
|
||||||
{% for account in obj.accounts %}
|
{% for account in obj.accounts %}
|
||||||
<a class="btn btn-primary" href="{{ url_for("accounting.account.detail", account=account)|append_next }}">
|
<a class="btn btn-primary" href="{{ url_for("accounting.account.detail", account=account)|accounting_append_next }}">
|
||||||
{{ account }}
|
{{ account }}
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -42,7 +42,7 @@ First written: 2023/1/26
|
|||||||
|
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
{% for item in list %}
|
{% for item in list %}
|
||||||
<a class="list-group-item list-group-item-action" href="{{ url_for("accounting.base-account.detail", account=item)|append_next }}">
|
<a class="list-group-item list-group-item-action" href="{{ url_for("accounting.base-account.detail", account=item)|accounting_append_next }}">
|
||||||
{{ item }}
|
{{ item }}
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -26,12 +26,12 @@ First written: 2023/2/6
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="btn-group mb-3">
|
<div class="btn-group mb-3">
|
||||||
<a class="btn btn-primary" href="{{ url_for("accounting.currency.list")|or_next }}">
|
<a class="btn btn-primary" href="{{ url_for("accounting.currency.list")|accounting_or_next }}">
|
||||||
<i class="fa-solid fa-circle-chevron-left"></i>
|
<i class="fa-solid fa-circle-chevron-left"></i>
|
||||||
{{ A_("Back") }}
|
{{ A_("Back") }}
|
||||||
</a>
|
</a>
|
||||||
{% if can_edit_accounting() %}
|
{% if can_edit_accounting() %}
|
||||||
<a class="btn btn-primary d-none d-md-inline" href="{{ url_for("accounting.currency.edit", currency=obj)|inherit_next }}">
|
<a class="btn btn-primary d-none d-md-inline" href="{{ url_for("accounting.currency.edit", currency=obj)|accounting_inherit_next }}">
|
||||||
<i class="fa-solid fa-gear"></i>
|
<i class="fa-solid fa-gear"></i>
|
||||||
{{ A_("Settings") }}
|
{{ A_("Settings") }}
|
||||||
</a>
|
</a>
|
||||||
@ -46,7 +46,7 @@ First written: 2023/2/6
|
|||||||
|
|
||||||
{% if can_edit_accounting() %}
|
{% if can_edit_accounting() %}
|
||||||
<div class="d-md-none material-fab">
|
<div class="d-md-none material-fab">
|
||||||
<a class="btn btn-primary" href="{{ url_for("accounting.currency.edit", currency=obj)|inherit_next }}">
|
<a class="btn btn-primary" href="{{ url_for("accounting.currency.edit", currency=obj)|accounting_inherit_next }}">
|
||||||
<i class="fa-solid fa-pen-to-square"></i>
|
<i class="fa-solid fa-pen-to-square"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -23,7 +23,7 @@ First written: 2023/2/6
|
|||||||
|
|
||||||
{% block header %}{% block title %}{{ A_("%(currency)s Settings", currency=currency) }}{% endblock %}{% endblock %}
|
{% block header %}{% block title %}{{ A_("%(currency)s Settings", currency=currency) }}{% endblock %}{% endblock %}
|
||||||
|
|
||||||
{% block back_url %}{{ url_for("accounting.currency.detail", currency=currency)|inherit_next }}{% endblock %}
|
{% block back_url %}{{ url_for("accounting.currency.detail", currency=currency)|accounting_inherit_next }}{% endblock %}
|
||||||
|
|
||||||
{% block action_url %}{{ url_for("accounting.currency.update", currency=currency) }}{% endblock %}
|
{% block action_url %}{{ url_for("accounting.currency.update", currency=currency) }}{% endblock %}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ First written: 2023/2/6
|
|||||||
|
|
||||||
<div class="btn-group mb-2">
|
<div class="btn-group mb-2">
|
||||||
{% if can_edit_accounting() %}
|
{% if can_edit_accounting() %}
|
||||||
<a class="btn btn-primary text-nowrap d-none d-md-block" href="{{ url_for("accounting.currency.create")|append_next }}">
|
<a class="btn btn-primary text-nowrap d-none d-md-block" href="{{ url_for("accounting.currency.create")|accounting_append_next }}">
|
||||||
<i class="fa-solid fa-plus"></i>
|
<i class="fa-solid fa-plus"></i>
|
||||||
{{ A_("New") }}
|
{{ A_("New") }}
|
||||||
</a>
|
</a>
|
||||||
@ -45,7 +45,7 @@ First written: 2023/2/6
|
|||||||
|
|
||||||
{% if can_edit_accounting() %}
|
{% if can_edit_accounting() %}
|
||||||
<div class="d-md-none material-fab">
|
<div class="d-md-none material-fab">
|
||||||
<a class="btn btn-primary" href="{{ url_for("accounting.currency.create")|append_next }}">
|
<a class="btn btn-primary" href="{{ url_for("accounting.currency.create")|accounting_append_next }}">
|
||||||
<i class="fa-solid fa-plus"></i>
|
<i class="fa-solid fa-plus"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -56,7 +56,7 @@ First written: 2023/2/6
|
|||||||
|
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
{% for item in list %}
|
{% for item in list %}
|
||||||
<a class="list-group-item list-group-item-action" href="{{ url_for("accounting.currency.detail", currency=item)|append_next }}">
|
<a class="list-group-item list-group-item-action" href="{{ url_for("accounting.currency.detail", currency=item)|accounting_append_next }}">
|
||||||
{{ item }}
|
{{ item }}
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -81,6 +81,6 @@ def init_app(bp: Blueprint) -> None:
|
|||||||
:param bp: The blueprint of the accounting application.
|
:param bp: The blueprint of the accounting application.
|
||||||
:return: None.
|
:return: None.
|
||||||
"""
|
"""
|
||||||
bp.add_app_template_filter(append_next, "append_next")
|
bp.add_app_template_filter(append_next, "accounting_append_next")
|
||||||
bp.add_app_template_filter(inherit_next, "inherit_next")
|
bp.add_app_template_filter(inherit_next, "accounting_inherit_next")
|
||||||
bp.add_app_template_filter(or_next, "or_next")
|
bp.add_app_template_filter(or_next, "accounting_or_next")
|
||||||
|
Loading…
Reference in New Issue
Block a user