Revised the style of the toolbar buttons for better layout on mobile devices. Hid the "Back" button on mobile devices for better layout and saving spaces.

This commit is contained in:
依瑪貓 2023-03-21 23:07:05 +08:00
parent da92a0b42c
commit e615ad2690
11 changed files with 24 additions and 24 deletions

View File

@ -25,25 +25,25 @@ First written: 2023/1/31
{% block content %} {% block content %}
<div class="btn-group mb-3"> <div class="mb-3 accounting-toolbar">
<a class="btn btn-primary" href="{{ url_for("accounting.account.list")|accounting_or_next }}"> <a class="btn btn-primary d-none d-md-inline" 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 accounting_can_edit() %} {% if accounting_can_edit() %}
<a class="btn btn-primary d-none d-md-inline" href="{{ url_for("accounting.account.edit", account=obj)|accounting_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") }} <span class="d-none d-md-inline">{{ A_("Settings") }}</span>
</a> </a>
{% endif %} {% endif %}
<a class="btn btn-primary" href="{{ url_for("accounting.account.order", base=obj.base)|accounting_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") }} <span class="d-none d-md-inline">{{ A_("Order") }}</span>
</a> </a>
{% if accounting_can_edit() %} {% if accounting_can_edit() %}
<button class="btn btn-danger" type="button" data-bs-toggle="modal" data-bs-target="#accounting-delete-modal"> <button class="btn btn-danger" type="button" data-bs-toggle="modal" data-bs-target="#accounting-delete-modal">
<i class="fa-solid fa-trash"></i> <i class="fa-solid fa-trash"></i>
{{ A_("Delete") }} <span class="d-none d-md-inline">{{ A_("Delete") }}</span>
</button> </button>
{% endif %} {% endif %}
</div> </div>

View File

@ -27,7 +27,7 @@ First written: 2023/2/1
{% block content %} {% block content %}
<div class="btn-group mb-3"> <div class="mb-3 d-none d-md-block">
<a class="btn btn-primary" role="button" href="{% block back_url %}{% endblock %}"> <a class="btn btn-primary" role="button" href="{% block back_url %}{% endblock %}">
<i class="fa-solid fa-circle-chevron-left"></i> <i class="fa-solid fa-circle-chevron-left"></i>
{{ A_("Back") }} {{ A_("Back") }}

View File

@ -30,7 +30,7 @@ First written: 2023/2/2
{% block content %} {% block content %}
<div class="btn-group mb-3"> <div class="mb-3 d-none d-md-block">
<a class="btn btn-primary" href="{{ url_for("accounting.account.list")|accounting_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") }}

View File

@ -25,7 +25,7 @@ First written: 2023/2/1
{% block content %} {% block content %}
<div class="btn-group mb-3"> <div class="mb-3 d-none d-md-block">
<a class="btn btn-primary" href="{{ url_for("accounting.account.list")|accounting_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") }}

View File

@ -25,21 +25,21 @@ First written: 2023/2/6
{% block content %} {% block content %}
<div class="btn-group mb-3"> <div class="mb-3 accounting-toolbar">
<a class="btn btn-primary" href="{{ url_for("accounting.currency.list")|accounting_or_next }}"> <a class="btn btn-primary d-none d-md-inline" 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 accounting_can_edit() %} {% if accounting_can_edit() %}
<a class="btn btn-primary d-none d-md-inline" href="{{ url_for("accounting.currency.edit", currency=obj)|accounting_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") }} <span class="d-none d-md-inline">{{ A_("Settings") }}</span>
</a> </a>
{% endif %} {% endif %}
{% if accounting_can_edit() %} {% if accounting_can_edit() %}
<button class="btn btn-danger" type="button" data-bs-toggle="modal" data-bs-target="#accounting-delete-modal"> <button class="btn btn-danger" type="button" data-bs-toggle="modal" data-bs-target="#accounting-delete-modal">
<i class="fa-solid fa-trash"></i> <i class="fa-solid fa-trash"></i>
{{ A_("Delete") }} <span class="d-none d-md-inline">{{ A_("Delete") }}</span>
</button> </button>
{% endif %} {% endif %}
</div> </div>

View File

@ -27,7 +27,7 @@ First written: 2023/2/6
{% block content %} {% block content %}
<div class="btn-group mb-3"> <div class="mb-3 d-none d-md-block">
<a class="btn btn-primary" role="button" href="{% block back_url %}{% endblock %}"> <a class="btn btn-primary" role="button" href="{% block back_url %}{% endblock %}">
<i class="fa-solid fa-circle-chevron-left"></i> <i class="fa-solid fa-circle-chevron-left"></i>
{{ A_("Back") }} {{ A_("Back") }}

View File

@ -24,7 +24,7 @@ First written: 2023/2/26
{% block as_trasfer %} {% block as_trasfer %}
<a class="btn btn-primary" href="{{ url_for("accounting.journal-entry.edit", journal_entry=obj)|accounting_journal_entry_to_transfer|accounting_inherit_next }}"> <a class="btn btn-primary" href="{{ url_for("accounting.journal-entry.edit", journal_entry=obj)|accounting_journal_entry_to_transfer|accounting_inherit_next }}">
<i class="fa-solid fa-table-columns"></i> <i class="fa-solid fa-table-columns"></i>
{{ A_("As Transfer") }} <span class="d-none d-md-inline">{{ A_("As Transfer") }}</span>
</a> </a>
{% endblock %} {% endblock %}

View File

@ -25,32 +25,32 @@ First written: 2023/2/26
{% block content %} {% block content %}
<div class="btn-group mb-3"> <div class="mb-3 accounting-toolbar">
<a class="btn btn-primary" href="{{ url_for("accounting.report.default")|accounting_or_next }}"> <a class="btn btn-primary d-none d-md-inline" href="{{ url_for("accounting.report.default")|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 accounting_can_edit() %} {% if accounting_can_edit() %}
<a class="btn btn-primary d-none d-md-inline" href="{{ url_for("accounting.journal-entry.edit", journal_entry=obj)|accounting_inherit_next }}"> <a class="btn btn-primary d-none d-md-inline" href="{{ url_for("accounting.journal-entry.edit", journal_entry=obj)|accounting_inherit_next }}">
<i class="fa-solid fa-gear"></i> <i class="fa-solid fa-gear"></i>
{{ A_("Settings") }} <span class="d-none d-md-inline">{{ A_("Settings") }}</span>
</a> </a>
{% endif %} {% endif %}
<a class="btn btn-primary" href="{{ url_for("accounting.journal-entry.order", journal_entry_date=obj.date)|accounting_append_next }}"> <a class="btn btn-primary" href="{{ url_for("accounting.journal-entry.order", journal_entry_date=obj.date)|accounting_append_next }}">
<i class="fa-solid fa-bars-staggered"></i> <i class="fa-solid fa-bars-staggered"></i>
{{ A_("Order") }} <span class="d-none d-md-inline">{{ A_("Order") }}</span>
</a> </a>
{% if accounting_can_edit() %} {% if accounting_can_edit() %}
{% block as_trasfer %}{% endblock %} {% block as_trasfer %}{% endblock %}
{% if obj.can_delete %} {% if obj.can_delete %}
<button class="btn btn-danger" type="button" data-bs-toggle="modal" data-bs-target="#accounting-delete-modal"> <button class="btn btn-danger" type="button" data-bs-toggle="modal" data-bs-target="#accounting-delete-modal">
<i class="fa-solid fa-trash"></i> <i class="fa-solid fa-trash"></i>
{{ A_("Delete") }} <span class="d-none d-md-inline">{{ A_("Delete") }}</span>
</button> </button>
{% else %} {% else %}
<button class="btn btn-secondary" type="button" disabled="disabled"> <button class="btn btn-secondary" type="button" disabled="disabled">
<i class="fa-solid fa-trash"></i> <i class="fa-solid fa-trash"></i>
{{ A_("Delete") }} <span class="d-none d-md-inline">{{ A_("Delete") }}</span>
</button> </button>
{% endif %} {% endif %}
{% endif %} {% endif %}

View File

@ -32,10 +32,10 @@ First written: 2023/2/26
{% block content %} {% block content %}
<div class="btn-group mb-3"> <div class="mb-3 d-none d-md-block">
<a class="btn btn-primary" role="button" href="{% block back_url %}{% endblock %}"> <a class="btn btn-primary" role="button" href="{% block back_url %}{% endblock %}">
<i class="fa-solid fa-circle-chevron-left"></i> <i class="fa-solid fa-circle-chevron-left"></i>
{{ A_("Back") }} <span class="d-none d-md-inline">{{ A_("Back") }}</span>
</a> </a>
</div> </div>

View File

@ -30,7 +30,7 @@ First written: 2023/2/26
{% block content %} {% block content %}
<div class="btn-group mb-3"> <div class="mb-3 d-none d-md-block">
<a class="btn btn-primary" href="{{ url_for("accounting.report.default")|accounting_or_next }}"> <a class="btn btn-primary" href="{{ url_for("accounting.report.default")|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") }}

View File

@ -24,7 +24,7 @@ First written: 2023/2/26
{% block as_trasfer %} {% block as_trasfer %}
<a class="btn btn-primary" href="{{ url_for("accounting.journal-entry.edit", journal_entry=obj)|accounting_journal_entry_to_transfer|accounting_inherit_next }}"> <a class="btn btn-primary" href="{{ url_for("accounting.journal-entry.edit", journal_entry=obj)|accounting_journal_entry_to_transfer|accounting_inherit_next }}">
<i class="fa-solid fa-bars-staggered"></i> <i class="fa-solid fa-bars-staggered"></i>
{{ A_("As Transfer") }} <span class="d-none d-md-inline">{{ A_("As Transfer") }}</span>
</a> </a>
{% endblock %} {% endblock %}