Force line breaks on transactions reason in history, but don't wrap dates or amounts

This commit is contained in:
Yohann D'ANELLO 2020-09-02 23:49:10 +02:00
parent 7bdf5a4366
commit fed9567522
2 changed files with 34 additions and 2 deletions

View File

@ -356,4 +356,4 @@ class MembershipTransaction(Transaction):
@property
def type(self):
return _('membership transaction')
return _('membership').capitalize()

View File

@ -29,6 +29,7 @@ class HistoryTable(tables.Table):
source = tables.Column(
attrs={
"td": {
"class": "text-nowrap",
"data-toggle": "tooltip",
"title": lambda record: _("used alias").capitalize() + " : " + record.source_alias,
}
@ -38,15 +39,46 @@ class HistoryTable(tables.Table):
destination = tables.Column(
attrs={
"td": {
"class": "text-nowrap",
"data-toggle": "tooltip",
"title": lambda record: _("used alias").capitalize() + " : " + record.destination_alias,
}
}
)
created_at = tables.DateColumn(
attrs={
"td": {
"class": "text-nowrap",
},
}
)
amount = tables.Column(
attrs={
"td": {
"class": "text-nowrap",
},
}
)
reason = tables.Column(
attrs={
"td": {
"class": "text-break",
},
}
)
type = tables.Column()
total = tables.Column() # will use Transaction.total() !!
total = tables.Column( # will use Transaction.total() !!
attrs={
"td": {
"class": "text-nowrap",
},
}
)
valid = tables.Column(
attrs={