1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-15 22:27:31 +02:00

Compare commits

..

No commits in common. "08805a63605ba2313ee9862bac6d90b0a6abf618" and "a84ffcf0a3e07e107b5d5bddbca89243e6d22415" have entirely different histories.

2 changed files with 16 additions and 6 deletions

View File

@ -107,6 +107,11 @@ 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")],
@ -130,12 +135,16 @@ class PassageTable(tables.Table):
'class': 'table table-condensed table-striped text-center',
}
model = Passage
fields = ('reporter', 'opponent', 'reviewer',) \
+ (('observer',) if settings.HAS_OBSERVER else ()) \
+ ('solution_number', )
fields = ('reporter', 'opponent', 'reviewer', 'observer', '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": {
@ -161,6 +170,4 @@ class NoteTable(tables.Table):
}
model = Note
fields = ('jury', 'reporter_writing', 'reporter_oral', 'opponent_writing', 'opponent_oral',
'reviewer_writing', 'reviewer_oral',) + \
(('observer_writing', 'observer_oral') if settings.HAS_OBSERVER else ()) + \
('update',)
'reviewer_writing', 'reviewer_oral', 'observer_writing', 'observer_oral', 'update',)

View File

@ -0,0 +1,3 @@
{{ object.user.last_name }}
{{ object.user.first_name }}
{{ object.user.email }}