Fix zobrazování neveřejných čísel v archivu
This commit is contained in:
		
							parent
							
								
									93966ca2a9
								
							
						
					
					
						commit
						843025d635
					
				
					 2 changed files with 5 additions and 3 deletions
				
			
		|  | @ -35,9 +35,9 @@ | ||||||
|         Jednotlivá čísla: |         Jednotlivá čísla: | ||||||
|         <ul> |         <ul> | ||||||
|           {% for cislo in rocnik.cisla.all reversed %} |           {% for cislo in rocnik.cisla.all reversed %} | ||||||
|           <li><a href='{{ cislo.verejne_url }}'>{{ cislo.poradi }}. číslo</a> {% if cislo.pdf %}(<a href='{{ cislo.pdf.url }}'>pdf</a>) {% endif %} |             {% if cislo.verejne or user.je_org %} | ||||||
|           {% empty %} |               <li><a href='{{ cislo.verejne_url }}'>{{ cislo.poradi }}. číslo</a> {% if cislo.pdf %}(<a href='{{ cislo.pdf.url }}'>pdf</a>) {% endif %} | ||||||
|           Žádná čísla k zobrazení |             {% endif %} | ||||||
|           {% endfor %} |           {% endfor %} | ||||||
|           </ul> |           </ul> | ||||||
|           <a href='{{ rocnik.verejne_url }}'>Výsledková listina</a> <!-- FIXME:  url výsledkovky--> |           <a href='{{ rocnik.verejne_url }}'>Výsledková listina</a> <!-- FIXME:  url výsledkovky--> | ||||||
|  |  | ||||||
|  | @ -630,6 +630,8 @@ class ArchivView(generic.ListView): | ||||||
| 		context = super(ArchivView, self).get_context_data(**kwargs) | 		context = super(ArchivView, self).get_context_data(**kwargs) | ||||||
| 
 | 
 | ||||||
| 		cisla = Cislo.objects.filter(poradi=1) | 		cisla = Cislo.objects.filter(poradi=1) | ||||||
|  | 		if not self.request.user.je_org: | ||||||
|  | 			cisla = cisla.filter(verejne_db=True) | ||||||
| 		urls ={} | 		urls ={} | ||||||
| 
 | 
 | ||||||
| 		for i, c in enumerate(cisla): | 		for i, c in enumerate(cisla): | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue