mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 11:59:23 +00:00
pedagogy: functional but basic uv comment system
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
{% endif %}
|
||||
{% for uv in object_list %}
|
||||
<p>
|
||||
{{ uv.code }}
|
||||
<a href="{{ url('pedagogy:uv_detail', uv_id=uv.id) }}">{{ uv.code }}</a>
|
||||
{% if user.is_owner(uv) -%}
|
||||
<a href="{{ url('pedagogy:uv_update', uv_id=uv.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||
<a href="{{ url('pedagogy:uv_delete', uv_id=uv.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
|
@ -10,4 +10,27 @@
|
||||
<p>{{ object.program|markdown }}</p>
|
||||
<p>{{ object.skills|markdown }}</p>
|
||||
<p>{{ object.key_concepts|markdown }}</p>
|
||||
|
||||
{% if object.comments.exists() %}
|
||||
<h2>{% trans %}Comments{% endtrans %}</h2>
|
||||
{% for comment in object.comments.all() %}
|
||||
<p>{{ comment.grade_global }}</p>
|
||||
<p>{{ comment.grade_utility }}</p>
|
||||
<p>{{ comment.grade_interest }}</p>
|
||||
<p>{{ comment.grade_teaching }}</p>
|
||||
<p>{{ comment.grade_work_load }}</p>
|
||||
<p>{{ comment.comment }}</p>
|
||||
{% if user.is_owner(comment) %}
|
||||
<p><a href="{{ url('pedagogy:comment_edit', comment_id=comment.id) }}">{% trans %}Edit{% endtrans %}</a></p>
|
||||
<p><a href="{{ url('pedagogy:comment_delete', comment_id=comment.id) }}">{% trans %}Delete{% endtrans %}</a></p>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<h2>{% trans %}Leave comment{% endtrans %}</h2>
|
||||
<form action="{{ url('pedagogy:uv_detail', uv_id=object.id) }}" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p() }}
|
||||
<p><input type="submit" value="{% trans %}Comment{% endtrans %}" /></p>
|
||||
</form>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user