Renamed the can_view_accounting and can_edit_accounting template functions to accounting_can_view and accounting_can_edit, respectively.
This commit is contained in:
		| @@ -30,7 +30,7 @@ First written: 2023/1/31 | ||||
|     <i class="fa-solid fa-circle-chevron-left"></i> | ||||
|     {{ A_("Back") }} | ||||
|   </a> | ||||
|   {% if can_edit_accounting() %} | ||||
|   {% 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 }}"> | ||||
|       <i class="fa-solid fa-gear"></i> | ||||
|       {{ A_("Settings") }} | ||||
| @@ -40,7 +40,7 @@ First written: 2023/1/31 | ||||
|     <i class="fa-solid fa-bars-staggered"></i> | ||||
|     {{ A_("Order") }} | ||||
|   </a> | ||||
|   {% if can_edit_accounting() %} | ||||
|   {% if accounting_can_edit() %} | ||||
|     <button class="btn btn-danger" type="button" data-bs-toggle="modal" data-bs-target="#delete-modal"> | ||||
|       <i class="fa-solid fa-trash"></i> | ||||
|       {{ A_("Delete") }} | ||||
| @@ -48,7 +48,7 @@ First written: 2023/1/31 | ||||
|   {% endif %} | ||||
| </div> | ||||
|  | ||||
| {% if can_edit_accounting() %} | ||||
| {% if accounting_can_edit() %} | ||||
|   <div class="d-md-none material-fab"> | ||||
|     <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> | ||||
| @@ -56,7 +56,7 @@ First written: 2023/1/31 | ||||
|   </div> | ||||
| {% endif %} | ||||
|  | ||||
| {% if can_edit_accounting() %} | ||||
| {% if accounting_can_edit() %} | ||||
|   <form id="delete-form" action="{{ url_for("accounting.account.delete", account=obj) }}" method="post"> | ||||
|     <input id="csrf_token" type="hidden" name="csrf_token" value="{{ csrf_token() }}"> | ||||
|     {% if "next" in request.args %} | ||||
|   | ||||
| @@ -26,7 +26,7 @@ First written: 2023/1/30 | ||||
| {% block content %} | ||||
|  | ||||
| <div class="btn-group mb-2"> | ||||
|   {% if can_edit_accounting() %} | ||||
|   {% if accounting_can_edit() %} | ||||
|     <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> | ||||
|       {{ A_("New") }} | ||||
| @@ -43,7 +43,7 @@ First written: 2023/1/30 | ||||
|   </form> | ||||
| </div> | ||||
|  | ||||
| {% if can_edit_accounting() %} | ||||
| {% if accounting_can_edit() %} | ||||
|   <div class="d-md-none material-fab"> | ||||
|     <a class="btn btn-primary" href="{{ url_for("accounting.account.create")|accounting_append_next }}"> | ||||
|       <i class="fa-solid fa-plus"></i> | ||||
|   | ||||
| @@ -37,7 +37,7 @@ First written: 2023/2/2 | ||||
|   </a> | ||||
| </div> | ||||
|  | ||||
| {% if base.accounts|length > 1 and can_edit_accounting() %} | ||||
| {% if base.accounts|length > 1 and accounting_can_edit() %} | ||||
|   <form action="{{ url_for("accounting.account.sort", base=base) }}" method="post"> | ||||
|     <input id="csrf_token" type="hidden" name="csrf_token" value="{{ csrf_token() }}"> | ||||
|     {% if "next" in request.args %} | ||||
|   | ||||
| @@ -30,13 +30,13 @@ First written: 2023/2/6 | ||||
|     <i class="fa-solid fa-circle-chevron-left"></i> | ||||
|     {{ A_("Back") }} | ||||
|   </a> | ||||
|   {% if can_edit_accounting() %} | ||||
|   {% 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 }}"> | ||||
|       <i class="fa-solid fa-gear"></i> | ||||
|       {{ A_("Settings") }} | ||||
|     </a> | ||||
|   {% endif %} | ||||
|   {% if can_edit_accounting() %} | ||||
|   {% if accounting_can_edit() %} | ||||
|     <button class="btn btn-danger" type="button" data-bs-toggle="modal" data-bs-target="#delete-modal"> | ||||
|       <i class="fa-solid fa-trash"></i> | ||||
|       {{ A_("Delete") }} | ||||
| @@ -44,7 +44,7 @@ First written: 2023/2/6 | ||||
|   {% endif %} | ||||
| </div> | ||||
|  | ||||
| {% if can_edit_accounting() %} | ||||
| {% if accounting_can_edit() %} | ||||
|   <div class="d-md-none material-fab"> | ||||
|     <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> | ||||
| @@ -52,7 +52,7 @@ First written: 2023/2/6 | ||||
|   </div> | ||||
| {% endif %} | ||||
|  | ||||
| {% if can_edit_accounting() %} | ||||
| {% if accounting_can_edit() %} | ||||
|   <form id="delete-form" action="{{ url_for("accounting.currency.delete", currency=obj) }}" method="post"> | ||||
|     <input id="csrf_token" type="hidden" name="csrf_token" value="{{ csrf_token() }}"> | ||||
|     {% if "next" in request.args %} | ||||
|   | ||||
| @@ -26,7 +26,7 @@ First written: 2023/2/6 | ||||
| {% block content %} | ||||
|  | ||||
| <div class="btn-group mb-2"> | ||||
|   {% if can_edit_accounting() %} | ||||
|   {% if accounting_can_edit() %} | ||||
|     <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> | ||||
|       {{ A_("New") }} | ||||
| @@ -43,7 +43,7 @@ First written: 2023/2/6 | ||||
|   </form> | ||||
| </div> | ||||
|  | ||||
| {% if can_edit_accounting() %} | ||||
| {% if accounting_can_edit() %} | ||||
|   <div class="d-md-none material-fab"> | ||||
|     <a class="btn btn-primary" href="{{ url_for("accounting.currency.create")|accounting_append_next }}"> | ||||
|       <i class="fa-solid fa-plus"></i> | ||||
|   | ||||
| @@ -19,7 +19,7 @@ nav.html: The navigation menu for the accounting application. | ||||
| Author: imacat@mail.imacat.idv.tw (imacat) | ||||
| First written: 2023/1/26 | ||||
| #} | ||||
| {% if can_view_accounting() %} | ||||
| {% if accounting_can_view() %} | ||||
|   <li class="nav-item dropdown"> | ||||
|     <span class="nav-link dropdown-toggle" data-bs-toggle="dropdown"> | ||||
|       <i class="fa-solid fa-gear"></i> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user