Revised the report-chooser.html template to simplify the reports.
This commit is contained in:
		| @@ -56,9 +56,7 @@ First written: 2023/3/7 | ||||
|       </ul> | ||||
|     </div> | ||||
|   {% endif %} | ||||
|   {% with report_chooser = report.report_chooser %} | ||||
|     {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% endwith %} | ||||
|   {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% include "accounting/report/include/currency-chooser.html" %} | ||||
|   <button class="btn btn-primary" type="button" data-bs-toggle="modal" data-bs-target="#accounting-period-chooser-modal"> | ||||
|     <i class="fa-solid fa-calendar-day"></i> | ||||
| @@ -75,9 +73,7 @@ First written: 2023/3/7 | ||||
| {% endwith %} | ||||
|  | ||||
| <div class="btn-group btn-actions mb-3 d-md-none"> | ||||
|   {% with report_chooser = report.report_chooser %} | ||||
|     {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% endwith %} | ||||
|   {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% include "accounting/report/include/currency-chooser.html" %} | ||||
|   <button class="btn btn-primary" type="button" data-bs-toggle="modal" data-bs-target="#accounting-period-chooser-modal"> | ||||
|     <i class="fa-solid fa-calendar-day"></i> | ||||
|   | ||||
| @@ -22,11 +22,11 @@ First written: 2023/3/4 | ||||
| <div class="btn-group" role="group"> | ||||
|   <button id="accounting-report-chooser" class="btn btn-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false"> | ||||
|     <i class="fa-solid fa-book"></i> | ||||
|     <span class="d-none d-md-inline">{{ report_chooser.current_report }}</span> | ||||
|     <span class="d-none d-md-inline">{{ report.report_chooser.current_report }}</span> | ||||
|     <span class="d-md-none">{{ A_("Report") }}</span> | ||||
|   </button> | ||||
|   <ul class="dropdown-menu" aria-labelledby="accounting-report-chooser"> | ||||
|     {% for report in report_chooser %} | ||||
|     {% for report in report.report_chooser %} | ||||
|       <li><a class="dropdown-item {% if report.is_active %} active {% endif %}" href="{{ report.url }}">{{ report.title }}</a></li> | ||||
|     {% endfor %} | ||||
|     <li> | ||||
|   | ||||
| @@ -57,9 +57,7 @@ First written: 2023/3/5 | ||||
|       </ul> | ||||
|     </div> | ||||
|   {% endif %} | ||||
|   {% with report_chooser = report.report_chooser %} | ||||
|     {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% endwith %} | ||||
|   {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% include "accounting/report/include/currency-chooser.html" %} | ||||
|   <div class="btn-group"> | ||||
|     <button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> | ||||
| @@ -91,9 +89,7 @@ First written: 2023/3/5 | ||||
| {% endwith %} | ||||
|  | ||||
| <div class="btn-group btn-actions mb-3 d-md-none"> | ||||
|   {% with report_chooser = report.report_chooser %} | ||||
|     {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% endwith %} | ||||
|   {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% include "accounting/report/include/currency-chooser.html" %} | ||||
|   <div class="btn-group"> | ||||
|     <button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> | ||||
|   | ||||
| @@ -56,9 +56,7 @@ First written: 2023/3/7 | ||||
|       </ul> | ||||
|     </div> | ||||
|   {% endif %} | ||||
|   {% with report_chooser = report.report_chooser %} | ||||
|     {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% endwith %} | ||||
|   {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% include "accounting/report/include/currency-chooser.html" %} | ||||
|   <button class="btn btn-primary" type="button" data-bs-toggle="modal" data-bs-target="#accounting-period-chooser-modal"> | ||||
|     <i class="fa-solid fa-calendar-day"></i> | ||||
| @@ -75,9 +73,7 @@ First written: 2023/3/7 | ||||
| {% endwith %} | ||||
|  | ||||
| <div class="btn-group btn-actions mb-3 d-md-none"> | ||||
|   {% with report_chooser = report.report_chooser %} | ||||
|     {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% endwith %} | ||||
|   {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% include "accounting/report/include/currency-chooser.html" %} | ||||
|   <button class="btn btn-primary" type="button" data-bs-toggle="modal" data-bs-target="#accounting-period-chooser-modal"> | ||||
|     <i class="fa-solid fa-calendar-day"></i> | ||||
|   | ||||
| @@ -57,9 +57,7 @@ First written: 2023/3/4 | ||||
|       </ul> | ||||
|     </div> | ||||
|   {% endif %} | ||||
|   {% with report_chooser = report.report_chooser %} | ||||
|     {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% endwith %} | ||||
|   {% include "accounting/report/include/report-chooser.html" %} | ||||
|   <button class="btn btn-primary" type="button" data-bs-toggle="modal" data-bs-target="#accounting-period-chooser-modal"> | ||||
|     <i class="fa-solid fa-calendar-day"></i> | ||||
|     {{ report.period.desc|title }} | ||||
| @@ -75,9 +73,7 @@ First written: 2023/3/4 | ||||
| {% endwith %} | ||||
|  | ||||
| <div class="btn-group btn-actions mb-3 d-md-none"> | ||||
|   {% with report_chooser = report.report_chooser %} | ||||
|     {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% endwith %} | ||||
|   {% include "accounting/report/include/report-chooser.html" %} | ||||
|   <button class="btn btn-primary" type="button" data-bs-toggle="modal" data-bs-target="#accounting-period-chooser-modal"> | ||||
|     <i class="fa-solid fa-calendar-day"></i> | ||||
|     {{ A_("Period") }} | ||||
|   | ||||
| @@ -57,9 +57,7 @@ First written: 2023/3/5 | ||||
|       </ul> | ||||
|     </div> | ||||
|   {% endif %} | ||||
|   {% with report_chooser = report.report_chooser %} | ||||
|     {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% endwith %} | ||||
|   {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% include "accounting/report/include/currency-chooser.html" %} | ||||
|   <div class="btn-group"> | ||||
|     <button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> | ||||
| @@ -91,9 +89,7 @@ First written: 2023/3/5 | ||||
| {% endwith %} | ||||
|  | ||||
| <div class="btn-group btn-actions mb-3 d-md-none"> | ||||
|   {% with report_chooser = report.report_chooser %} | ||||
|     {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% endwith %} | ||||
|   {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% include "accounting/report/include/currency-chooser.html" %} | ||||
|   <div class="btn-group"> | ||||
|     <button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> | ||||
|   | ||||
| @@ -56,9 +56,7 @@ First written: 2023/3/8 | ||||
|       </ul> | ||||
|     </div> | ||||
|   {% endif %} | ||||
|   {% with report_chooser = report.report_chooser %} | ||||
|     {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% endwith %} | ||||
|   {% include "accounting/report/include/report-chooser.html" %} | ||||
|   <form class="btn btn-primary d-flex input-group accounting-search-desktop-form" action="{{ url_for("accounting.report.search") }}" method="get" role="search" aria-label="{{ A_("Search for Desktop") }}"> | ||||
|     <input id="accounting-search-desktop" class="form-control form-control-sm accounting-search-input" type="search" name="q" value="{{ request.args.q }}" placeholder=" " required="required"> | ||||
|     <label for="accounting-search-desktop" class="accounting-search-label"> | ||||
| @@ -79,9 +77,7 @@ First written: 2023/3/8 | ||||
| {% endwith %} | ||||
|  | ||||
| <div class="btn-group btn-actions mb-3 d-md-none"> | ||||
|   {% with report_chooser = report.report_chooser %} | ||||
|     {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% endwith %} | ||||
|   {% include "accounting/report/include/report-chooser.html" %} | ||||
|   <form class="btn btn-primary d-flex input-group" action="{{ url_for("accounting.report.search") }}" method="get" role="search" aria-label="{{ A_("Search for Mobile") }}"> | ||||
|     <input id="accounting-search-mobile" class="form-control form-control-sm accounting-search-input" type="search" name="q" value="{{ request.args.q }}" placeholder=" " required="required"> | ||||
|     <label for="accounting-search-mobile" class="accounting-search-label"> | ||||
|   | ||||
| @@ -56,9 +56,7 @@ First written: 2023/3/5 | ||||
|       </ul> | ||||
|     </div> | ||||
|   {% endif %} | ||||
|   {% with report_chooser = report.report_chooser %} | ||||
|     {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% endwith %} | ||||
|   {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% include "accounting/report/include/currency-chooser.html" %} | ||||
|   <button class="btn btn-primary" type="button" data-bs-toggle="modal" data-bs-target="#accounting-period-chooser-modal"> | ||||
|     <i class="fa-solid fa-calendar-day"></i> | ||||
| @@ -75,9 +73,7 @@ First written: 2023/3/5 | ||||
| {% endwith %} | ||||
|  | ||||
| <div class="btn-group btn-actions mb-3 d-md-none"> | ||||
|   {% with report_chooser = report.report_chooser %} | ||||
|     {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% endwith %} | ||||
|   {% include "accounting/report/include/report-chooser.html" %} | ||||
|   {% include "accounting/report/include/currency-chooser.html" %} | ||||
|   <button class="btn btn-primary" type="button" data-bs-toggle="modal" data-bs-target="#accounting-period-chooser-modal"> | ||||
|     <i class="fa-solid fa-calendar-day"></i> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user