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 %}
<script>
{% for o in opravy %}
place_comments_one_div("img-{{o.strana}}", [["op{{o.id}}",{{o.x}},{{o.y}}]]);
{% for s in opravy_strany %}
place_comments_one_div("img-{{s.strana}}", [{% for o in s.op_id %}["op{{o.id}}",{{o.x}},{{o.y}}],{% endfor %}[]]);
{% endfor %}
{% if scroll %}
window.scrollTo(0,{{scroll}});

4
korektury/views.py

@ -136,6 +136,10 @@ class KorekturyView(generic.TemplateView):
else:
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['zasluhy'] = zasluhy
return context

Loading…
Cancel
Save