diff --git a/apps/tournament/tables.py b/apps/tournament/tables.py index 05101f4..e16b0fa 100644 --- a/apps/tournament/tables.py +++ b/apps/tournament/tables.py @@ -1,4 +1,5 @@ import django_tables2 as tables +from django.urls import reverse_lazy from django.utils.translation import gettext as _ from django_tables2 import A @@ -119,7 +120,12 @@ class PoolTable(tables.Table): class Meta: model = Pool - fields = ("teams", "problems", "round", "juries", ) + fields = ("teams", "tournament", "problems", "round", "juries", ) attrs = { 'class': 'table table-condensed table-striped table-hover' } + row_attrs = { + 'style': 'cursor: pointer;', + 'class': 'row-control', + 'data-href': lambda record: reverse_lazy('tournament:pool_detail', args=(record.pk,)), + } diff --git a/templates/tournament/pool_detail.html b/templates/tournament/pool_detail.html index e45cffa..79bb91d 100644 --- a/templates/tournament/pool_detail.html +++ b/templates/tournament/pool_detail.html @@ -67,4 +67,10 @@ {% endif %} + +