blob: fcb89010eead984399eb220744bd01ddf57fd53a (
plain) (
tree)
|
|
{% comment %}
argv: id_of_object_whose_posts_you_want,__isinathread
return: next UID. outputs html directly.
{% endcomment %}
{% capture editnotice %}
Komentar lahko uredi samo tisti, ki ga je napisal. Komentar uredite v brskalniku, v katerem ste ga napisali. Bodisi piškotek bodisi IP naslov mora biti enak prejšnji oddaji komentarja. Če se objavo uredi še naslednjič, se to lahko stori iz katerega koli IP naslova in piškotka, ki se je uporabil pri predhodnih urejanjih.{% endcapture %}
{% assign comments = site.data.comments | where: "parent", argv[0] %}
{% unless argv[1] %}
{% assign uid = 0 | minus: 1 %} <!-- začnemo z -1, ker se prvi sam poveča -->
{% assign depth = 0 | minus: 1 %} <!-- začnemo z -1, da bo prvi na 0 -->
{% endunless %}
{% for comment in comments %}
{% assign depth = depth | plus: 1 %}
<div class="comment
{% assign depthmodulo = depth | modulo: 2 %}
{% if 0 == depthmodulo %}
odd
{% else %}
even
{% endif %}
"> <!-- depth: {{ depth }} -->
{% assign argv = comment.date | split: "," %} {% include datumincas.html %}
<small class=dimmedtext style=width:100% >
V {{ return }} je {{ comment.author || replace: "<", "<" }} komentiral:
</small>
<p>
{% assign safemsg = comment.message | replace: "<", "<" | replace: "!", "!" %}
{{ safemsg | markdownify }}
</p>
<small class=dimmedtext>
<a href="mailto:anton@sijanec.eu?subject=Prijava%20neprimernega%20komentarja%20na%20blogu.">
prijavi</a>
|
{% assign uid = uid | plus: 1 %}
<label for=checkbox{{ uid }} >
<a>
odgovori</a>
</label>
<input type=checkbox id=checkbox{{ uid }} class=showhide-checkbox >
<div class=showhide-hiddenelement>
{% assign thisid = "comment|" | append: comment.nonce %}
{% assign argv = thisid | append: "," | append: uid | split: "," %}
{% include commentreplyform.html %} {{ return }}
</div>
<!-- | --> <!-- urejanje namreč ni implementirano -->
<label for=edit{{ uid }}>
<!-- <a>uredi</a> --> <!-- urejanje namreč ni implementirano -->
</label>
<input type=checkbox id=edit{{ uid }} class=showhide-checkbox >
<div class=showhide-hiddenelement >
<form class=commentform method=POST action=/api/?m=commentedit target=editstatus{{ uid }} >
<input type=text name=vzdevek value="{{ comment.author | replace: '&', "&" | replace: '"', """ }}" />
<input type=submit value=Uredi! />
<textarea placeholder="{{ taplaceholder }}{{ editnotice }}" name=message >{{ safemsg | replace: "!", "!" }}</textarea>
<input type=hidden name=commentid value="{{ thisid | replace: '"', '"' }}"/>
<iframe name=editstatus{{ uid }} >{{ nepodpiraiframe }}</iframe>
</form>
</div>
</small>
{% assign argv = "true" | split: "," %}
{% assign argv = argv | unshift: thisid %}
{% include commentsthread.html %}
</div>
{% assign depth = depth | minus: 1 %}
{% endfor %}
{% assign return = uid | plus: 1 %}
|