mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-05-01 18:51:33 +00:00
Correction non-affichage des colonnes d'observation sans observateur
This commit is contained in:
parent
6841659e41
commit
08805a6360
@ -107,11 +107,6 @@ class PoolTable(tables.Table):
|
||||
|
||||
|
||||
class PassageTable(tables.Table):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
if not settings.HAS_OBSERVER:
|
||||
del self.columns['observer']
|
||||
|
||||
reporter = tables.LinkColumn(
|
||||
"participation:passage_detail",
|
||||
args=[tables.A("id")],
|
||||
@ -135,16 +130,12 @@ class PassageTable(tables.Table):
|
||||
'class': 'table table-condensed table-striped text-center',
|
||||
}
|
||||
model = Passage
|
||||
fields = ('reporter', 'opponent', 'reviewer', 'observer', 'solution_number', )
|
||||
fields = ('reporter', 'opponent', 'reviewer',) \
|
||||
+ (('observer',) if settings.HAS_OBSERVER else ()) \
|
||||
+ ('solution_number', )
|
||||
|
||||
|
||||
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": {
|
||||
@ -170,4 +161,6 @@ class NoteTable(tables.Table):
|
||||
}
|
||||
model = Note
|
||||
fields = ('jury', 'reporter_writing', 'reporter_oral', 'opponent_writing', 'opponent_oral',
|
||||
'reviewer_writing', 'reviewer_oral', 'observer_writing', 'observer_oral', 'update',)
|
||||
'reviewer_writing', 'reviewer_oral',) + \
|
||||
(('observer_writing', 'observer_oral') if settings.HAS_OBSERVER else ()) + \
|
||||
('update',)
|
||||
|
Loading…
x
Reference in New Issue
Block a user