summaryrefslogtreecommitdiffstats
path: root/_includes/commentsthread.html
diff options
context:
space:
mode:
Diffstat (limited to '_includes/commentsthread.html')
-rw-r--r--_includes/commentsthread.html47
1 files changed, 17 insertions, 30 deletions
diff --git a/_includes/commentsthread.html b/_includes/commentsthread.html
index 84647f7..2e1119a 100644
--- a/_includes/commentsthread.html
+++ b/_includes/commentsthread.html
@@ -1,10 +1,7 @@
{% comment %}
argv: id_of_object_whose_posts_you_want,__isinathread
- return: nothing. outputs html directly.
+ return: next UID. outputs html directly.
{% endcomment %}
-{% capture taplaceholder %}Vpišite besedilo komentarja (markdown omogočen).
-POMEMBNO: Zaradi tehničnih razlogov (veriga blokov) dokončen izbris komentarja (niti vzdevka avtorja) iz Interneta ni mogoč!{% endcapture %}
-{% capture nepodpiraiframe %}Vaš brskalnik ne podpira <pre>iframe</pre> elementa, ki je potreben za vpogled v status oddaje komentarja.{% endcapture %}
{% 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] %}
@@ -27,7 +24,8 @@ Komentar lahko uredi samo tisti, ki ga je napisal. Komentar uredite v brskalniku
V {{ return }} je {{ comment.author || replace: "<", "&lt;" }} komentiral:
</small>
<p>
- {{ comment.message | replace: "<", "&lt;" | replace: "!", "&#33;" | markdownify }}
+ {% assign safemsg = comment.message | replace: "<", "&lt;" | replace: "!", "&#33;" %}
+ {{ safemsg | markdownify }}
</p>
<small class=dimmedtext>
<a href="mailto:anton@sijanec.eu?subject=Prijava%20neprimernega%20komentarja%20na%20blogu.">
@@ -38,36 +36,25 @@ Komentar lahko uredi samo tisti, ki ga je napisal. Komentar uredite v brskalniku
<a>
odgovori</a>
</label>
- <input type=checkbox id=checkbox{{ uid }} class=commentreplycheckbox >
- <div hidden=hidden class=commentform>
- <!--
- <form target=comstatus{{ uid }} action=/api?m=commentreply type=POST>
- <input type=text name=vzdevek placeholder="Vzdevek pošiljatelja" />
- <input type=submit value=Objavi! />
- <textarea placeholder="{{ taplaceholder }}" name=message ></textarea>
- {% assign thisid = "comment|" | append: comment.author | append: "|" | append: comment.date %}
- <input type=hidden name=parent value="{{ thisid | replace: '"', "&quot;" }}" />
- <iframe id=comstatus{{ uid }}>{{ nepodpiraiframe }}</iframe>
- </form>
- -->
- Objavljanje komentarjev še ni izdelano.
+ <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>
|
<label for=edit{{ uid }}>
<a>uredi</a>
</label>
- <input type=checkbox id=edit{{ uid }} class=commentreplycheckbox >
- <div class=commentform >
- <!--
- <form action=POST action=/api?m=commentedit target=editstatus{{ uid }} >
- <input type=text name=vzdevek value="{{ comment.author | replace: '"', "&quot;" }}" />
- <input type=submit value=Uredi! />
- <textarea placeholder="{{ taplaceholder }}{{editnotice}}" name=message ></textarea>
- <input type=hidden name=commentid value="{{ thisid | replace: '"', '&quot;' }}"/>
- <iframe id=editstatus{{ uid }} >{{ nepodpiraiframe }}</iframe>
- </form>
- -->
- Urejanje komentarjev še ni izdelano.
+ <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: '&', "&amp;" | replace: '"', "&quot;" }}" />
+ <input type=submit value=Uredi! />
+ <textarea placeholder="{{ taplaceholder }}{{ editnotice }}" name=message >{{ safemsg | replace: "&#33;", "!" }}</textarea>
+ <input type=hidden name=commentid value="{{ thisid | replace: '"', '&quot;' }}"/>
+ <iframe id=editstatus{{ uid }} >{{ nepodpiraiframe }}</iframe>
+ </form>
</div>
</small>
{% assign argv = "true" | split: "," %}