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.
08805a6360
...
a84ffcf0a3
@ -107,6 +107,11 @@ class PoolTable(tables.Table):
|
|||||||
|
|
||||||
|
|
||||||
class PassageTable(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(
|
reporter = tables.LinkColumn(
|
||||||
"participation:passage_detail",
|
"participation:passage_detail",
|
||||||
args=[tables.A("id")],
|
args=[tables.A("id")],
|
||||||
@ -130,12 +135,16 @@ class PassageTable(tables.Table):
|
|||||||
'class': 'table table-condensed table-striped text-center',
|
'class': 'table table-condensed table-striped text-center',
|
||||||
}
|
}
|
||||||
model = Passage
|
model = Passage
|
||||||
fields = ('reporter', 'opponent', 'reviewer',) \
|
fields = ('reporter', 'opponent', 'reviewer', 'observer', 'solution_number', )
|
||||||
+ (('observer',) if settings.HAS_OBSERVER else ()) \
|
|
||||||
+ ('solution_number', )
|
|
||||||
|
|
||||||
|
|
||||||
class NoteTable(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(
|
jury = tables.Column(
|
||||||
attrs={
|
attrs={
|
||||||
"td": {
|
"td": {
|
||||||
@ -161,6 +170,4 @@ class NoteTable(tables.Table):
|
|||||||
}
|
}
|
||||||
model = Note
|
model = Note
|
||||||
fields = ('jury', 'reporter_writing', 'reporter_oral', 'opponent_writing', 'opponent_oral',
|
fields = ('jury', 'reporter_writing', 'reporter_oral', 'opponent_writing', 'opponent_oral',
|
||||||
'reviewer_writing', 'reviewer_oral',) + \
|
'reviewer_writing', 'reviewer_oral', 'observer_writing', 'observer_oral', 'update',)
|
||||||
(('observer_writing', 'observer_oral') if settings.HAS_OBSERVER else ()) + \
|
|
||||||
('update',)
|
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
{{ object.user.last_name }}
|
||||||
|
{{ object.user.first_name }}
|
||||||
|
{{ object.user.email }}
|
Loading…
x
Reference in New Issue
Block a user