Browse Source

Korektury se uz radi spravne pod sebe.

remotes/origin/opraf
parent
commit
cdbe5ff5db
  1. 4
      korektury/templates/korektury/opraf.html
  2. 4
      korektury/views.py

4
korektury/templates/korektury/opraf.html

@ -158,8 +158,8 @@
{% endfor %} {% endfor %}
<script> <script>
{% for o in opravy %} {% for s in opravy_strany %}
place_comments_one_div("img-{{o.strana}}", [["op{{o.id}}",{{o.x}},{{o.y}}]]); place_comments_one_div("img-{{s.strana}}", [{% for o in s.op_id %}["op{{o.id}}",{{o.x}},{{o.y}}],{% endfor %}[]]);
{% endfor %} {% endfor %}
{% if scroll %} {% if scroll %}
window.scrollTo(0,{{scroll}}); window.scrollTo(0,{{scroll}});

4
korektury/views.py

@ -136,6 +136,10 @@ class KorekturyView(generic.TemplateView):
else: else:
zasluhy[k.autor]=1 zasluhy[k.autor]=1
strany = opravy.values('strana')
opravy_na_stranu = [{'strana':s['strana'],'op_id':opravy.filter(strana=s['strana'])} for s in strany]
context['opravy_strany'] = opravy_na_stranu
context['opravy'] = opravy context['opravy'] = opravy
context['zasluhy'] = zasluhy context['zasluhy'] = zasluhy
return context return context

Loading…
Cancel
Save