2016-08-10 00:38:10 +02:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
{% autoescape off %}
|
|
|
|
|
2016-08-16 15:13:42 +02:00
|
|
|
<h1>{{blogentry.header}}</h1>
|
|
|
|
<small>posted by {{blogentry.user.username}} on {{blogentry.date}}
|
|
|
|
</small>
|
|
|
|
<br><br>
|
|
|
|
{{blogentry.intro|linebreaks}}<br>
|
|
|
|
{{blogentry.body|linebreaks}}<br><br>
|
|
|
|
{% endautoescape %}
|
2016-09-07 10:57:30 +02:00
|
|
|
|
|
|
|
|
2016-09-12 01:28:03 +02:00
|
|
|
<b>Comments total: {{blogentry.blogcomment_set.all.count}}</b><br/>
|
2016-09-07 10:57:30 +02:00
|
|
|
|
2016-09-12 01:28:03 +02:00
|
|
|
{% if commentform %}
|
|
|
|
<form action="" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
Your Name:<br>
|
|
|
|
{{ commentform.guestname }}
|
|
|
|
<br/>Your Comment:<br/>
|
|
|
|
{{ commentform.blogcomment }}<br>
|
|
|
|
<input type="submit" value="Submit" />
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
2018-03-04 15:20:20 +01:00
|
|
|
<br/><br/>
|
2016-09-12 01:28:03 +02:00
|
|
|
{% for comment in blogentry.blogcomment_set.all %}
|
|
|
|
{% if comment.user %}
|
2018-03-04 15:20:20 +01:00
|
|
|
<big><b>{{ comment.user.username }}</b> says:</big>
|
2016-09-12 01:28:03 +02:00
|
|
|
{% else %}
|
2018-03-04 15:20:20 +01:00
|
|
|
<big>{{ comment.guestname }} says:</big>
|
2016-09-12 01:28:03 +02:00
|
|
|
{% endif %}
|
2018-03-04 15:20:20 +01:00
|
|
|
<br/><small>{{ comment.date }}</small><br/>
|
|
|
|
{{ comment.body|linebreaks }}
|
|
|
|
<hr width="25%" align="left"/>
|
2016-09-12 01:28:03 +02:00
|
|
|
{% endfor %}
|
2016-08-16 15:13:42 +02:00
|
|
|
{% if false %}
|
|
|
|
<table class="forumentry">
|
|
|
|
<tr>
|
|
|
|
<td align="center" style="border-top:1px; width: 80px; solid #b2c9d5;"><img src="/polylux/{{ newscomment.user.get_profile.getImage }}"></img></td>
|
|
|
|
<td style="border-top:1px solid #b2c9d5;"><br/><a href="/blackmesa/usermanager/detail/{{newscomment.user.id}}/">{{newscomment.user.username}}</a><br>{{ newscomment.commenttext|linebreaks|urlize }}<br/><small>Datum: {{newscomment.date}}</small></td>
|
|
|
|
</tr>
|
2016-08-10 00:38:10 +02:00
|
|
|
</table>
|
2016-09-12 01:28:03 +02:00
|
|
|
|
2016-08-16 15:13:42 +02:00
|
|
|
|
|
|
|
<table
|
|
|
|
style="text-align: left; width: 75%; margin-left: auto; margin-right: auto;"
|
|
|
|
border="0" cellpadding="0" cellspacing="0">
|
|
|
|
<tbody>
|
|
|
|
{% if commentform %}
|
|
|
|
<tr>
|
|
|
|
<td align="center">{{user.username}}<br><img src="/polylux/{{ user.get_profile.getImage }}"></img></td>
|
|
|
|
<td>
|
|
|
|
<form action="" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
{{ commentform.newscomment }}<br>
|
|
|
|
<input type="submit" value="Submit" />
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% else %}
|
|
|
|
<tr>
|
|
|
|
<td align="center"></td>
|
|
|
|
<td>
|
|
|
|
<strong>Please log in to post.</strong>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% endif %}
|
2016-08-10 00:38:10 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|