diff --git a/core/static/core/user_details.scss b/core/static/user/user_detail.scss similarity index 100% rename from core/static/core/user_details.scss rename to core/static/user/user_detail.scss diff --git a/core/static/core/user_edit.scss b/core/static/user/user_edit.scss similarity index 97% rename from core/static/core/user_edit.scss rename to core/static/user/user_edit.scss index 23751e4b..cbe6c59e 100644 --- a/core/static/core/user_edit.scss +++ b/core/static/user/user_edit.scss @@ -15,12 +15,13 @@ display: flex; flex-direction: row; flex-wrap: wrap; - justify-content: space-around; + justify-content: center; + gap: 40px; align-items: stretch; @media (max-width: 750px) { flex-direction: column; - gap: 20px; + gap: 10px } } diff --git a/core/static/core/user_groups.scss b/core/static/user/user_group.scss similarity index 100% rename from core/static/core/user_groups.scss rename to core/static/user/user_group.scss diff --git a/core/static/core/user_preferences.scss b/core/static/user/user_preferences.scss similarity index 100% rename from core/static/core/user_preferences.scss rename to core/static/user/user_preferences.scss diff --git a/core/static/core/user_stats.scss b/core/static/user/user_stats.scss similarity index 100% rename from core/static/core/user_stats.scss rename to core/static/user/user_stats.scss diff --git a/core/templates/core/user_detail.jinja b/core/templates/core/user_detail.jinja index d7f6a552..4d86f6c0 100644 --- a/core/templates/core/user_detail.jinja +++ b/core/templates/core/user_detail.jinja @@ -1,6 +1,11 @@ {% extends "core/base.jinja" %} {% from "core/macros.jinja" import show_slots, show_tokens, user_subscription %} +{%- block additional_css -%} + + +{%- endblock -%} + {% block title %} {% trans user_name=profile.get_display_name() %}{{ user_name }}'s profile{% endtrans %} {% endblock %} @@ -10,166 +15,166 @@
-

{{ profile.get_full_name() }}

- {% if profile.nick_name %} +

{{ profile.get_full_name() }}

+ {% if profile.nick_name %}
« {{ profile.nick_name }} »
- {% endif %} + {% endif %}
{% if profile.quote %} -
- {{ profile.quote }} -
+
+ {{ profile.quote }} +
{% endif %}
{% if profile.pronouns %} -
- - -
+
+ + +
{% endif %} {% if profile.date_of_birth %} -
- - -
+
+ + +
{% endif %} {% if profile.department != "NA" %} -
- - -
+
+ + +
{% endif %} {% if profile.dpt_option %} -
- - -
+
+ + +
{% endif %} {% if profile.phone %} -
- - -
+
+ + +
{% endif %} {% if profile.address %} -
- - -
+
+ + +
{% endif %} {% if profile.parent_address %} -
- - -
+
+ + +
{% endif %}
{% if profile.promo %} -
- {% trans %}Promo: {% endtrans %}{{ profile.promo }} - Promo {{ profile.promo }} - Promo {{ profile.promo }} +
{% trans %}Promo: {% endtrans %}{{ profile.promo }} - Promo {{ profile.promo }} - {% trans %}Promo: {% endtrans %}{{ profile.promo }} -
+ Promo {{ profile.promo }} +
{% endif %}
{% if profile.profile_pict %} - {% trans %}Profile{% endtrans %} + {% trans %}Profile{% endtrans %} {% else %} - {% trans %}Profile{% endtrans %} + {% trans %}Profile{% endtrans %} {% endif %}
{% if profile.profile_pict %} - {% trans %}Profile{% endtrans %} + {% trans %}Profile{% endtrans %} {% else %} - {% trans %}Profile{% endtrans %} + {% trans %}Profile{% endtrans %} {% endif %} {% if profile.avatar_pict %} - {% trans %}Avatar{% endtrans %} + {% trans %}Avatar{% endtrans %} {% else %} - {% trans %}Avatar{% endtrans %} + {% trans %}Avatar{% endtrans %} {% endif %} {% if profile.scrub_pict %} - {% trans %}Scrub{% endtrans %} + {% trans %}Scrub{% endtrans %} {% else %} - {% trans %}Scrub{% endtrans %} + {% trans %}Scrub{% endtrans %} {% endif %}
- {% if user.memberships.filter(end_date=None).exists() or user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) or user == profile or user.is_in_group(settings.SITH_BAR_MANAGER_BOARD_GROUP) %} + {% if user.memberships.filter(end_date=None).exists() or user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) or user == + profile or user.is_in_group(settings.SITH_BAR_MANAGER_BOARD_GROUP) %} {# if the user is member of a club, he can view the subscription state #}
{% if profile.is_subscribed %} - {% if user == profile or user.is_root or user.is_board_member %} -
- {{ user_subscription(profile) }} -
- {% endif %} - {% if user == profile or user.is_root or user.is_board_member or user.is_launderette_manager %} -
- {# Shows tokens bought by the user #} - {{ show_tokens(profile) }} - {# Shows slots took by the user #} - {{ show_slots(profile) }} -
- {% endif %} + {% if user == profile or user.is_root or user.is_board_member %} +
+ {{ user_subscription(profile) }} +
+ {% endif %} + {% if user == profile or user.is_root or user.is_board_member or user.is_launderette_manager %} +
+ {# Shows tokens bought by the user #} + {{ show_tokens(profile) }} + {# Shows slots took by the user #} + {{ show_slots(profile) }} +
+ {% endif %} {% else %} -
+
{% trans %}Not subscribed{% endtrans %} {% if user.is_board_member %} - {% trans %}New subscription{% endtrans %} - {% endif %} + {% trans %}New subscription{% endtrans + %} {% endif %} -
+ {% endif %} +
{% endif %} {% if profile.was_subscribed and (user == profile or user.can_read_subscription_history)%} -
-
{% trans %}Subscription history{% endtrans %}
- - - - - - - +
+
{% trans %}Subscription history{% endtrans %}
+
{% trans %}Subscription start{% endtrans %}{% trans %}Subscription end{% endtrans %}{% trans %}Subscription type{% endtrans %}{% trans %}Payment method{% endtrans %}
+ + + + + + {% for sub in profile.subscriptions.all() %} - - - - - - + + + + + + {% endfor %} -
{% trans %}Subscription start{% endtrans %}{% trans %}Subscription end{% endtrans %}{% trans %}Subscription type{% endtrans %}{% trans %}Payment method{% endtrans %}
{{ sub.subscription_start }}{{ sub.subscription_end }}{{ sub.subscription_type }}{{ sub.get_payment_method_display() }}
{{ sub.subscription_start }}{{ sub.subscription_end }}{{ sub.subscription_type }}{{ sub.get_payment_method_display() }}
-
+ + {% endif %} {% if user.is_root or user.is_board_member %} @@ -183,18 +188,19 @@ {% if profile.gifts.exists() %}
-
-
{% trans %}Last given gift :{% endtrans %} {{ profile.gifts.order_by('-date').first() }}
-
-
+
{% else %} - {% trans %}No gift given yet{% endtrans %} + {% trans %}No gift given yet{% endtrans %} {% endif %} {% endif %} @@ -206,40 +212,40 @@ {% block script %} {{ super() }} {% endblock %} \ No newline at end of file diff --git a/core/templates/core/user_group.jinja b/core/templates/core/user_group.jinja index 80f5a51c..a80158eb 100644 --- a/core/templates/core/user_group.jinja +++ b/core/templates/core/user_group.jinja @@ -6,16 +6,12 @@ {%- endblock -%} {% block content %} -

{% trans user_name=profile.get_full_name() %}Edit user groups for {{ user_name }}{% endtrans %}

-
-
-

{% trans user_name=profile.get_full_name() %}Edit user groups for {{ user_name }}{% endtrans %}

- - {% csrf_token %} - {{ form.as_p() }} -

- - - +
+

{% trans user_name=profile.get_full_name() %}Edit user groups for {{ user_name }}{% endtrans %}

+
+ {% csrf_token %} + {{ form.as_p() }} +

+
{%- endblock -%} \ No newline at end of file