mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-07-03 17:22:51 +02:00
Display team detail
This commit is contained in:
@ -28,17 +28,26 @@ class TeamTable(tables.Table):
|
||||
# noinspection PyTypeChecker
|
||||
class ParticipationTable(tables.Table):
|
||||
name = tables.LinkColumn(
|
||||
'participation:participation_detail',
|
||||
args=[tables.A("id")],
|
||||
verbose_name=lambda: _("name").capitalize(),
|
||||
'participation:team_detail',
|
||||
args=[tables.A("team__id")],
|
||||
verbose_name=_("name").capitalize,
|
||||
accessor="team__name",
|
||||
)
|
||||
|
||||
trigram = tables.Column(
|
||||
verbose_name=lambda: _("trigram").capitalize(),
|
||||
verbose_name=_("trigram").capitalize,
|
||||
accessor="team__trigram",
|
||||
)
|
||||
|
||||
valid = tables.Column(
|
||||
verbose_name=_("valid").capitalize,
|
||||
accessor="valid",
|
||||
empty_values=(),
|
||||
)
|
||||
|
||||
def render_valid(self, value):
|
||||
return _("Validated") if value else _("Validation pending") if value is False else _("Not validated")
|
||||
|
||||
class Meta:
|
||||
attrs = {
|
||||
'class': 'table table condensed table-striped',
|
||||
|
Reference in New Issue
Block a user