From 06cf3b1160fb62de72ea9d03ddb57eca790083c5 Mon Sep 17 00:00:00 2001 From: Faraphel Date: Fri, 5 Jan 2024 11:26:03 +0100 Subject: [PATCH] added basic css for profile --- Palto/Palto/static/Palto/css/profile.css | 32 +++++ Palto/Palto/templates/Palto/profile.html | 148 +++++++++++++---------- 2 files changed, 114 insertions(+), 66 deletions(-) create mode 100644 Palto/Palto/static/Palto/css/profile.css diff --git a/Palto/Palto/static/Palto/css/profile.css b/Palto/Palto/static/Palto/css/profile.css new file mode 100644 index 0000000..cb30ff5 --- /dev/null +++ b/Palto/Palto/static/Palto/css/profile.css @@ -0,0 +1,32 @@ +#user-informations { + text-align: center; + margin: 5% auto; +} + +#user-name { + font-size: 200%; + font-weight: bold; + text-decoration: underline; +} + +#user-relations { + border-collapse: collapse; + margin: auto; + text-align: center; +} + +#user-relations > tbody > tr > td, #user-relations > tbody > tr > th { + border: 1px solid black; + padding: 4px; +} + +.user-relation { + border-style: hidden; + border-collapse: collapse; + width: 100%; +} + +.user-relation > tbody > tr > td, .user-relation > tbody > tr > th { + border: 1px solid black; + padding: 4px; +} \ No newline at end of file diff --git a/Palto/Palto/templates/Palto/profile.html b/Palto/Palto/templates/Palto/profile.html index 3c8397e..02ed096 100644 --- a/Palto/Palto/templates/Palto/profile.html +++ b/Palto/Palto/templates/Palto/profile.html @@ -1,78 +1,94 @@ {% extends "Palto/base/base-features.html" %} +{% load static %} {% load dict_tags %} +{% block style %} + {{ block.super }} + +{% endblock %} + {% block body %} {{ block.super }} - {{ profile.username }} - {{ profile.email }} - {% if profile.is_superuser %}Administrator{% endif %} + {# user informations #} + + + + + + + +
{{ profile.first_name|title }} {{ profile.last_name|upper }}
{{ profile.username }}
{{ profile.email }}
{% if profile.is_superuser %}Administrator{% endif %}
{# user related departments table #} - - {% for department, profile_department_data in profile_departments_data.items %} - - {# department name #} - - {# relation information #} - + + {% endfor %} +
{{ department.name }} - - {# user managing the department #} - {% if profile_department_data|dict_get:"is_manager" %} - - - - - {% endif %} - {# user managing units #} - {% with managing_units=profile_department_data|dict_get:"managing_units" %} - {% if managing_units|length > 0 %} +
Responsable de Département/
+ + {% for department, profile_department_data in profile_departments_data.items %} + + {# department name #} + + {# relation information #} + - - {% endfor %} + {% endif %} + {# user managing units #} + {% with managing_units=profile_department_data|dict_get:"managing_units" %} + {% if managing_units|length > 0 %} + + + + + {% endif %} + {% endwith %} + {# user teaching units #} + {% with teaching_units=profile_department_data|dict_get:"teaching_units" %} + {% if teaching_units|length > 0 %} + + + + + {% endif %} + {% endwith %} + {# user studying groups #} + {% with student_groups=profile_department_data|dict_get:"student_groups" %} + {% if student_groups|length > 0 %} + + + + + {% endif %} + {% endwith %} + +
{{ department.name }} + + + {# user managing the department #} + {% if profile_department_data|dict_get:"is_manager" %} - - + + - {% endif %} - {% endwith %} - {# user teaching units #} - {% with teaching_units=profile_department_data|dict_get:"teaching_units" %} - {% if teaching_units|length > 0 %} - - - - - {% endif %} - {% endwith %} - {# user studying groups #} - {% with student_groups=profile_department_data|dict_get:"student_groups" %} - {% if student_groups|length > 0 %} - - - - - {% endif %} - {% endwith %} -
Responsable d'UE - {% for managing_unit in managing_units %} - - {{ managing_unit.name }} - - {% if not forloop.last %}
{% endif %} - {% endfor %} -
Responsable de Département/
Enseignant - {% for teaching_unit in teaching_units %} - - {{ teaching_unit.name }} - - {% if not forloop.last %}
{% endif %} - {% endfor %} -
Groupe Étudiant - {% for student_group in student_groups %} - {{ student_group.name }} - {% if not forloop.last %}
{% endif %} - {% endfor %} -
-
Responsable d'UE + {% for managing_unit in managing_units %} + + {{ managing_unit.name }} + + {% if not forloop.last %}
{% endif %} + {% endfor %} +
Enseignant + {% for teaching_unit in teaching_units %} + + {{ teaching_unit.name }} + + {% if not forloop.last %}
{% endif %} + {% endfor %} +
Groupe Étudiant + {% for student_group in student_groups %} + {{ student_group.name }} + {% if not forloop.last %}
{% endif %} + {% endfor %} +
+
{% endblock %}