diff --git a/agagd/agagd_core/tables.py b/agagd/agagd_core/tables.py index 0ae805f2..7b4d9c7a 100644 --- a/agagd/agagd_core/tables.py +++ b/agagd/agagd_core/tables.py @@ -13,6 +13,7 @@ def render(self, value, record, bound_column): self.attrs['td'] = {'class': 'foo'} return tables.LinkColumn.render(self, value, record, bound_column) +#Standard gameTable display as is on agagd.usgo.org and most pages class GameTable(tables.Table): pin_player_1 = WinnerColumn('W', viewname='agagd_core.views.member_detail', @@ -35,6 +36,31 @@ class Meta: "pin_player_2", 'handicap', 'komi', 'tournament_code') sequence = fields +#Modified gaeTable to remove duplicate tournament listing displayed on the page, GitHubIssue#20 +class GameTable2(tables.Table): + pin_player_1 = WinnerColumn('W', + viewname='agagd_core.views.member_detail', + verbose_name="white player", + kwargs={"member_id":tables.A('pin_player_1.member_id')}) + pin_player_2 = WinnerColumn('B', + 'agagd_core.views.member_detail', + verbose_name="black player", + kwargs={"member_id":tables.A('pin_player_2.member_id')}) + tournament_code = tables.LinkColumn( + verbose_name="Tournament", + viewname='agagd_core.views.tournament_detail', + kwargs={'tourn_code':tables.A('tournament_code.tournament_code')},) + + class Meta: + model = Game + # add class="paleblue" to