Add neveřejná čísla pro orgy v archivu u ročníku (RocnikView)
This commit is contained in:
		
							parent
							
								
									0dba75203e
								
							
						
					
					
						commit
						f777252a96
					
				
					 2 changed files with 53 additions and 0 deletions
				
			
		|  | @ -466,6 +466,11 @@ class Rocnik(SeminarModelBase): | |||
| 		vc.sort(key=lambda c: c.poradi) | ||||
| 		return vc | ||||
| 
 | ||||
| 	def neverejna_cisla(self): | ||||
| 		vc = [c for c in self.cisla.all() if not c.verejne()] | ||||
| 		vc.sort(key=lambda c: c.poradi) | ||||
| 		return vc | ||||
| 
 | ||||
| 	def posledni_verejne_cislo(self): | ||||
| 		vc = self.verejna_cisla() | ||||
| 		return vc[-1] if vc else None | ||||
|  |  | |||
|  | @ -63,6 +63,54 @@ | |||
|   {% endfor %} | ||||
| </div> | ||||
| 
 | ||||
| {% if user.je_org and rocnik.neverejna_cisla %} | ||||
| <div class="mam-org-only"> | ||||
|     <div class="cisla-v-rocniku"> | ||||
|         {% for c in rocnik.neverejna_cisla %} | ||||
|             <div class="cislo_pole"> | ||||
| 
 | ||||
|                 <h6> Číslo {{ c.kod }}</h6> | ||||
| 
 | ||||
|                 <div class="flip-card" id="archiv-rocnik"> | ||||
| 
 | ||||
|                     <div class="flip-card-inner"> | ||||
|                         <div class="flip-card-front"> | ||||
| 
 | ||||
|                             <div class="flip-card-foto"> | ||||
|                                 {% if c.titulka_nahled %} | ||||
|                                     <img src="{{ c.titulka_nahled.url }}" alt="{{ c.kod }}" height=180px> | ||||
|                                 {% else %} | ||||
|                                     {% load static %} <img src="{% static 'images/no-picture.png' %}" height=180px alt="no-picture"> | ||||
|                                 {% endif %} | ||||
|                             </div> | ||||
| 
 | ||||
|                         </div> | ||||
|                         <div class="flip-card-back"> | ||||
| 
 | ||||
|                             <div class="cislo_odkazy"> | ||||
|                                 <ul> | ||||
|                                     <li> | ||||
|                                         <a href="{{ c.verejne_url }}">archiv čísla</a> | ||||
|                                     </li> | ||||
|                                     {% if c.pdf %} | ||||
|                                         <li> | ||||
|                                             <a href='{{ c.pdf.url }}'>pdf</a> | ||||
|                                         </li> | ||||
|                                     {% endif %} | ||||
|                                 </ul> | ||||
|                             </div> | ||||
| 
 | ||||
| 
 | ||||
|                         </div> | ||||
|                     </div> | ||||
|                 </div> | ||||
|             </div> | ||||
| 
 | ||||
|         {% endfor %} | ||||
|     </div> | ||||
| </div> | ||||
| {% endif %} | ||||
| 
 | ||||
| 
 | ||||
|   {% if vysledkovka %} | ||||
|     <h2>Výsledková listina</h2> | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue