mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 11:18:27 +02:00
Localize table headers
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import django_tables2 as tables
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.translation import gettext as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django_tables2 import A
|
||||
|
||||
from member.models import Solution, Synthesis
|
||||
@ -54,6 +54,7 @@ class SolutionTable(tables.Table):
|
||||
"tournament:detail",
|
||||
args=[A("tournament.pk")],
|
||||
accessor=A("tournament"),
|
||||
verbose_name=_("tournament"),
|
||||
)
|
||||
|
||||
file = tables.LinkColumn(
|
||||
@ -87,6 +88,7 @@ class SynthesisTable(tables.Table):
|
||||
"tournament:detail",
|
||||
args=[A("tournament.pk")],
|
||||
accessor=A("tournament"),
|
||||
verbose_name=_("tournament"),
|
||||
)
|
||||
|
||||
file = tables.LinkColumn(
|
||||
@ -111,6 +113,10 @@ class SynthesisTable(tables.Table):
|
||||
|
||||
|
||||
class PoolTable(tables.Table):
|
||||
problems = tables.Column(verbose_name=_("Problems"))
|
||||
|
||||
tournament = tables.Column(verbose_name=_("Tournament"))
|
||||
|
||||
def render_teams(self, value):
|
||||
return ", ".join(team.trigram for team in value.all())
|
||||
|
||||
|
Reference in New Issue
Block a user