1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-11-26 18:37:12 +00:00

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 @property
def type(self): def type(self):
return _('membership transaction') return _('membership').capitalize()

View File

@ -29,6 +29,7 @@ class HistoryTable(tables.Table):
source = tables.Column( source = tables.Column(
attrs={ attrs={
"td": { "td": {
"class": "text-nowrap",
"data-toggle": "tooltip", "data-toggle": "tooltip",
"title": lambda record: _("used alias").capitalize() + " : " + record.source_alias, "title": lambda record: _("used alias").capitalize() + " : " + record.source_alias,
} }
@ -38,15 +39,46 @@ class HistoryTable(tables.Table):
destination = tables.Column( destination = tables.Column(
attrs={ attrs={
"td": { "td": {
"class": "text-nowrap",
"data-toggle": "tooltip", "data-toggle": "tooltip",
"title": lambda record: _("used alias").capitalize() + " : " + record.destination_alias, "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() 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( valid = tables.Column(
attrs={ attrs={