Organizatori zobrazeni u soustredeni
Organizatori se zobrazuji u soustredeni a ucastnici se zobrazuji prehledneji a zbytecne nenatahuji stranku
This commit is contained in:
		
							parent
							
								
									d0846dbca0
								
							
						
					
					
						commit
						be29975d06
					
				
					 2 changed files with 21 additions and 5 deletions
				
			
		|  | @ -612,7 +612,12 @@ class Organizator(models.Model): | |||
|             options={'quality': 95}) | ||||
| 
 | ||||
|     def __str__(self): | ||||
|         return str(self.user) | ||||
|         if self.prezdivka: | ||||
|             return u"%s '%s' %s" % (self.user.first_name, | ||||
|                                     self.prezdivka, | ||||
|                                     self.user.last_name) | ||||
|         else: | ||||
|             return u"%s %s" % (self.user.first_name, self.user.last_name) | ||||
| 
 | ||||
|     class Meta: | ||||
|         verbose_name = 'Organizátor' | ||||
|  |  | |||
|  | @ -60,16 +60,27 @@ | |||
|         {% autoescape off %}{{soustredeni.text}}{% endautoescape %} | ||||
|       {% endif %} | ||||
|       {% if user.is_authenticated %} | ||||
|       <div class="mam-org-only"> | ||||
|         {# Účastníci #} | ||||
|         <h3>Soustředění se zúčastnili tito účastníci:</h3> | ||||
|         <ul> | ||||
|         <p> | ||||
|         {% for i in soustredeni.soustredeni_ucastnici_set.all %} | ||||
|           <li>{{i.resitel}} | ||||
|           {{i.resitel}}{% if forloop.last %}.{% else %},{% endif %} | ||||
|         {% empty %} | ||||
|           <li>Nic! | ||||
|           Nic! | ||||
|         {% endfor %} | ||||
|         </ul> | ||||
|         </p> | ||||
|         <h3>Soustředění se účastnili tito organizátoři:</h3> | ||||
|         <p> | ||||
|         {% for i in soustredeni.soustredeni_organizatori_set.all %} | ||||
|           {{i.organizator}}{% if forloop.last %}.{% else %},{% endif %} | ||||
|         {% empty %} | ||||
|           Nic! | ||||
|         {% endfor %} | ||||
|         </p> | ||||
|       {% endif %} | ||||
|       </div> | ||||
| 
 | ||||
|       {% if not soustredeni.verejne_db and user.is_staff %} | ||||
|         </div> {# class="mam-org-only" #} | ||||
|       {% endif %} | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Bc. Petr Pecha
						Bc. Petr Pecha