Revised the add-txn-material-fab.html template to simplify the code to include it.
This commit is contained in:
		| @@ -39,9 +39,7 @@ First written: 2023/3/7 | ||||
|   {% endwith %} | ||||
| </div> | ||||
|  | ||||
| {% with txn_types = report.txn_types %} | ||||
|   {% include "accounting/report/include/add-txn-material-fab.html" %} | ||||
| {% endwith %} | ||||
| {% include "accounting/report/include/add-txn-material-fab.html" %} | ||||
|  | ||||
| <div class="btn-group btn-actions mb-3 d-md-none"> | ||||
|   {% with use_report_chooser = true, | ||||
|   | ||||
| @@ -22,13 +22,13 @@ First written: 2023/2/25 | ||||
| {% if accounting_can_edit() %} | ||||
|   <div id="accounting-material-fab-speed-dial" class="d-md-none accounting-material-fab"> | ||||
|     <div id="accounting-material-fab-speed-dial-actions" class="d-md-none accounting-material-fab-speed-dial-group"> | ||||
|       <a class="btn rounded-pill" href="{{ url_for("accounting.transaction.create", txn_type=txn_types.CASH_EXPENSE)|accounting_append_next }}"> | ||||
|       <a class="btn rounded-pill" href="{{ url_for("accounting.transaction.create", txn_type=report.txn_types.CASH_EXPENSE)|accounting_append_next }}"> | ||||
|         {{ A_("Cash expense") }} | ||||
|       </a> | ||||
|       <a class="btn rounded-pill" href="{{ url_for("accounting.transaction.create", txn_type=txn_types.CASH_INCOME)|accounting_append_next }}"> | ||||
|       <a class="btn rounded-pill" href="{{ url_for("accounting.transaction.create", txn_type=report.txn_types.CASH_INCOME)|accounting_append_next }}"> | ||||
|         {{ A_("Cash income") }} | ||||
|       </a> | ||||
|       <a class="btn rounded-pill" href="{{ url_for("accounting.transaction.create", txn_type=txn_types.TRANSFER)|accounting_append_next }}"> | ||||
|       <a class="btn rounded-pill" href="{{ url_for("accounting.transaction.create", txn_type=report.txn_types.TRANSFER)|accounting_append_next }}"> | ||||
|         {{ A_("Transfer") }} | ||||
|       </a> | ||||
|     </div> | ||||
|   | ||||
| @@ -40,9 +40,7 @@ First written: 2023/3/5 | ||||
|   {% endwith %} | ||||
| </div> | ||||
|  | ||||
| {% with txn_types = report.txn_types %} | ||||
|   {% include "accounting/report/include/add-txn-material-fab.html" %} | ||||
| {% endwith %} | ||||
| {% include "accounting/report/include/add-txn-material-fab.html" %} | ||||
|  | ||||
| <div class="btn-group btn-actions mb-3 d-md-none"> | ||||
|   {% with use_report_chooser = true, | ||||
|   | ||||
| @@ -39,9 +39,7 @@ First written: 2023/3/7 | ||||
|   {% endwith %} | ||||
| </div> | ||||
|  | ||||
| {% with txn_types = report.txn_types %} | ||||
|   {% include "accounting/report/include/add-txn-material-fab.html" %} | ||||
| {% endwith %} | ||||
| {% include "accounting/report/include/add-txn-material-fab.html" %} | ||||
|  | ||||
| <div class="btn-group btn-actions mb-3 d-md-none"> | ||||
|   {% with use_report_chooser = true, | ||||
|   | ||||
| @@ -38,9 +38,7 @@ First written: 2023/3/4 | ||||
|   {% endwith %} | ||||
| </div> | ||||
|  | ||||
| {% with txn_types = report.txn_types %} | ||||
|   {% include "accounting/report/include/add-txn-material-fab.html" %} | ||||
| {% endwith %} | ||||
| {% include "accounting/report/include/add-txn-material-fab.html" %} | ||||
|  | ||||
| <div class="btn-group btn-actions mb-3 d-md-none"> | ||||
|   {% with use_report_chooser = true, | ||||
|   | ||||
| @@ -40,9 +40,7 @@ First written: 2023/3/5 | ||||
|   {% endwith %} | ||||
| </div> | ||||
|  | ||||
| {% with txn_types = report.txn_types %} | ||||
|   {% include "accounting/report/include/add-txn-material-fab.html" %} | ||||
| {% endwith %} | ||||
| {% include "accounting/report/include/add-txn-material-fab.html" %} | ||||
|  | ||||
| <div class="btn-group btn-actions mb-3 d-md-none"> | ||||
|   {% with use_report_chooser = true, | ||||
|   | ||||
| @@ -39,9 +39,7 @@ First written: 2023/3/8 | ||||
|   {% endwith %} | ||||
| </div> | ||||
|  | ||||
| {% with txn_types = report.txn_types %} | ||||
|   {% include "accounting/report/include/add-txn-material-fab.html" %} | ||||
| {% endwith %} | ||||
| {% include "accounting/report/include/add-txn-material-fab.html" %} | ||||
|  | ||||
| <div class="btn-group btn-actions mb-3 d-md-none"> | ||||
|   {% with use_report_chooser = true, | ||||
|   | ||||
| @@ -39,9 +39,7 @@ First written: 2023/3/5 | ||||
|   {% endwith %} | ||||
| </div> | ||||
|  | ||||
| {% with txn_types = report.txn_types %} | ||||
|   {% include "accounting/report/include/add-txn-material-fab.html" %} | ||||
| {% endwith %} | ||||
| {% include "accounting/report/include/add-txn-material-fab.html" %} | ||||
|  | ||||
| <div class="btn-group btn-actions mb-3 d-md-none"> | ||||
|   {% with use_report_chooser = true, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user