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,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 {
.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;
}
.dif_grade {
width: 8%;
background-color: #1bb9ea;
color: #f0f0f0;
height: 156px;
float: left;
font-weight: bold;
text-align: right;
padding: 15px;
padding-top: 0px;
}
}
.dif_grade {
.info {
background-color: #1bb9ea;
color: #f0f0f0;
height: 156px;
width: 100%;
float: left;
font-weight: bold;
text-align: right;
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 {
background-color: #1bb9ea;
color: #f0f0f0;
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 {

View File

@ -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>