mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 07:02:10 +01:00 
			
		
		
		
	Display informations about the final tournament in the sidebar
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
		@@ -272,6 +272,19 @@ class ParticipantRegistration(Registration):
 | 
			
		||||
                        'content': content,
 | 
			
		||||
                    })
 | 
			
		||||
 | 
			
		||||
                if self.team.participation.final:
 | 
			
		||||
                    if not self.photo_authorization_final:
 | 
			
		||||
                        text = _("You have not uploaded your photo authorization for the final tournament. "
 | 
			
		||||
                                 "You can do it by clicking on <a href=\"{photo_url}\">this link</a>.")
 | 
			
		||||
                        photo_url = reverse_lazy("registration:upload_user_photo_authorization_final", args=(self.id,))
 | 
			
		||||
                        content = format_lazy(text, photo_url=photo_url)
 | 
			
		||||
                        informations.append({
 | 
			
		||||
                            'title': _("Photo authorization"),
 | 
			
		||||
                            'type': "danger",
 | 
			
		||||
                            'priority': 5,
 | 
			
		||||
                            'content': content,
 | 
			
		||||
                        })
 | 
			
		||||
 | 
			
		||||
            informations.extend(self.team.important_informations())
 | 
			
		||||
 | 
			
		||||
        return informations
 | 
			
		||||
@@ -419,6 +432,20 @@ class StudentRegistration(ParticipantRegistration):
 | 
			
		||||
                        'content': content,
 | 
			
		||||
                    })
 | 
			
		||||
 | 
			
		||||
            if self.team.participation.final:
 | 
			
		||||
                if self.under_18_final and not self.parental_authorization_final:
 | 
			
		||||
                    text = _("You have not uploaded your parental authorization for the final tournament. "
 | 
			
		||||
                             "You can do it by clicking on <a href=\"{parental_url}\">this link</a>.")
 | 
			
		||||
                    parental_url = reverse_lazy("registration:upload_user_parental_authorization_final",
 | 
			
		||||
                                                args=(self.id,))
 | 
			
		||||
                    content = format_lazy(text, parental_url=parental_url)
 | 
			
		||||
                    informations.append({
 | 
			
		||||
                        'title': _("Parental authorization"),
 | 
			
		||||
                        'type': "danger",
 | 
			
		||||
                        'priority': 5,
 | 
			
		||||
                        'content': content,
 | 
			
		||||
                    })
 | 
			
		||||
 | 
			
		||||
        return informations
 | 
			
		||||
 | 
			
		||||
    class Meta:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user