polyblog/blogapp/templates/blogapp/blogdetail.html

60 lines
1.8 KiB
HTML

{% extends "base.html" %}
{% block content %}
{% autoescape off %}
<table style="align: center; width: 90%; margin-left: auto; margin-right: auto">
<tbody>
<tr>
<td>
<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 %}
{% if not isfrontpage %}
<b>Comments total: {{newsentry.newscomment_set.all.count}}</b><br/>
{% for newscomment in newsentry.newscomment_set.all %}
<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>
</table>
{% endfor %}
<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 %}
</tr>
</td>
</tbody>
</table>
{% endblock %}