mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-28 17:32:38 +02:00
[History] Small code reorganization
This commit is contained in:
parent
382780b05c
commit
c0f49cb124
1 changed files with 36 additions and 34 deletions
|
@ -195,22 +195,10 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ _("Project settings modified") }}
|
{{ _("Project settings modified") }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif event.prop_changed == "activated" %}
|
{% elif event.object_type == "Bill" %}
|
||||||
{% if event.val_after == False %}
|
{% if event.prop_changed == "what" %}
|
||||||
{% trans %}Participant {{ name }} deactivated{% endtrans %}
|
|
||||||
{% else %}
|
|
||||||
{% trans %}Participant {{ name }} reactivated{% endtrans %}
|
|
||||||
{% endif %}
|
|
||||||
{% elif event.prop_changed == "name" %}
|
|
||||||
{% set new_name=event.val_after|em_surround %}
|
|
||||||
{% trans %}Participant {{ name }} renamed to {{ new_name }}{% endtrans %}
|
|
||||||
{% elif event.prop_changed == "what" %}
|
|
||||||
{% set new_description=event.val_after|em_surround %}
|
{% set new_description=event.val_after|em_surround %}
|
||||||
{% trans %}Bill {{ name }} renamed to {{ new_description }}{% endtrans %}
|
{% trans %}Bill {{ name }} renamed to {{ new_description }}{% endtrans %}
|
||||||
{% elif event.prop_changed == "weight" %}
|
|
||||||
{% set old_weight=event.val_before|em_surround %}
|
|
||||||
{% set new_weight=event.val_after|em_surround %}
|
|
||||||
{% trans %}Participant {{ name }}: weight changed from {{ old_weight }} to {{ new_weight }}{% endtrans %}
|
|
||||||
{% elif event.prop_changed == "external_link" %}
|
{% elif event.prop_changed == "external_link" %}
|
||||||
{{ bill_property_change(event, _("External link"), None, "<a href='{link}' >{link}</a>".format(link=event.val_after | escape) | safe | em_surround) }}
|
{{ bill_property_change(event, _("External link"), None, "<a href='{link}' >{link}</a>".format(link=event.val_after | escape) | safe | em_surround) }}
|
||||||
{% elif event.prop_changed == "owers_added" %}
|
{% elif event.prop_changed == "owers_added" %}
|
||||||
|
@ -228,9 +216,23 @@
|
||||||
{% elif event.prop_changed == "converted_amount" %}
|
{% elif event.prop_changed == "converted_amount" %}
|
||||||
{{ bill_property_change(event, _("Amount in %(currency)s", currency=g.project.default_currency)) }}
|
{{ bill_property_change(event, _("Amount in %(currency)s", currency=g.project.default_currency)) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if event.object_type == "Bill" %}
|
|
||||||
{% trans %}Bill {{ name }} modified{% endtrans %}
|
{% trans %}Bill {{ name }} modified{% endtrans %}
|
||||||
|
{% endif %}
|
||||||
{% elif event.object_type == "Person" %}
|
{% elif event.object_type == "Person" %}
|
||||||
|
{% if event.prop_changed == "activated" %}
|
||||||
|
{% if event.val_after == False %}
|
||||||
|
{% trans %}Participant {{ name }} deactivated{% endtrans %}
|
||||||
|
{% else %}
|
||||||
|
{% trans %}Participant {{ name }} reactivated{% endtrans %}
|
||||||
|
{% endif %}
|
||||||
|
{% elif event.prop_changed == "name" %}
|
||||||
|
{% set new_name=event.val_after|em_surround %}
|
||||||
|
{% trans %}Participant {{ name }} renamed to {{ new_name }}{% endtrans %}
|
||||||
|
{% elif event.prop_changed == "weight" %}
|
||||||
|
{% set old_weight=event.val_before|em_surround %}
|
||||||
|
{% set new_weight=event.val_after|em_surround %}
|
||||||
|
{% trans %}Participant {{ name }}: weight changed from {{ old_weight }} to {{ new_weight }}{% endtrans %}
|
||||||
|
{% else %}
|
||||||
{% trans %}Participant {{ name }} modified{% endtrans %}
|
{% trans %}Participant {{ name }} modified{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue