mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-04 12:11:50 +02:00
Compare commits
3 commits
d1cad13ef0
...
3dc708f175
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3dc708f175 | ||
![]() |
cf77b4c346 | ||
![]() |
37b099ab79 |
40 changed files with 69 additions and 39 deletions
|
@ -759,7 +759,7 @@ msgstr ""
|
|||
msgid "Documentation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr ""
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -168,7 +168,7 @@
|
|||
<i class="icon book">{{ static_include("images/book.svg") | safe }}</i>
|
||||
</a>
|
||||
{% if g.show_admin_dashboard_link %}
|
||||
<a target="_blank" rel="noopener" data-toggle="tooltip" data-placement="top" title="{{ _('Administation Dashboard') }}" href="{{ url_for('main.dashboard') }}">
|
||||
<a target="_blank" rel="noopener" data-toggle="tooltip" data-placement="top" title="{{ _('Administration Dashboard') }}" href="{{ url_for('main.dashboard') }}">
|
||||
<i class="icon admin">{{ static_include("images/cog.svg") | safe }}</i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
{% block title %} - {{ g.project.name }}{% endblock %}
|
||||
{% block js %}
|
||||
{% if add_bill %} $('#new-bill > a').click(); {% endif %}
|
||||
{% if edit_bill is not none %} $('#edit-bill > a').click(); {% endif %}
|
||||
|
||||
// focus on first field when adding a bill
|
||||
$("#bill-form").on('shown.bs.modal', function(){
|
||||
|
@ -91,6 +92,25 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if edit_bill is not none %}
|
||||
<div id="bill-edit-form" class="modal fade show" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">{{ _('Edit this bill') }}</h3>
|
||||
<a href="#" class="close" data-dismiss="modal">×</a>
|
||||
</div>
|
||||
<form action="{{ url_for(".edit_bill", bill_id=edit_bill) }}" method="post" class="modal-body container">
|
||||
{{ forms.add_bill(bill_edit_form, edit=True, title=False) }}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span id="edit-bill" class="hidden">
|
||||
<a href="#" data-toggle="modal" data-keyboard="false" data-target="#bill-edit-form"></a>
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
<div class="d-flex flex-wrap w-100 pt-2 mt-2" id="bill-toolbar">
|
||||
{% if bills.pages > 1 %}
|
||||
<ul class="pagination mr-2 mb-0 pb-2 flex-wrap" id="pagination-top">
|
||||
|
@ -148,7 +168,7 @@
|
|||
</span>
|
||||
</td>
|
||||
<td class="bill-actions d-flex align-items-center">
|
||||
<a class="edit" href="{{ url_for(".edit_bill", bill_id=bill.id) }}" title="{{ _("edit") }}">{{ _('edit') }}</a>
|
||||
<a class="edit" href="{{ url_for(".list_bills", edit_bill=bill.id) }}" title="{{ _("edit") }}">{{ _('edit') }}</a>
|
||||
<form class="delete-bill" action="{{ url_for(".delete_bill", bill_id=bill.id) }}" method="POST">
|
||||
{{ csrf_form.csrf_token }}
|
||||
<button class="action delete" type="submit" title="{{ _("delete") }}"></button>
|
||||
|
|
|
@ -782,7 +782,7 @@ msgstr ""
|
|||
msgid "Documentation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr ""
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -785,7 +785,7 @@ msgstr ""
|
|||
msgid "Documentation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr ""
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -826,7 +826,7 @@ msgstr "Aplicació mòbil"
|
|||
msgid "Documentation"
|
||||
msgstr "Documentació"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Panell d'administració"
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -800,7 +800,7 @@ msgstr "Mobilní aplikace"
|
|||
msgid "Documentation"
|
||||
msgstr "Dokumentace"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Správcovský panel"
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -824,7 +824,7 @@ msgstr "Handy-Applikation"
|
|||
msgid "Documentation"
|
||||
msgstr "Dokumentation"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Dashboard Administration"
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -811,7 +811,7 @@ msgstr ""
|
|||
msgid "Documentation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
|
|
|
@ -821,7 +821,7 @@ msgstr "Poŝaparata programo"
|
|||
msgid "Documentation"
|
||||
msgstr "Dokumentaro"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Administra panelo"
|
||||
|
||||
#, fuzzy
|
||||
|
|
|
@ -818,7 +818,7 @@ msgstr "Aplicación móvil"
|
|||
msgid "Documentation"
|
||||
msgstr "Documentación"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Panel de administración"
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -815,7 +815,7 @@ msgstr "Aplicación móvil"
|
|||
msgid "Documentation"
|
||||
msgstr "Documentación"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Panel de administración"
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -782,7 +782,7 @@ msgstr ""
|
|||
msgid "Documentation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr ""
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -824,7 +824,7 @@ msgstr "Application mobile"
|
|||
msgid "Documentation"
|
||||
msgstr "Documentation"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Panneau d'administration"
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -788,7 +788,7 @@ msgstr "יישום לנייד"
|
|||
msgid "Documentation"
|
||||
msgstr "דוקומנטציה"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr ""
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -829,7 +829,7 @@ msgstr "मोबाइल एप्लीकेशन"
|
|||
msgid "Documentation"
|
||||
msgstr "प्रलेखन"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "व्यवस्थापन डैशबोर्ड"
|
||||
|
||||
#, fuzzy
|
||||
|
|
|
@ -817,7 +817,7 @@ msgstr "Mobil alkalmazás"
|
|||
msgid "Documentation"
|
||||
msgstr "Dokumentáció"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Adminisztrátori vezérlőpult"
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -812,7 +812,7 @@ msgstr "Aplikasi Gawai"
|
|||
msgid "Documentation"
|
||||
msgstr "Dokumentasi"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Dasbor Administrasi"
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -817,7 +817,7 @@ msgstr "Applicazione mobile"
|
|||
msgid "Documentation"
|
||||
msgstr "Documentazione"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Cruscotto Amministrazione"
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -797,7 +797,7 @@ msgstr "携帯アプリ"
|
|||
msgid "Documentation"
|
||||
msgstr "書類"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "管理ダッシュボード"
|
||||
|
||||
#, fuzzy
|
||||
|
|
|
@ -793,7 +793,7 @@ msgstr ""
|
|||
msgid "Documentation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr ""
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -793,7 +793,7 @@ msgstr ""
|
|||
msgid "Documentation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr ""
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -855,7 +855,7 @@ msgstr "Mobilprogram"
|
|||
msgid "Documentation"
|
||||
msgstr "Dokumentasjon"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Administrasjonsoversiktspanel"
|
||||
|
||||
#, fuzzy
|
||||
|
|
|
@ -814,7 +814,7 @@ msgstr "Mobiele app"
|
|||
msgid "Documentation"
|
||||
msgstr "Documentatie"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Administratie-overzicht"
|
||||
|
||||
#, fuzzy
|
||||
|
|
|
@ -777,7 +777,7 @@ msgstr ""
|
|||
msgid "Documentation"
|
||||
msgstr "Documentacion"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Panèl d’administracion"
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -812,7 +812,7 @@ msgstr "Aplikacja mobilna"
|
|||
msgid "Documentation"
|
||||
msgstr "Dokumentacja"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Kokpit administracyjny"
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -823,7 +823,7 @@ msgstr "Aplicação Mobile"
|
|||
msgid "Documentation"
|
||||
msgstr "Documentação"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Painel de Administração"
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -809,7 +809,7 @@ msgstr "Aplicativo"
|
|||
msgid "Documentation"
|
||||
msgstr "Documentação"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Painel de Administração"
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -816,7 +816,7 @@ msgstr "Мобильное приложение"
|
|||
msgid "Documentation"
|
||||
msgstr "Документация"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Панель инструментов администратора"
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -783,7 +783,7 @@ msgstr "Mobilna Aplikacija"
|
|||
msgid "Documentation"
|
||||
msgstr "Dokumentacija"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr ""
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -818,7 +818,7 @@ msgstr "Mobilapplikation"
|
|||
msgid "Documentation"
|
||||
msgstr "Dokumentation"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Översiktspanel för administration"
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -809,7 +809,7 @@ msgstr ""
|
|||
msgid "Documentation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr ""
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -817,7 +817,7 @@ msgstr ""
|
|||
msgid "Documentation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr ""
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -778,7 +778,7 @@ msgstr ""
|
|||
msgid "Documentation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr ""
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -811,7 +811,7 @@ msgstr "Telefon Uygulaması"
|
|||
msgid "Documentation"
|
||||
msgstr "Belgelendirme"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "Yönetici Gösterge Paneli"
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -791,7 +791,7 @@ msgstr ""
|
|||
msgid "Documentation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr ""
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -776,7 +776,7 @@ msgstr ""
|
|||
msgid "Documentation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr ""
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -775,7 +775,7 @@ msgstr ""
|
|||
msgid "Documentation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr ""
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -779,7 +779,7 @@ msgstr "手机软件"
|
|||
msgid "Documentation"
|
||||
msgstr "文件"
|
||||
|
||||
msgid "Administation Dashboard"
|
||||
msgid "Administration Dashboard"
|
||||
msgstr "管理面板"
|
||||
|
||||
msgid "Legal information"
|
||||
|
|
|
@ -663,6 +663,14 @@ def list_bills():
|
|||
):
|
||||
bill_form.payed_for.data = session["last_selected_payed_for"][g.project.id]
|
||||
|
||||
edit_bill = request.values.get("edit_bill", type=int)
|
||||
bill_edit_form = get_billform_for(g.project)
|
||||
if edit_bill is not None:
|
||||
bill = Bill.query.get(g.project, edit_bill)
|
||||
if not bill:
|
||||
raise NotFound()
|
||||
bill_edit_form.fill(bill, g.project)
|
||||
|
||||
# Each item will be a (weight_sum, Bill) tuple.
|
||||
# TODO: improve this awkward result using column_property:
|
||||
# https://docs.sqlalchemy.org/en/14/orm/mapped_sql_expr.html.
|
||||
|
@ -675,6 +683,8 @@ def list_bills():
|
|||
bills=weighted_bills,
|
||||
member_form=MemberForm(g.project),
|
||||
bill_form=bill_form,
|
||||
edit_bill=edit_bill,
|
||||
bill_edit_form=bill_edit_form,
|
||||
csrf_form=csrf_form,
|
||||
add_bill=request.values.get("add_bill", False),
|
||||
current_view="list_bills",
|
||||
|
|
Loading…
Reference in a new issue