[Pedagogy] Front comment nearly ended

This commit is contained in:
Cyl 2019-07-03 21:19:56 +02:00 committed by Bartuccio Antoine
parent 3e3c576ad7
commit bfb7380715
Signed by: klmp200
GPG Key ID: E7245548C53F904B
20 changed files with 127 additions and 42 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1673,9 +1673,76 @@ label {
.pedagogy { .pedagogy {
&.star_not_checked { &.star_not_checked {
color : gray; color : #f7f7f7;
} }
&.star_checked { &.star_checked {
color : orange; color: #ea7900;
}
}
#pedagogy {
font-family: "Fira Sans";
color: #062f38;
background-color: #caf0ff;
.comment{
background-color: #caf0ff;
max-width: 100%;
max-height: 200px;
overflow: hidden;
margin-bottom: 40px;
.grade{
height: 200px;
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{
background-color: #1bb9ea;
color: #f0f0f0;
height: 200px;
float: left;
text-align: right;
padding: 15px;
padding-top: 0px;
}
.author_info{
background-color: #1bb9ea;
color: #f0f0f0;
text-align: center;
width: 50px;
padding: 5px;
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;
}
.text{
height: 125px;
margin-top: 0px;
margin-right: 0px;
padding: 10px;
padding-left: 40px;
margin-bottom: 29px;
overflow: auto;
text-align: justify;
background-color: #caf0ff;
}
} }
} }

View File

@ -6,13 +6,16 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div id="pedagogy">
<p><a href="{{ url('pedagogy:guide') }}">{% trans %}Back{% endtrans %}</a></p> <p><a href="{{ url('pedagogy:guide') }}">{% trans %}Back{% endtrans %}</a></p>
<h1>{{ object.code }} - {{ object.title }}</h1> <h1>{{ object.code }} - {{ object.title }}</h1>
<p>{% trans %}Department: {% endtrans %}{{ object.department }}</p> <p>{{ object.department }}</p>
<p>{{ object.credit_type }}</p>
<p>{{ object.semester }}</p>
<p>{{ object.objectives|markdown }}</p> <p>{{ object.objectives|markdown }}</p>
<p>{{ object.program|markdown }}</p> <p>{{ object.program|markdown }}</p>
<p>{{ object.skills|markdown }}</p> <p>{{ object.skills|markdown }}</p>
<p>{{ object.key_concepts|markdown }}</p> <p>{{ object.key_concepts }}</p>
<p>{% trans %}UV manager: {% endtrans %}{{ object.manager }}</p> <p>{% trans %}UV manager: {% endtrans %}{{ object.manager }}</p>
<p>{{ display_star(object.grade_global_average) }}</p> <p>{{ display_star(object.grade_global_average) }}</p>
@ -24,22 +27,36 @@
{% if object.comments.exists() %} {% if object.comments.exists() %}
<h2>{% trans %}Comments{% endtrans %}</h2> <h2>{% trans %}Comments{% endtrans %}</h2>
{% for comment in object.comments.all() %} {% for comment in object.comments.all() %}
<div 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_global) }}</p>
<p>{{ display_star(comment.grade_utility) }}</p> <p>{{ display_star(comment.grade_utility) }}</p>
<p>{{ display_star(comment.grade_interest) }}</p> <p>{{ display_star(comment.grade_interest) }}</p>
<p>{{ display_star(comment.grade_teaching) }}</p> <p>{{ display_star(comment.grade_teaching) }}</p>
<p>{{ display_star(comment.grade_work_load) }}</p> <p>{{ display_star(comment.grade_work_load) }}</p>
<p>{{ comment.comment|markdown }}</p> </div>
<p>{% trans %}Published: {% endtrans %}{{ comment.publish_date }}</p> <p class="text">{{ comment.comment }}</p>
<p>{% trans %}Author: {% endtrans %}{{ comment.author }}</p> <p class="date_info">{{ comment.publish_date.strftime('%d/%m/%Y') }}</p>
{% if user.is_owner(comment) %} <p class="author_info">{{ comment.author }}</p>
<p><a href="{{ url('pedagogy:comment_update', 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> {# Warning, it's not displayed yet #}
{% endif %}
<p><a href="{{ url('pedagogy:comment_report', comment_id=comment.id) }}">{% trans %}Report{% endtrans %}</a></p> <p><a href="{{ url('pedagogy:comment_report', comment_id=comment.id) }}">{% trans %}Report{% endtrans %}</a></p>
{% if comment.is_reported %} {% if comment.is_reported %}
<p>{% trans %}This comment has been reported{% endtrans %}</p> <p>{% trans %}This comment has been reported{% endtrans %}</p>
{% endif %} {% endif %}
{% if user.is_owner(comment) %}
<p><a href="{{ url('pedagogy:comment_update', 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 %}
</div>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
@ -49,4 +66,5 @@
{{ form.as_p() }} {{ form.as_p() }}
<p><input type="submit" value="{% trans %}Comment{% endtrans %}" /></p> <p><input type="submit" value="{% trans %}Comment{% endtrans %}" /></p>
</form> </form>
</div>
{% endblock %} {% endblock %}