diff --git a/participation/models.py b/participation/models.py index 1f7fcbc..383b9b5 100644 --- a/participation/models.py +++ b/participation/models.py @@ -937,7 +937,7 @@ class Participation(models.Model): problem=opponent_passage.solution_number, passage_url=passage_url) reviewer_text = _("
You will report the solution of the team {reviewer} on the " - "problem {problem}. " + "problem {problem}. " "You can upload your synthesis sheet on this page.
") solution_url = reviewer_passage.defended_solution.file.url passage_url = reverse_lazy("participation:passage_detail", args=(reviewer_passage.pk,)) @@ -947,7 +947,7 @@ class Participation(models.Model): if observer_passage: observer_text = _("You will observe the solution of the team {observer} on the " - "problem {problem}. " + "problem {problem}. " "You can upload your synthesis sheet on this page.
") solution_url = observer_passage.defended_solution.file.url passage_url = reverse_lazy("participation:passage_detail", args=(observer_passage.pk,)) @@ -958,9 +958,14 @@ class Participation(models.Model): else: observer_content = "" - syntheses_template_begin = f"{settings.STATIC_URL}Fiche_synthèse." - syntheses_templates = " — ".join(f"{ext.upper()}" - for ext in ["pdf", "tex", "odt", "docx"]) + if settings.TFJM_APP == "TFJM": + syntheses_template_begin = f"{settings.STATIC_URL}tfjm/Fiche_synthèse." + syntheses_templates = " — ".join(f"{ext.upper()}" + for ext in ["pdf", "tex", "odt", "docx"]) + else: + syntheses_template_begin = f"{settings.STATIC_URL}eteam/Written_review." + syntheses_templates = " — ".join(f"{ext.upper()}" + for ext in ["pdf", "tex"]) syntheses_templates_content = f"{_('Templates:')} {syntheses_templates}
" content = defender_content + opponent_content + reviewer_content + observer_content \ @@ -995,7 +1000,7 @@ class Participation(models.Model): problem=opponent_passage.solution_number, passage_url=passage_url) reviewer_text = _("You will report the solution of the team {reviewer} on the " - "problem {problem}. " + "problem {problem}. " "You can upload your synthesis sheet on this page.
") solution_url = reviewer_passage.defended_solution.file.url passage_url = reverse_lazy("participation:passage_detail", args=(reviewer_passage.pk,)) @@ -1005,7 +1010,7 @@ class Participation(models.Model): if observer_passage: observer_text = _("You will observe the solution of the team {observer} on the " - "problem {problem}. " + "problem {problem}. " "You can upload your synthesis sheet on this page.
") solution_url = observer_passage.defended_solution.file.url passage_url = reverse_lazy("participation:passage_detail", args=(observer_passage.pk,)) @@ -1016,9 +1021,14 @@ class Participation(models.Model): else: observer_content = "" - syntheses_template_begin = f"{settings.STATIC_URL}Fiche_synthèse." - syntheses_templates = " — ".join(f"{ext.upper()}" - for ext in ["pdf", "tex", "odt", "docx"]) + if settings.TFJM_APP == "TFJM": + syntheses_template_begin = f"{settings.STATIC_URL}tfjm/Fiche_synthèse." + syntheses_templates = " — ".join(f"{ext.upper()}" + for ext in ["pdf", "tex", "odt", "docx"]) + else: + syntheses_template_begin = f"{settings.STATIC_URL}eteam/Written_review." + syntheses_templates = " — ".join(f"{ext.upper()}" + for ext in ["pdf", "tex"]) syntheses_templates_content = f"{_('Templates:')} {syntheses_templates}
" content = defender_content + opponent_content + reviewer_content + observer_content \ @@ -1054,7 +1064,7 @@ class Participation(models.Model): problem=opponent_passage.solution_number, passage_url=passage_url) reviewer_text = _("You will report the solution of the team {reviewer} on the " - "problem {problem}. " + "problem {problem}. " "You can upload your synthesis sheet on this page.
") solution_url = reviewer_passage.defended_solution.file.url passage_url = reverse_lazy("participation:passage_detail", args=(reviewer_passage.pk,)) @@ -1064,7 +1074,7 @@ class Participation(models.Model): if observer_passage: observer_text = _("You will observe the solution of the team {observer} on the " - "problem {problem}. " + "problem {problem}. " "You can upload your synthesis sheet on this page.
") solution_url = observer_passage.defended_solution.file.url passage_url = reverse_lazy("participation:passage_detail", args=(observer_passage.pk,)) @@ -1075,9 +1085,14 @@ class Participation(models.Model): else: observer_content = "" - syntheses_template_begin = f"{settings.STATIC_URL}Fiche_synthèse." - syntheses_templates = " — ".join(f"{ext.upper()}" - for ext in ["pdf", "tex", "odt", "docx"]) + if settings.TFJM_APP == "TFJM": + syntheses_template_begin = f"{settings.STATIC_URL}tfjm/Fiche_synthèse." + syntheses_templates = " — ".join(f"{ext.upper()}" + for ext in ["pdf", "tex", "odt", "docx"]) + else: + syntheses_template_begin = f"{settings.STATIC_URL}eteam/Written_review." + syntheses_templates = " — ".join(f"{ext.upper()}" + for ext in ["pdf", "tex"]) syntheses_templates_content = f"{_('Templates:')} {syntheses_templates}
" content = defender_content + opponent_content + reviewer_content + observer_content \ diff --git a/participation/templates/participation/upload_synthesis.html b/participation/templates/participation/upload_synthesis.html index 87415a5..c4714a0 100644 --- a/participation/templates/participation/upload_synthesis.html +++ b/participation/templates/participation/upload_synthesis.html @@ -7,10 +7,15 @@