Browse Source

Merge branch 'master' of atrey.karlin.mff.cuni.cz:/akce/MaM/MaMweb/mamweb

remotes/origin/noc
Honza "Stínovlas" Musílek 9 years ago
parent
commit
9ce86a1a2c
  1. 2
      mamweb/templates/base.html
  2. 11
      mamweb/templates/flatpages/default.html
  3. 6
      seminar/templates/seminar/archiv/problem.html
  4. 5
      seminar/templates/seminar/cojemam/organizatori.html
  5. 2
      seminar/templates/seminar/zadani/AktualniZadani.html
  6. 2
      seminar/templates/seminar/zadani/submenu.html
  7. 6
      seminar/views.py

2
mamweb/templates/base.html

@ -2,7 +2,7 @@
<!DOCTYPE html>
<html lang='cs'>
<head>
<title>{% block title %}Seminář M&amp;M{% endblock title %}</title>
<title>{% block title %}{% block nadpis1a %}{% endblock %} – Korespondenční seminář M&amp;M{% endblock title %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="{% static 'favicon.ico' %}" type="image/x-icon">
{% render_block "css" %}

11
mamweb/templates/flatpages/default.html

@ -1,7 +1,5 @@
{% extends "base.html" %}
{% block title %}{{ flatpage.title }}{% endblock title %}
{% block nadpis1a %}{% block nadpis1b%}
{{ flatpage.title }}
{% endblock %}{% endblock %}
@ -29,6 +27,7 @@
{% with "FAQ" as selected %}
{% include "seminar/cojemam/submenu.html" %}
{% endwith %}
{% elif "kontakt" in flatpage.url %}
{% else %}
{% include "seminar/cojemam/submenu.html" %}
{% endif %}
@ -73,6 +72,10 @@
{% with "resitel" as selected %}
{% include "seminar/clanky/submenu.html" %}
{% endwith %}
{% elif "/jak-psat-vedecky-clanek/" in flatpage.url %}
{% with "jak-psat-vedecky-clanek" as selected %}
{% include "seminar/clanky/submenu.html" %}
{% endwith %}
{% else %}
{% include "seminar/clanky/submenu.html" %}
{% endif %}
@ -94,12 +97,12 @@
{% endblock %}
{# zvirazneni menu #}
{% block menu_uvod %}{% if "/co-je-MaM/" in flatpage.url %}selected{% endif %}{% endblock %}
{% block menu_uvod %}{% if not "/kontakt/" in flatpage.url %}{% if "/co-je-MaM/" in flatpage.url %}selected{% endif %}{% endif %}{% endblock %}
{% block menu_soustredeni %}{% if "/soustredeni/" in flatpage.url %}selected{% endif %}{% endblock %}
{% block menu_zadani %}{% if "/zadani/" in flatpage.url %}selected{% endif %}{% endblock %}
{% block menu_clanky %}{% if "/clanky/" in flatpage.url %}selected{% endif %}{% endblock %}
{% block menu_archiv %}{% if "/archiv/" in flatpage.url %}selected{% endif %}{% endblock %}
{% block menu_odevzdat %}{% if "/odevzdat-reseni/" in flatpage.url %}selected{% endif %}{% endblock %}
{% block menu_odevzdat %}{% if "/kontakt/" in flatpage.url %}selected{% endif %}{% endblock %}
{# zmena titulniho obrazku #}
{% block header %}{% if "/co-je-MaM/" in flatpage.url %}cojemam{% elif "/soustredeni/" in flatpage.url %}soustredeni{% elif "/zadani/" in flatpage.url %}zadani{% elif "/clanky/" in flatpage.url %}clanky{% elif "/archiv/" in flatpage.url %}archiv{% else %}odeslat{% endif %}{% endblock header %}

6
seminar/templates/seminar/archiv/problem.html

@ -22,11 +22,13 @@
<h3>Zadání</h3>
{{ problem.text_zadani |safe }}
{% if problem.text_reseni %}
<h3>Řešení</h3>
{{ problem.text_reseni |safe }}
{% endif %}
{% if True %}
{# TODO Kontrola, zda je uzivatel org #}
{% if user.is_authenticated %}
<div class='mam-org-only'>
<h3>Text - org</h3>

5
seminar/templates/seminar/cojemam/organizatori.html

@ -20,7 +20,8 @@
{% block content %}
<div>
{% if not aktivni %}
<a href="/co-je-MaM/organizatori/">Aktivní organizátoři</a>
<a href="/co-je-MaM/organizatori/">Aktivní organizátoři</a><br>
<br>
{% endif %}
{% for org in object_list %}
<h2>
@ -58,7 +59,7 @@
{% for znak in org.user.email %}{% if znak == '@' %} &#60;zavináč&#62; {% elif znak == '.' %} &#60;tečka&#62; {% else %}{{znak}}{% endif %}{% endfor %}
{% endif %}
</ul>
{{org.strucny_popis_organizatora}}
{# {{org.strucny_popis_organizatora}} #}
</td>
</tr>
</table>

2
seminar/templates/seminar/zadani/AktualniZadani.html

@ -22,7 +22,7 @@
{% endif %}
{#TODO a co speciální deadline pro účast na soustředění? #}
<p><a href="/zadani/aktualni-cislo/">Celé aktuální číslo naleznete zde.</a></p>
<p><a href="{{ac.pdf.url}}">Celé aktuální číslo v PDF</a></p>
{% for sada in jednorazove_problemy %}
{# podnadpisy, kdyz neni zakomentuje se nadpis #}
{% if not sada %}<!--{% endif %}

2
seminar/templates/seminar/zadani/submenu.html

@ -3,7 +3,7 @@
<ul>
<li class="{% if selected == "aktualni" %}selected{% endif %}"><a href="{{cesta}}/aktualni/">Aktuální zadání</a>
<li class="{% if selected == "temata" %}selected{% endif %}"><a href="{{cesta}}/temata/">Témata</a>
<li class="{% if selected == "aktualni-cislo" %}selected{% endif %}"><a href="{{cesta}}/aktualni-cislo/">Aktuální číslo</a>
{# <li class="{% if selected == "aktualni-cislo" %}selected{% endif %}"><a href="{{cesta}}/aktualni-cislo/">Aktuální číslo</a> #}
<li class="{% if selected == "vysledkova-listina" %}selected{% endif %}"><a href="{{cesta}}/vysledkova-listina/">Výsledková listina</a>
</ul>

6
seminar/views.py

@ -153,7 +153,7 @@ class RocnikView(generic.DetailView):
vysledkovka.append(v)
temata_v_rocniku = Problem.objects.filter(typ=Problem.TYP_TEMA, cislo_zadani__rocnik=context['rocnik'])
temata_v_rocniku = Problem.objects.filter(typ=Problem.TYP_TEMA, cislo_zadani__rocnik=context['rocnik']).order_by('kod')
context['vysledkovka'] = vysledkovka
context['temata_v_rocniku'] = temata_v_rocniku
@ -194,9 +194,9 @@ class CisloView(generic.DetailView):
# typy úloh, které se mají zobrazovat u čísla, tj. těch, které byly v čísle skutečně zadány
typy_skutecne_zadanych = [Problem.TYP_ULOHA, Problem.TYP_SERIAL, Problem.TYP_ORG_CLANEK]
v_cisle_zadane = Problem.objects.filter(cislo_zadani=context['cislo']).filter(typ__in=typy_skutecne_zadanych).order_by('cislo_reseni__cislo', 'kod')
v_cisle_zadane = Problem.objects.filter(cislo_zadani=context['cislo']).filter(typ__in=typy_skutecne_zadanych).order_by('kod')
resene_problemy = Problem.objects.filter(cislo_reseni=context['cislo']).filter(typ__in=typy_skutecne_zadanych).order_by('cislo_reseni__cislo', 'kod')
resene_problemy = Problem.objects.filter(cislo_reseni=context['cislo']).filter(typ__in=typy_skutecne_zadanych).order_by('cislo_zadani__cislo', 'kod')
problemy = sorted(list(set([r.problem for r in reseni])), key=lambda x:(0 if x.typ==Problem.TYP_ULOHA else 1, x.kod_v_rocniku))
#setridi problemy podle typu a poradi zadani

Loading…
Cancel
Save