post_render.html
2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{% load i18n permission_tags list_post_answer %}
<div class="row new_post">
<div id="post_{{ post.id }}" class="col-sm-12 col-xs-12">
<h3 class="user-name">
{{ post.user }}
<div class="pull-right">
<a href="javascript:answer('{{ post.id }}', '{% url 'course:forum:reply_post' %}');">
<i class="material-icons">{% trans 'reply' %}</i>
</a>
{% if request.user|has_role:'system_admin' or request.user == post.user %}
{% csrf_token %}
<div class="btn-group icon-more-horiz">
<a class="btn btn-default btn-xs dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="material-icons">more_horiz</i>
</a>
<ul class="dropdown-menu pull-right" aria-labelledby="dropdownMenu1">
<li><a href="javascript:edit_post('{% url 'course:forum:update_post' post.id %}', '{{ post.id }}', '{% trans 'Post edited successfully!' %}')"><i class="material-icons">create</i> {% trans 'Edit' %}</a></li>
<li><a href="javascript:delete_post('{% url 'course:forum:delete_post' post.id %}', '{{ post.id }}')"><i class="material-icons">delete_sweep</i> {% trans 'Remove' %}</a></li>
</ul>
</div>
{% endif %}
</div>
</h3>
<div class="post_content">
<div class="card-data">
<p class="comment-date">
<i class="fa fa-clock-o"></i> {{ post.post_date|timesince }} {% trans 'ago' %}
{% if post.is_modified %}
<em> - {% trans 'Edited' %}</em>
{% endif %}
</p>
</div>
<p class="comment-text">{{ post.message|linebreaks }}</p>
</div>
<div class="answer_post"></div>
<div class="answer_list">
{% list_post_answer request post %}
</div>
</div>
</div>