mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-28 17:32:38 +02:00
[History] Truncate external links in history when they are too long
This commit is contained in:
parent
c0f49cb124
commit
7412d67ed6
2 changed files with 15 additions and 1 deletions
|
@ -424,6 +424,15 @@ footer .footer-left {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* used to tuncate long urls */
|
||||||
|
.truncated {
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
max-width: 250px;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
.balance .balance-value {
|
.balance .balance-value {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|
|
@ -177,9 +177,11 @@
|
||||||
{% trans %}Project {{ name }} added{% endtrans %}
|
{% trans %}Project {{ name }} added{% endtrans %}
|
||||||
{% elif event.object_type == "Bill" %}
|
{% elif event.object_type == "Bill" %}
|
||||||
{% trans %}Bill {{ name }} added{% endtrans %}
|
{% trans %}Bill {{ name }} added{% endtrans %}
|
||||||
|
|
||||||
{% elif event.object_type == "Person" %}
|
{% elif event.object_type == "Person" %}
|
||||||
{% trans %}Participant {{ name }} added{% endtrans %}
|
{% trans %}Participant {{ name }} added{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% elif event.operation_type == OperationType.UPDATE %}
|
{% elif event.operation_type == OperationType.UPDATE %}
|
||||||
{% if event.object_type == "Project" %}
|
{% if event.object_type == "Project" %}
|
||||||
{% if event.prop_changed == "password" %}
|
{% if event.prop_changed == "password" %}
|
||||||
|
@ -200,7 +202,7 @@
|
||||||
{% 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 == "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 class='truncated' 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" %}
|
||||||
{{ owers_changed(event, True)}}
|
{{ owers_changed(event, True)}}
|
||||||
{% elif event.prop_changed == "owers_removed" %}
|
{% elif event.prop_changed == "owers_removed" %}
|
||||||
|
@ -218,6 +220,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
{% trans %}Bill {{ name }} modified{% endtrans %}
|
{% trans %}Bill {{ name }} modified{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% elif event.object_type == "Person" %}
|
{% elif event.object_type == "Person" %}
|
||||||
{% if event.prop_changed == "activated" %}
|
{% if event.prop_changed == "activated" %}
|
||||||
{% if event.val_after == False %}
|
{% if event.val_after == False %}
|
||||||
|
@ -236,12 +239,14 @@
|
||||||
{% trans %}Participant {{ name }} modified{% endtrans %}
|
{% trans %}Participant {{ name }} modified{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% elif event.operation_type == OperationType.DELETE %}
|
{% elif event.operation_type == OperationType.DELETE %}
|
||||||
{% if event.object_type == "Bill" %}
|
{% if event.object_type == "Bill" %}
|
||||||
{% trans %}Bill {{ name }} removed{% endtrans %}
|
{% trans %}Bill {{ name }} removed{% endtrans %}
|
||||||
{% elif event.object_type == "Person" %}
|
{% elif event.object_type == "Person" %}
|
||||||
{% trans %}Participant {{ name }} removed{% endtrans %}
|
{% trans %}Participant {{ name }} removed{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{# Should be unreachable #}
|
{# Should be unreachable #}
|
||||||
{% if event.object_type == "Project" %}
|
{% if event.object_type == "Project" %}
|
||||||
|
|
Loading…
Reference in a new issue