Browse Source

Merge remote-tracking branch 'origin/master' into stable

remotes/origin/prednasky
Bc. Petr Pecha 8 years ago
parent
commit
f582f54977
  1. 6
      seminar/templates/seminar/archiv/rocnik.html
  2. 13
      seminar/templates/seminar/archiv/rocnik_vysledkovka.tex
  3. 7
      seminar/urls.py

6
seminar/templates/seminar/archiv/rocnik.html

@ -29,6 +29,12 @@
{% endif %} {% endif %}
{% if vysledkovka %} {% if vysledkovka %}
{% if user.is_staff %}
<div class='mam-org-only'>
<a href='vysledkovka.tex'>Výsledkovka ročníku (LaTeX)</a>
</div>
{% endif %}
<h2>Výsledková listina</h2> <h2>Výsledková listina</h2>
{% include "seminar/vysledkovka_rocnik.html" %} {% include "seminar/vysledkovka_rocnik.html" %}
{% endif %} {% endif %}

13
seminar/templates/seminar/archiv/rocnik_vysledkovka.tex

@ -0,0 +1,13 @@
{% with lb="{" %}
{% with rb="}" %}
\setlength{\tabcolsep}{3pt}
\begin{longtable}{|r|l|c|r|{% for cislo in vysledkovka.cisla %}c{% if not forloop.last %}@{\hskip.5em}{% endif %}{% endfor %}|r|}
\hline
& & & & \multicolumn{{ lb }}{{ vysledkovka.cisla|length }}}{c|}{\textbf{Číslo}} & \\\textbf{Poř.} & \textbf{Jméno} & \textbf{R.} & \raisebox{0.7mm}{$\sum_{-1}$} & {% for cislo in vysledkovka.cisla %}\textbf{{ lb }}{{ cislo.cislo }}{{ rb }} & {% endfor %}\raisebox{0.7mm}{$\sum_1$} \\\hline
\endhead
\hline
\endfoot
{% for rv in vysledkovka.radky %}{{ rv.poradi }} & {% if rv.titul %}\titul{{ lb }}{{ rv.titul }}}~{% endif %}{{ rv.resitel.jmeno|slice:":1" }}.~{{ rv.resitel.prijmeni }} & {% if rv.resitel.rocnik %}{{ rv.resitel.rocnik }}.{% endif %} & {{ rv.body_odjakziva }} {% for b in rv.body_cisla %} & {{ b }}{% endfor %} & {{ rv.body_rocnik }} \\
{% endfor %}\end{longtable}
{% endwith %}
{% endwith %}

7
seminar/urls.py

@ -49,7 +49,12 @@ urlpatterns = [
url(r'^aesop-export/mam-sous-(?P<datum_zacatku>[\d-]+)\.csv$', export.ExportSousView.as_view(), name='seminar_export_sous'), url(r'^aesop-export/mam-sous-(?P<datum_zacatku>[\d-]+)\.csv$', export.ExportSousView.as_view(), name='seminar_export_sous'),
url(r'^aesop-export/index.csv$', export.ExportIndexView.as_view(), name='seminar_export_index'), url(r'^aesop-export/index.csv$', export.ExportIndexView.as_view(), name='seminar_export_index'),
#### Stranky viditelne pouze pro orgy: # Stranky viditelne pouze pro orgy:
url(
r'^rocnik/(?P<rocnik>\d+)/vysledkovka.tex$',
staff_member_required(views.RocnikVysledkovkaView.as_view()),
name='seminar_cislo_vysledkovka'
),
url(r'^cislo/(?P<rocnik>\d+).(?P<cislo>[0-9-]+)/vysledkovka.tex$', url(r'^cislo/(?P<rocnik>\d+).(?P<cislo>[0-9-]+)/vysledkovka.tex$',
staff_member_required(views.CisloVysledkovkaView.as_view()), name='seminar_cislo_vysledkovka'), staff_member_required(views.CisloVysledkovkaView.as_view()), name='seminar_cislo_vysledkovka'),
url(r'^cislo/(?P<rocnik>\d+).(?P<cislo>[0-9-]+)/obalky.pdf$', url(r'^cislo/(?P<rocnik>\d+).(?P<cislo>[0-9-]+)/obalky.pdf$',

Loading…
Cancel
Save