From fd08de5d6ba3cc75f8fea98e68fe9c8f3ed48288 Mon Sep 17 00:00:00 2001 From: Jorran de Wit <jorrandewit@outlook.com> Date: Fri, 7 Jul 2017 23:26:20 +0200 Subject: [PATCH] Add tex/django template for Comment --- .../templates/comments/_comment_tex_template.html | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 comments/templates/comments/_comment_tex_template.html diff --git a/comments/templates/comments/_comment_tex_template.html b/comments/templates/comments/_comment_tex_template.html new file mode 100644 index 000000000..b6540e82c --- /dev/null +++ b/comments/templates/comments/_comment_tex_template.html @@ -0,0 +1,11 @@ +{% spaceless %} +Received {{comment.date_submitted|date:'d-m-Y'}}\ \\ +{% if comment.file_attachment %}- \textit{This {% if comment.is_author_reply %}Author Reply{% else %}Comment{% endif %} has an Attachment, please download it online.}\ \\{% endif %}\ \\{{comment.comment_text}} +{% endspaceless %} + +{% for subcomment in comment.nested_comments.vetted %} + \addcontentsline{toc}{subsection}{\protect\numberline{}{% if subcomment.is_author_reply %}Author Reply{% else %}Comment{% endif %} {{forloop.counter}} by {% if subcomment.anonymous %}anonymous{% else %}{{subcomment.author.user.first_name}} {{subcomment.author.user.last_name}}{% endif %} } + + \subsection*{ {% if subcomment.is_author_reply %}Author Reply{% else %}Comment{% endif %} {{forloop.parentloop.counter}}.{{forloop.counter}} by {% if subcomment.anonymous %}anonymous{% else %}{{subcomment.author.user.first_name}} {{subcomment.author.user.last_name}}{% endif %} } + {% include 'comments/_comment_tex_template.html' with comment=subcomment %} +{% endfor %} -- GitLab