added basic css for profile

This commit is contained in:
Faraphel 2024-01-05 11:26:03 +01:00
parent 35e44bcd7c
commit 06cf3b1160
2 changed files with 114 additions and 66 deletions

View file

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

View file

@ -1,22 +1,36 @@
{% extends "Palto/base/base-features.html" %} {% extends "Palto/base/base-features.html" %}
{% load static %}
{% load dict_tags %} {% load dict_tags %}
{% block style %}
{{ block.super }}
<link rel="stylesheet" href="{% static "Palto/css/profile.css" %}" />
{% endblock %}
{% block body %} {% block body %}
{{ block.super }} {{ block.super }}
{{ profile.username }} {# user informations #}
{{ profile.email }} <table id="user-informations">
{% if profile.is_superuser %}Administrator{% endif %} <tbody>
<tr><td id="user-name">{{ profile.first_name|title }} {{ profile.last_name|upper }}</td></tr>
<tr><td id="user-username">{{ profile.username }}</td></tr>
<tr><td id="user-mail"><a href="mailto:{{ profile.email }}">{{ profile.email }}</a></td></tr>
<tr><td id="user-role">{% if profile.is_superuser %}Administrator{% endif %}</td></tr>
</tbody>
</table>
{# user related departments table #} {# user related departments table #}
<table> <table id="user-relations">
<tbody>
{% for department, profile_department_data in profile_departments_data.items %} {% for department, profile_department_data in profile_departments_data.items %}
<tr> <tr>
{# department name #} {# department name #}
<th><a href="{% url "Palto:department_view" department.id %}">{{ department.name }}</a></th> <th><a href="{% url "Palto:department_view" department.id %}">{{ department.name }}</a></th>
{# relation information #} {# relation information #}
<td> <td>
<table> <table class="user-relation">
<tbody>
{# user managing the department #} {# user managing the department #}
{% if profile_department_data|dict_get:"is_manager" %} {% if profile_department_data|dict_get:"is_manager" %}
<tr> <tr>
@ -70,9 +84,11 @@
</tr> </tr>
{% endif %} {% endif %}
{% endwith %} {% endwith %}
</tbody>
</table> </table>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody>
</table> </table>
{% endblock %} {% endblock %}