|
@ -111,8 +111,35 @@ |
|
|
onmouseover='box_onmouseover(this)' |
|
|
onmouseover='box_onmouseover(this)' |
|
|
onmouseout='box_onmouseout(this)'> |
|
|
onmouseout='box_onmouseout(this)'> |
|
|
|
|
|
|
|
|
|
|
|
<div class='corr-body' id='op{{o.id}}-body'> |
|
|
|
|
|
|
|
|
|
|
|
{% for k in o.komentare %} |
|
|
|
|
|
<div class='comment' id='k{{k.id}}'> |
|
|
|
|
|
<div class='corr-header'> |
|
|
|
|
|
<div class='author'>{{k.autor}}</div> |
|
|
|
|
|
<div class="float-right"> |
|
|
|
|
|
<!-- Komentar !--> |
|
|
|
|
|
<form action='' onsubmit='save_scroll(this)' method='POST'> |
|
|
|
|
|
{% csrf_token %} |
|
|
|
|
|
<input type='hidden' name='id' value='{{k.id}}'> |
|
|
|
|
|
<input type='hidden' name='scroll'> |
|
|
|
|
|
<button style="display: none" type='submit' name='action' value='del-comment' title='Smaž komentář' |
|
|
|
|
|
onclick='return confirm("Opravdu smazat komentář?")'> |
|
|
|
|
|
<img src="{% static "korektury/imgs/delete.png" %}"/> |
|
|
|
|
|
</button> |
|
|
|
|
|
</form> |
|
|
|
|
|
<!-- /Komentar !--> |
|
|
|
|
|
<button type='button' onclick="update_comment('op{{o.id}}','kt{{k.id}}');" title='Uprav komentář'> |
|
|
|
|
|
<img src="{% static "korektury/imgs/edit.png"%}"/> |
|
|
|
|
|
</button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div id='kt{{k.id}}'>{{k.text|linebreaks}}</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<hr> |
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
</div> |
|
|
<div class='corr-header'> |
|
|
<div class='corr-header'> |
|
|
<span class='author' id='op{{o.id}}-autor'>{{o.autor}}</span> |
|
|
|
|
|
<span class='float-right'> |
|
|
<span class='float-right'> |
|
|
<span id='op{{o.id}}-buttons'> |
|
|
<span id='op{{o.id}}-buttons'> |
|
|
<!-- Existujici korektura !--> |
|
|
<!-- Existujici korektura !--> |
|
@ -122,16 +149,9 @@ |
|
|
<input type='hidden' name='id' value='{{o.id}}'> |
|
|
<input type='hidden' name='id' value='{{o.id}}'> |
|
|
<input type='hidden' name='scroll'> |
|
|
<input type='hidden' name='scroll'> |
|
|
|
|
|
|
|
|
{% if o.komentare %} |
|
|
<button style="display: none" type='submit' name='action' value='del' title='Smaž opravu'> |
|
|
<button name='action' value='del' type='button' |
|
|
|
|
|
title="Opravu nelze smazat – už ji někdo okomentoval"> |
|
|
|
|
|
<img src="{% static "korektury/imgs/delete-gr.png"%}"/> |
|
|
|
|
|
</button> |
|
|
|
|
|
{% else %} |
|
|
|
|
|
<button type='submit' name='action' value='del' title='Smaž opravu'> |
|
|
|
|
|
<img src="{% static "korektury/imgs/delete.png"%}"/> |
|
|
<img src="{% static "korektury/imgs/delete.png"%}"/> |
|
|
</button> |
|
|
</button> |
|
|
{% endif %} |
|
|
|
|
|
{% if o.status != o.STATUS.K_OPRAVE %} |
|
|
{% if o.status != o.STATUS.K_OPRAVE %} |
|
|
<button type='submit' name='action' value='{{ o.STATUS.K_OPRAVE }}' title='Označ jako neopravené'> |
|
|
<button type='submit' name='action' value='{{ o.STATUS.K_OPRAVE }}' title='Označ jako neopravené'> |
|
|
<img src="{% static "korektury/imgs/undo.png"%}"/> |
|
|
<img src="{% static "korektury/imgs/undo.png"%}"/> |
|
@ -155,15 +175,6 @@ |
|
|
</form> |
|
|
</form> |
|
|
<!-- /Existujici korektura !--> |
|
|
<!-- /Existujici korektura !--> |
|
|
|
|
|
|
|
|
{% if o.komentare %} |
|
|
|
|
|
<button type='button' title="Korekturu nelze upravit – už ji někdo okomentoval"> |
|
|
|
|
|
<img src="{% static "korektury/imgs/edit-gr.png" %}"/> |
|
|
|
|
|
</button> |
|
|
|
|
|
{% else %} |
|
|
|
|
|
<button type='button' onclick='box_edit("op{{o.id}}","update");' title='Oprav opravu'> |
|
|
|
|
|
<img src="{% static "korektury/imgs/edit.png" %}"/> |
|
|
|
|
|
</button> |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
{% if o.status == 'opraveno' or o.status == 'neni_chyba' %} |
|
|
{% if o.status == 'opraveno' or o.status == 'neni_chyba' %} |
|
|
<button type='button' title='Korekturu nelze komentovat, protože už je uzavřená'> |
|
|
<button type='button' title='Korekturu nelze komentovat, protože už je uzavřená'> |
|
|
<img src="{% static "korektury/imgs/comment-gr.png" %}"/> |
|
|
<img src="{% static "korektury/imgs/comment-gr.png" %}"/> |
|
@ -176,53 +187,11 @@ |
|
|
|
|
|
|
|
|
</span> |
|
|
</span> |
|
|
<button type='button' onclick='toggle_visibility("op{{o.id}}");' title='Skrýt/Zobrazit'> |
|
|
<button type='button' onclick='toggle_visibility("op{{o.id}}");' title='Skrýt/Zobrazit'> |
|
|
<img src="{% static "korektury/imgs/hide.png" %}"/> |
|
|
<img id='op{{o.id}}-toggleimg' src="{% static "korektury/imgs/hide.png" %}"/> |
|
|
</button> |
|
|
</button> |
|
|
|
|
|
|
|
|
</span> |
|
|
</span> |
|
|
</div> |
|
|
</div> |
|
|
<div class='corr-body' id='op{{o.id}}-body'> |
|
|
|
|
|
<div id='op{{o.id}}-text'>{{o.text|linebreaks}}</div> |
|
|
|
|
|
|
|
|
|
|
|
{% for k in o.komentare %} |
|
|
|
|
|
<hr> |
|
|
|
|
|
<div class='comment' id='k{{k.id}}'> |
|
|
|
|
|
<div class='corr-header'> |
|
|
|
|
|
<div class='author'>{{k.autor}}</div> |
|
|
|
|
|
<div class="float-right"> |
|
|
|
|
|
<!-- Komentar !--> |
|
|
|
|
|
<form action='' onsubmit='save_scroll(this)' method='POST'> |
|
|
|
|
|
{% csrf_token %} |
|
|
|
|
|
<input type='hidden' name='id' value='{{k.id}}'> |
|
|
|
|
|
<input type='hidden' name='scroll'> |
|
|
|
|
|
{% if forloop.last %} |
|
|
|
|
|
<button type='submit' name='action' value='del-comment' title='Smaž komentář' |
|
|
|
|
|
onclick='return confirm("Opravdu smazat komentář?")'> |
|
|
|
|
|
<img src="{% static "korektury/imgs/delete.png" %}"/> |
|
|
|
|
|
</button> |
|
|
|
|
|
{% else %} |
|
|
|
|
|
<button name='action' value='del-comment' type='button' |
|
|
|
|
|
title="Komentář nelze smazat – existuje novější"> |
|
|
|
|
|
<img src="{% static "korektury/imgs/delete-gr.png"%}"/> |
|
|
|
|
|
</button> |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
</form> |
|
|
|
|
|
<!-- /Komentar !--> |
|
|
|
|
|
{% if forloop.last %} |
|
|
|
|
|
<button type='button' onclick="update_comment('op{{o.id}}','kt{{k.id}}');" title='Uprav komentář'> |
|
|
|
|
|
<img src="{% static "korektury/imgs/edit.png"%}"/> |
|
|
|
|
|
</button> |
|
|
|
|
|
{% else %} |
|
|
|
|
|
<button type='button' title="Komentář nelze upravit – existuje novější"> |
|
|
|
|
|
<img src="{% static "korektury/imgs/edit-gr.png" %}"/> |
|
|
|
|
|
</button> |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div id='kt{{k.id}}'>{{k.text|linebreaks}}</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
{% endfor %} |
|
|
{% endfor %} |
|
|
|
|
|
|
|
|