Merge branch 'master' of atrey.karlin.mff.cuni.cz:/akce/MaM/MaMweb/mamweb
This commit is contained in:
		
						commit
						b3abe947ff
					
				
					 14 changed files with 41 additions and 16 deletions
				
			
		|  | @ -17,8 +17,9 @@ | |||
|     <script type="text/javascript" src="{{ STATIC_URL }}fluent_comments/js/ajaxcomments.js"></script> | ||||
| 
 | ||||
|   </head> | ||||
|   <body class='{% if True %}org-logged-in{% endif %}'> | ||||
|     <!-- TODO: only on org login --> | ||||
|   <body class='{% if user.is_authenticated %}org-logged-in{% endif %}'> | ||||
|   {# TODO predelat pro pouze pro orgy (misto pro prihlasene) #} | ||||
|   {% if user.is_authenticated %}  | ||||
|     <div class="login-bar" style='background: #F80;'> | ||||
|       {% if view.object %} | ||||
| 	Objekt {{ view.object }}: {{ view.object }} | ||||
|  | @ -29,6 +30,8 @@ | |||
| 	<a href='{% url 'admin:flatpages_flatpage_change' flatpage.id %}'>[admin]</a> | ||||
|       {% endif %} | ||||
|     </div> | ||||
|   {% endif %} | ||||
| 
 | ||||
|     <div class="container"> | ||||
| 	  <div class='row'> | ||||
| 		<div class='col-md-12'> | ||||
|  | @ -42,7 +45,7 @@ | |||
| 	  <div id="header"> | ||||
| 		  <div class='header-lg visible-lg-block'> | ||||
| 			<img class="logo" src="{% static 'images/logocb.png' %}" /> | ||||
| 			<h1>Nadpis 1. úrovně</h1> | ||||
|       <h1>{% block nadpis1 %}Nadpis 1. úrovně{% endblock %}</h1> | ||||
| 			<img class="header" src="{% static 'images/liska6.png' %}" /> | ||||
| 			<!--<a href="/">Korespondenční seminář M&M</a>--> | ||||
| 		  </div> | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ | |||
| {% block title %}{{ flatpage.title }}{% endblock title %} | ||||
| 
 | ||||
| {% block content %} | ||||
| <h2>{{ flatpage.title }}</h2> | ||||
| <h2>{% block nadpis1 %}{{ flatpage.title }}{% endblock %}</h2> | ||||
| <div> | ||||
| {{ flatpage.content }} | ||||
| </div> | ||||
|  |  | |||
|  | @ -7,7 +7,7 @@ | |||
|   <li><a href="/zadani/aktualni/">Zadání</a> | ||||
|   <li><a href="/clanky/uvod/">Články</a> | ||||
|   <li><a href="/archiv/cisla/">Archiv</a> | ||||
|   <li><a href="/odevzdat-reseni/muj-ucet">Odeslat řešení</a> | ||||
|   <li>{#<a href="/odevzdat-reseni/muj-ucet">#}Odeslat řešení{#</a>#} | ||||
| </ul> | ||||
| 
 | ||||
| <!-- TODO smazat <ul> | ||||
|  |  | |||
|  | @ -6,7 +6,7 @@ | |||
| 
 | ||||
| {% block content %} | ||||
| <div> | ||||
|   <h2>Archiv čísel</h2> | ||||
|   <h2>{% block nadpis1 %}Archiv čísel {% endblock %}</h2> | ||||
| 
 | ||||
|   <ul> | ||||
|     {% for r in object_list %} | ||||
|  |  | |||
|  | @ -2,7 +2,7 @@ | |||
| 
 | ||||
| {% block content %} | ||||
| <div> | ||||
|   <h2>Číslo {{ cislo }}</h2> | ||||
|   <h2>{% block nadpis1 %}Číslo {{ cislo }}{% endblock%}</h2> | ||||
| 
 | ||||
|   <p><a href='{{ cislo.rocnik.verejne_url }}'>Ročník {{ cislo.rocnik }}</a> | ||||
| 
 | ||||
|  |  | |||
|  | @ -5,7 +5,7 @@ | |||
| {% block content %} | ||||
| <div> | ||||
|   {% if problem.cislo_zadani %} | ||||
|     <h2>Problém {{ problem.kod_v_rocniku }}: {{ problem.nazev }}</h2> | ||||
|     <h2>{% block nadpis1 %}Problém {{ problem.kod_v_rocniku }}: {{ problem.nazev }}{% endblock %}</h2> | ||||
| 
 | ||||
|     <p>Zadáno v čísle <a href='{{ problem.cislo_zadani.verejne_url }}'>{{ problem.cislo_zadani.kod }}</a>. | ||||
|     {% if problem.cislo_reseni %} | ||||
|  |  | |||
|  | @ -2,7 +2,7 @@ | |||
| 
 | ||||
| {% block content %} | ||||
| <div> | ||||
|   <h2>Ročník {{ rocnik.roman }}</h2> | ||||
|   <h2>{% block nadpis1 %} Ročník {{ rocnik.roman }} {% endblock %}</h2> | ||||
| 
 | ||||
|   <p>Ročník číslo {{ rocnik.rocnik }} ({{ rocnik.prvni_rok }}/{{ rocnik.druhy_rok }}) | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,9 +1,15 @@ | |||
| {% extends "seminar/cojemam/base.html" %} | ||||
| 
 | ||||
| {% block nadpis1 %} | ||||
|   {% if aktivni %} | ||||
|     Organizátoři | ||||
|   {% else %} | ||||
|     Vysloužilí organizátoři | ||||
|   {% endif %} | ||||
| {% endblock%} | ||||
| 
 | ||||
| {% block content %} | ||||
| <div> | ||||
|   <h2>Organizátoři</h2> | ||||
| 
 | ||||
|   {% for org in object_list %} | ||||
|     {% if org.user.is_active %} | ||||
|       <b>Aktivní</b> | ||||
|  | @ -40,6 +46,10 @@ | |||
|     <hr> | ||||
|   {% endfor %} | ||||
| 
 | ||||
|   {% if aktivni%} | ||||
|     <a href="organizovali/">Vysloužilí organizátoři</a> | ||||
|   {% endif %} | ||||
| 
 | ||||
| </div> | ||||
| {% endblock content %} | ||||
| 
 | ||||
|  |  | |||
|  | @ -2,7 +2,7 @@ | |||
| 
 | ||||
| {% block content %}  | ||||
| 
 | ||||
|   <h1> Soustředění </h1> | ||||
|   <h1>{% block nadpis1 %}Soustředění{% endblock %}</h1> | ||||
| 
 | ||||
|   {# Projdi vsechna soustredeni #} | ||||
|   {% for soustredeni in object_list %} | ||||
|  |  | |||
|  | @ -2,7 +2,6 @@ | |||
| 
 | ||||
| <ul> | ||||
|   <li><a href="{{cesta}}/uvod/">Úvod</a> | ||||
|   <li><a href="{{cesta}}/pristi/">Příští soustředění</a> | ||||
|   <li><a href="{{cesta}}/pripravujeme/">Připravujeme</a> | ||||
|   <li><a href="{{cesta}}/probehlo/">Proběhlo</a> | ||||
| </ul> | ||||
|  |  | |||
|  | @ -2,7 +2,7 @@ | |||
| 
 | ||||
| {% block content %} | ||||
| <div> | ||||
|   <h2>Stav databáze</h2> | ||||
|   <h2>{% block nadpis1 %}Stav databáze{% endblock %}</h2> | ||||
| 
 | ||||
|   <h3>Řešitelé</h3> | ||||
| 
 | ||||
|  |  | |||
|  | @ -2,7 +2,7 @@ | |||
| 
 | ||||
| {% block content %} | ||||
| <div> | ||||
|   <h2>Aktuální zadání</h2> | ||||
|   <h2>{% block nadpis1 %}Aktuální zadání{% endblock %}</h2> | ||||
| 
 | ||||
|   {% for problem in  nastaveni.aktualni_cislo.zadane_problemy.all %} | ||||
|     Problém {{problem}} <br> | ||||
|  |  | |||
|  | @ -3,7 +3,8 @@ from . import views, export | |||
| 
 | ||||
| urlpatterns = patterns('', | ||||
| 
 | ||||
|     url(r'^co-je-MaM/organizatori/$', views.CojemamOrganizatoriView.as_view()), | ||||
|     url(r'^co-je-MaM/organizatori/$', views.CojemamOrganizatoriView.as_view(), name='organizatori'), | ||||
|     url(r'^co-je-MaM/organizatori/organizovali/$', views.CojemamOrganizatoriStariView.as_view(), name='stari_organizatori'), | ||||
| 
 | ||||
|     url(r'^archiv/cisla/$', views.CislaView.as_view()), | ||||
| 
 | ||||
|  |  | |||
|  | @ -18,9 +18,21 @@ def AktualniZadaniView(request): | |||
| 
 | ||||
| ### Co je M&M | ||||
| 
 | ||||
| ## Organizatori | ||||
| 
 | ||||
| class CojemamOrganizatoriView(generic.ListView): | ||||
|     model = Organizator | ||||
|     template_name='seminar/cojemam/organizatori.html' | ||||
|     queryset = Organizator.objects.filter(user__is_active=True).order_by('user__first_name') | ||||
|     def get_context_data(self, **kwargs): | ||||
|         context = super(CojemamOrganizatoriView, self).get_context_data(**kwargs) | ||||
|         context['aktivni'] = True | ||||
|         return context | ||||
| 
 | ||||
| class CojemamOrganizatoriStariView(generic.ListView): | ||||
|     model = Organizator | ||||
|     template_name='seminar/cojemam/organizatori.html' | ||||
|     queryset = Organizator.objects.filter(user__is_active=False) | ||||
| 
 | ||||
| ### Archiv | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Aneta
						Aneta