Commit 43acee8f authored by Sli's avatar Sli

pedagogy: enhance comment look

parent 4a19441a
......@@ -1730,48 +1730,74 @@ label {
margin-bottom: 30px;
margin-top: 10px;
.grade {
height: 156px;
float: left;
text-align: left;
padding: 15px;
padding-right: 40px;
padding-top: 0px;
clip-path: polygon(0 0, 0 100%, 100% 100%, 100% 20%, 75% 0);
background-color: #1bb9ea;
}
.grade_block {
.dif_grade {
background-color: #1bb9ea;
color: #f0f0f0;
height: 156px;
float: left;
font-weight: bold;
text-align: right;
padding: 15px;
padding-top: 0px;
}
.grade {
width: 8%;
height: 156px;
float: left;
text-align: left;
padding: 15px;
padding-right: 40px;
padding-top: 0px;
clip-path: polygon(0 0, 0 100%, 100% 100%, 100% 20%, 75% 0);
background-color: #1bb9ea;
}
.author_info {
background-color: #1bb9ea;
color: #f0f0f0;
text-align: center;
width: 50px;
padding: 5px;
font-weight: bold;
margin: 0px;
float: left;
padding-right: 50px;
clip-path: polygon(0 0, 0 100%, 100% 100%, 75% 0);
.dif_grade {
width: 8%;
background-color: #1bb9ea;
color: #f0f0f0;
height: 156px;
float: left;
font-weight: bold;
text-align: right;
padding: 15px;
padding-top: 0px;
}
}
.date_info {
.info {
background-color: #1bb9ea;
color: #f0f0f0;
width: 100%;
float: left;
text-align: center;
width : 34%;
padding: 5px;
margin: 0px;
.date_info {
color: #f0f0f0;
text-align: center;
width : 34%;
padding: 5px;
margin: 0px;
float: left;
}
.author_info {
color: #f0f0f0;
text-align: center;
font-weight: bold;
padding-right: 33%;
padding: 5px;
margin: 0px;
float: right;
padding-right: 10%;
}
.report {
background-color: #ea7900;
clip-path: polygon(0 0%, 0 100%, 40% 100%, 30% 0);
width : 33%;
& a {
color: #f0f0f0;
font-weight: bold;
}
padding: 5px;
margin: 0px;
float: left;
}
}
.action {
......
......@@ -28,28 +28,32 @@
<h2>{% trans %}Comments{% endtrans %}</h2>
{% for comment in object.comments.all() %}
<div id="{{ comment.id }}" class="comment">
<div class="dif_grade">
<p>{% trans %}global grade{% endtrans %}</p>
<p>{% trans %}utility grade{% endtrans %}</p>
<p>{% trans %}interest grade{% endtrans %}</p>
<p>{% trans %}teaching grade{% endtrans %}</p>
<p>{% trans %}work_load grade{% endtrans %}</p>
</div>
<div class="grade">
<p>{{ display_star(comment.grade_global) }}</p>
<p>{{ display_star(comment.grade_utility) }}</p>
<p>{{ display_star(comment.grade_interest) }}</p>
<p>{{ display_star(comment.grade_teaching) }}</p>
<p>{{ display_star(comment.grade_work_load) }}</p>
<div class="grade_block">
<div class="dif_grade">
<p>{% trans %}global grade{% endtrans %}</p>
<p>{% trans %}utility grade{% endtrans %}</p>
<p>{% trans %}interest grade{% endtrans %}</p>
<p>{% trans %}teaching grade{% endtrans %}</p>
<p>{% trans %}work_load grade{% endtrans %}</p>
</div>
<div class="grade">
<p>{{ display_star(comment.grade_global) }}</p>
<p>{{ display_star(comment.grade_utility) }}</p>
<p>{{ display_star(comment.grade_interest) }}</p>
<p>{{ display_star(comment.grade_teaching) }}</p>
<p>{{ display_star(comment.grade_work_load) }}</p>
</div>
</div>
{{ comment.comment|markdown }}
<p class="date_info">{{ comment.publish_date.strftime('%d/%m/%Y') }}</p>
<p class="author_info">{{ comment.author }}</p>
<div class="info">
<p class="report"><a href="{{ url('pedagogy:comment_report', comment_id=comment.id) }}">{% trans %}Report this comment{% endtrans %}</a></p>
<p class="date_info">{{ comment.publish_date.strftime('%d/%m/%Y') }}</p>
<p class="author_info">{{ comment.author }}</p>
</div>
{# Warning, it's not displayed yet #}
<p class="action">
<a href="{{ url('pedagogy:uv_detail', uv_id=uv.id) }}#{{ comment.id }}"><i class="fa fa-paragraph"></i></a>
<a href="{{ url('pedagogy:comment_report', comment_id=comment.id) }}">{% trans %}Report{% endtrans %}</a>
{% if user.is_owner(comment) %}
<a href="{{ url('pedagogy:comment_update', comment_id=comment.id) }}">{% trans %}Edit{% endtrans %}</a>
<a href="{{ url('pedagogy:comment_delete', comment_id=comment.id) }}">{% trans %}Delete{% endtrans %}</a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment