Soustredeni | seznam soustredeni
Casy se nezobrazuji cesky
This commit is contained in:
		
							parent
							
								
									2f8eb74b87
								
							
						
					
					
						commit
						f71ea2db1a
					
				
					 4 changed files with 54 additions and 6 deletions
				
			
		|  | @ -5,7 +5,7 @@ | |||
| 
 | ||||
| <ul> | ||||
|   <li><a href="/co-je-MaM/uvod/">Co je M&M</a> | ||||
|   <li><a href="/soustredeni/uvod/">Soustředění</a> | ||||
|   <li><a href="/soustredeni/">Soustředění</a> | ||||
|   <li><a href="/zadani/aktualni/">Zadání</a> | ||||
|   <li><a href="/clanky/uvod/">Články</a> | ||||
|   <li><a href="/archiv/cisla/">Archiv</a> | ||||
|  |  | |||
|  | @ -0,0 +1,41 @@ | |||
| {% extends "seminar/soustredeni/base.html" %} | ||||
| 
 | ||||
| {% block content %}  | ||||
| 
 | ||||
|   <h1> Soustředění </h1> | ||||
| 
 | ||||
|   {# Projdi vsechna soustredeni #} | ||||
|   {% for soustredeni in object_list %} | ||||
|     {# Kdyz je verejne -> zobraz #} | ||||
|     {% if soustredeni.verejne_db %} | ||||
|       {# misto a cas soustredeni TODO upravit#} | ||||
|       {% if soustredeni.misto %} | ||||
|         <h2> | ||||
|           Soustředění v {{soustredeni.misto}} | ||||
|           od {{soustredeni.datum_zacatku}} do {{soustredeni.datum_konce}} | ||||
|           při {{soustredeni.rocnik.rocnik}}. ročníku M&M | ||||
|         </h2> | ||||
|       {% endif %} | ||||
|       {# popis soustredeni #} | ||||
|       {% if soustredeni.text %} | ||||
|         {% autoescape off %}{{soustredeni.text}}{% endautoescape %} | ||||
|       {% endif %} | ||||
|       {# Účastníci #} | ||||
|       <h3>Soustředění se zůčastnili tito účastníci:</h3> | ||||
|       <ul> | ||||
|       {% for i in soustredeni.soustredeni_ucastnici_set.all %} | ||||
|         <li>{{i.resitel}} | ||||
|       {% empty %} | ||||
|         <li>Nic! | ||||
|       {% endfor %} | ||||
|       </ul> | ||||
|     {# Kdyz neni verejne, tak TODO zobraz jen pro prihlasene orgy #} | ||||
|     {% else %} | ||||
|       {# TODO if org je prihlaseny, predelat na (verejne OR jsem_org)  #} | ||||
|     {% endif %} | ||||
|   {% empty %} | ||||
|     Žádná soustředění zatím neproběhla! | ||||
|   {% endfor %} | ||||
| 
 | ||||
| {% endblock %} | ||||
| 
 | ||||
|  | @ -11,6 +11,7 @@ urlpatterns = patterns('', | |||
|     url(r'^cislo/(?P<rocnik>\d+).(?P<cislo>\d+)/$', views.CisloView.as_view(), name='seminar_cislo'), | ||||
|     url(r'^problem/(?P<pk>\d+)/$', views.ProblemView.as_view(), name='seminar_problem'), | ||||
| 
 | ||||
|     url(r'^soustredeni/$', views.SoustredeniListView.as_view()), | ||||
|     url(r'^soustredeni/(?P<pk>\d+)/$', views.SoustredeniView.as_view(), name='seminar_soustredeni'), | ||||
| 
 | ||||
|     url(r'^zadani/aktualni/$', views.AktualniZadaniView, name='seminar_aktualni_zadani'), | ||||
|  |  | |||
|  | @ -15,12 +15,14 @@ def AktualniZadaniView(request): | |||
|                 }, | ||||
|             ) | ||||
| 
 | ||||
| # Co je M&M | ||||
| ### Co je M&M | ||||
| 
 | ||||
| class CojemamOrganizatoriView(generic.ListView): | ||||
|     model = Organizator | ||||
|     template_name='seminar/cojemam/organizatori.html' | ||||
| 
 | ||||
| ### Archiv | ||||
| 
 | ||||
| class CislaView(generic.ListView): | ||||
|     model = Rocnik | ||||
|     template_name='seminar/archiv/cisla.html' | ||||
|  | @ -43,10 +45,6 @@ class RocnikView(generic.DetailView): | |||
|                           {'verbose_name': queryset.model._meta.verbose_name}) | ||||
|         return obj | ||||
| 
 | ||||
| class SoustredeniView(generic.DetailView): | ||||
|     model = Soustredeni | ||||
|     template_name = 'seminar/archiv/soustredeni.html' | ||||
| 
 | ||||
| class ProblemView(generic.DetailView): | ||||
|     model = Problem | ||||
|     template_name = 'seminar/archiv/problem.html' | ||||
|  | @ -107,4 +105,12 @@ class CisloView(generic.DetailView): | |||
|         context['problemy'] = problemy | ||||
|         return context | ||||
| 
 | ||||
| ### Soustredeni | ||||
| 
 | ||||
| class SoustredeniListView(generic.ListView): | ||||
|     model = Soustredeni | ||||
|     template_name = 'seminar/soustredeni/seznam_soustredeni.html' | ||||
| 
 | ||||
| class SoustredeniView(generic.DetailView): | ||||
|     model = Soustredeni | ||||
|     template_name = 'seminar/archiv/soustredeni.html' | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Bc. Petr Pecha
						Bc. Petr Pecha