pedagogy: incorpore all elements in comment block

This commit is contained in:
Antoine Bartuccio 2019-07-06 02:30:47 +02:00
parent 43acee8f1b
commit 782ee35779
Signed by: klmp200
GPG Key ID: E7245548C53F904B
3 changed files with 37 additions and 17 deletions

View File

@ -1730,6 +1730,10 @@ label {
margin-bottom: 30px; margin-bottom: 30px;
margin-top: 10px; margin-top: 10px;
.anchor {
float: right;
}
.grade_block { .grade_block {
.grade { .grade {
@ -1757,6 +1761,10 @@ label {
} }
} }
.not_rated {
color: #f0f0f0;
}
.info { .info {
background-color: #1bb9ea; background-color: #1bb9ea;
width: 100%; width: 100%;
@ -1801,12 +1809,19 @@ label {
} }
.action { .action {
float: left; float: right;
text-align: center; text-align: center;
padding: 5px; padding: 5px;
margin: 0px; margin: 0px;
} }
.status_reported {
color: red;
float: left;
padding: 5px;
margin: 0px;
}
.markdown { .markdown {
height: 125px; height: 125px;
margin-top: 0px; margin-top: 0px;

View File

@ -9,7 +9,7 @@
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% else %} {% else %}
<p> {% trans %} not rated {% endtrans %} </p> <p class="not_rated"> {% trans %} not rated {% endtrans %} </p>
{% endif %} {% endif %}
{%- endmacro %} {%- endmacro %}

View File

@ -31,10 +31,10 @@
<div class="grade_block"> <div class="grade_block">
<div class="dif_grade"> <div class="dif_grade">
<p>{% trans %}global grade{% endtrans %}</p> <p>{% trans %}global grade{% endtrans %}</p>
<p>{% trans %}utility grade{% endtrans %}</p> <p>{% trans %}utility{% endtrans %}</p>
<p>{% trans %}interest grade{% endtrans %}</p> <p>{% trans %}interest{% endtrans %}</p>
<p>{% trans %}teaching grade{% endtrans %}</p> <p>{% trans %}teaching{% endtrans %}</p>
<p>{% trans %}work_load grade{% endtrans %}</p> <p>{% trans %}work load{% endtrans %}</p>
</div> </div>
<div class="grade"> <div class="grade">
<p>{{ display_star(comment.grade_global) }}</p> <p>{{ display_star(comment.grade_global) }}</p>
@ -44,24 +44,29 @@
<p>{{ display_star(comment.grade_work_load) }}</p> <p>{{ display_star(comment.grade_work_load) }}</p>
</div> </div>
</div> </div>
<div class="anchor">
<a href="{{ url('pedagogy:uv_detail', uv_id=uv.id) }}#{{ comment.id }}"><i class="fa fa-paragraph"></i></a>
</div>
{{ comment.comment|markdown }} {{ comment.comment|markdown }}
{% if comment.is_reported %}
<p class="status_reported">
{% trans %}This comment has been reported{% endtrans %}
</p>
{% endif %}
{% if user.is_owner(comment) %}
<p class="action">
<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>
</p>
{% endif %}
<div class="info"> <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="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="date_info">{{ comment.publish_date.strftime('%d/%m/%Y') }}</p>
<p class="author_info">{{ comment.author }}</p> <p class="author_info">{{ comment.author }}</p>
</div> </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>
{% 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>
{% endif %}
</p>
{% if comment.is_reported %}
<p>{% trans %}This comment has been reported{% endtrans %}</p>
{% endif %}
</div> </div>
{% endfor %} {% endfor %}