mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-29 14:21:04 +02:00
On n'affiche pas les données de l'équipe observatrice quand on a pas
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
# Copyright (C) 2020 by Animath
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from django.conf import settings
|
||||
from django.utils import formats
|
||||
from django.utils.safestring import mark_safe
|
||||
from django.utils.text import format_lazy
|
||||
@ -106,7 +107,10 @@ class PoolTable(tables.Table):
|
||||
|
||||
|
||||
class PassageTable(tables.Table):
|
||||
# FIXME Ne pas afficher l'équipe observatrice si non nécessaire
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
if not settings.HAS_OBSERVER:
|
||||
del self.columns['observer']
|
||||
|
||||
reporter = tables.LinkColumn(
|
||||
"participation:passage_detail",
|
||||
@ -135,6 +139,12 @@ class PassageTable(tables.Table):
|
||||
|
||||
|
||||
class NoteTable(tables.Table):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
if not settings.HAS_OBSERVER:
|
||||
del self.columns['observer_writing']
|
||||
del self.columns['observer_oral']
|
||||
|
||||
jury = tables.Column(
|
||||
attrs={
|
||||
"td": {
|
||||
|
Reference in New Issue
Block a user