pedagogy: enhance comment look

This commit is contained in:
Antoine Bartuccio 2019-07-06 02:16:04 +02:00
parent 4a19441a17
commit 43acee8f1b
Signed by: klmp200
GPG Key ID: E7245548C53F904B
2 changed files with 83 additions and 53 deletions

View File

@ -1730,7 +1730,10 @@ label {
margin-bottom: 30px;
margin-top: 10px;
.grade_block {
.grade {
width: 8%;
height: 156px;
float: left;
text-align: left;
@ -1742,6 +1745,7 @@ label {
}
.dif_grade {
width: 8%;
background-color: #1bb9ea;
color: #f0f0f0;
height: 156px;
@ -1751,27 +1755,49 @@ label {
padding: 15px;
padding-top: 0px;
}
.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);
}
.date_info {
.info {
background-color: #1bb9ea;
color: #f0f0f0;
width: 100%;
float: left;
.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 {

View File

@ -28,6 +28,7 @@
<h2>{% trans %}Comments{% endtrans %}</h2>
{% for comment in object.comments.all() %}
<div id="{{ comment.id }}" class="comment">
<div class="grade_block">
<div class="dif_grade">
<p>{% trans %}global grade{% endtrans %}</p>
<p>{% trans %}utility grade{% endtrans %}</p>
@ -42,14 +43,17 @@
<p>{{ display_star(comment.grade_teaching) }}</p>
<p>{{ display_star(comment.grade_work_load) }}</p>
</div>
</div>
{{ comment.comment|markdown }}
<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>