diff --git a/.env.rizoma b/.env.rizoma new file mode 100644 index 000000000..7fd87243a --- /dev/null +++ b/.env.rizoma @@ -0,0 +1,7 @@ +DEBUG=True +DJANGO_VITE_DEBUG=True +ACTIVE_LOGIN_BACKEND=ldap +COOPS_PT_API_BASE_URL=https://api.demo.coops.pt +COOPS_PT_ADMIN_EMAIL=invalid_email +COOPS_PT_ADMIN_PASSWORD=invalid_password +ENABLE_RIZOMA_CONTENT=True \ No newline at end of file diff --git a/rizoma/static/rizoma-static/css/base.css b/rizoma/static/rizoma-static/css/base.css index a825d0412..7def44329 100644 --- a/rizoma/static/rizoma-static/css/base.css +++ b/rizoma/static/rizoma-static/css/base.css @@ -9,7 +9,10 @@ @import url("./components/nav.css"); @import url("./components/link.css"); @import url("./components/table.css"); +@import url("./components/typography.css"); /* Pages */ @import url("./pages/about.css"); -@import url("./pages/auth.css"); \ No newline at end of file +@import url("./pages/auth.css"); + +@import url("./pages/allShifts.css"); diff --git a/rizoma/static/rizoma-static/css/components/buttons.css b/rizoma/static/rizoma-static/css/components/buttons.css index 0a3713d06..bf53e6682 100644 --- a/rizoma/static/rizoma-static/css/components/buttons.css +++ b/rizoma/static/rizoma-static/css/components/buttons.css @@ -106,4 +106,4 @@ .tapir-btn > .material-icons { font-size: 20px; -} \ No newline at end of file +} diff --git a/rizoma/static/rizoma-static/css/components/icons.css b/rizoma/static/rizoma-static/css/components/icons.css index 181d43a8a..35c2e2fcf 100644 --- a/rizoma/static/rizoma-static/css/components/icons.css +++ b/rizoma/static/rizoma-static/css/components/icons.css @@ -12,7 +12,7 @@ font-family: 'Material Icons'; font-weight: normal; font-style: normal; - font-size: 24px; /* Preferred icon size */ + font-size: 1em; display: inline-block; line-height: 1; text-transform: none; diff --git a/rizoma/static/rizoma-static/css/components/link.css b/rizoma/static/rizoma-static/css/components/link.css index 5ed27c756..4a0a4753c 100644 --- a/rizoma/static/rizoma-static/css/components/link.css +++ b/rizoma/static/rizoma-static/css/components/link.css @@ -1,3 +1,21 @@ a { color: var(--bs-primary); +} + +.tab-links { + display: flex; + gap: 1rem; + +} + +.tab-link { + color: var(--riz-color-gray-medium); + padding: .3rem 1.1rem; + text-decoration: none; + font-weight: 700; +} + +.tab-link__active { + color: var(--bs-primary); + border-bottom: 4px solid var(--bs-primary); } \ No newline at end of file diff --git a/rizoma/static/rizoma-static/css/components/nav.css b/rizoma/static/rizoma-static/css/components/nav.css index e4067d574..27b196f65 100644 --- a/rizoma/static/rizoma-static/css/components/nav.css +++ b/rizoma/static/rizoma-static/css/components/nav.css @@ -9,7 +9,7 @@ } .nav-link { - --bs-nav-link-font-size: 0.95rem; + --bs-nav-link-font-size: 1rem; } /* Sidebar */ @@ -61,6 +61,11 @@ /* padding: var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x); */ } +.sidebar .nav-link .material-icons { + font-size: 1.25rem; + margin-right: .25rem; +} + .sidebar .nav-link.active { background-color: var(--riz-color-gray-light); diff --git a/rizoma/static/rizoma-static/css/components/table.css b/rizoma/static/rizoma-static/css/components/table.css index df7489310..f69965a37 100644 --- a/rizoma/static/rizoma-static/css/components/table.css +++ b/rizoma/static/rizoma-static/css/components/table.css @@ -3,7 +3,7 @@ --bs-table-bg-type: initial; --bs-table-color-state: initial; --bs-table-bg-state: initial; - --bs-table-color: var(--bs-emphasis-color); + --bs-table-color: var(--bs-gray-700); --bs-table-bg: var(--bs-body-bg); --bs-table-border-color: var(--bs-border-color); --bs-table-accent-bg: transparent; @@ -13,6 +13,4 @@ --bs-table-active-bg: rgba(var(--bs-emphasis-color-rgb), 0.1); --bs-table-hover-color: var(--bs-emphasis-color); --bs-table-hover-bg: rgba(var(--bs-emphasis-color-rgb), 0.075); - - } diff --git a/rizoma/static/rizoma-static/css/components/typography.css b/rizoma/static/rizoma-static/css/components/typography.css new file mode 100644 index 000000000..ead99a45c --- /dev/null +++ b/rizoma/static/rizoma-static/css/components/typography.css @@ -0,0 +1,11 @@ +.h1 { + font-weight: 700; +} + +.h2 { + font-weight: 700; +} + +.h3 { + font-weight: 700; +} \ No newline at end of file diff --git a/rizoma/static/rizoma-static/css/pages/allShifts.css b/rizoma/static/rizoma-static/css/pages/allShifts.css new file mode 100644 index 000000000..5beda0118 --- /dev/null +++ b/rizoma/static/rizoma-static/css/pages/allShifts.css @@ -0,0 +1,37 @@ + +/* Fix duplicated data */ + +.all-shifts-page .attendances-table { + table-layout: fixed; + max-width: 1200px; +} + +.all-shifts-page .attendances-table th { + background-color: var(--riz-color-gray-lighter); +} + +.all-shifts-page .attendances-table td:first-child { + background-color: var(--riz-color-gray-lighter); +} + +.all-shifts-page .attendances-table th, .all-shifts-page .attendances-table td, .all-shifts-page .attendances-table tr { + border: 1px solid var(--bs-border-color); +} + +.all-shifts-page .shift-attendances > div:not(:first-child) { + display: none !important; +} + +.all-shifts-page .shift-attendances { + font-size: 1rem; +} + +.all-shifts-page .date-picker .btn-group > .btn:first-child { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.all-shifts-page .date-picker .btn-group > .btn-last { + border-top-right-radius: var(--bs-border-radius); + border-bottom-right-radius: var(--bs-border-radius); +} \ No newline at end of file diff --git a/rizoma/templates/accounts/user_detail.html b/rizoma/templates/accounts/user_detail.html index cf9560cbe..236d1221c 100644 --- a/rizoma/templates/accounts/user_detail.html +++ b/rizoma/templates/accounts/user_detail.html @@ -12,106 +12,166 @@ {% load statistics %} {% load rizoma %} {% block head %} - {{ block.super }} - - - +{{ block.super }} + + + {% endblock head %} {% block title %} - {% translate 'Member' %}: {% get_display_name_for_viewer object request.user %} +{% translate 'Member' %}: {% get_display_name_for_viewer object request.user %} {% endblock title %} {% block content %} -
-
-
-
- {% translate "Personal Data" %} - +
+
+
+
+ {% translate "Personal Data" %} + + mail{% translate 'Mails' %} -
-
-
-
-
-
{% translate "Name" %}:
-
{% get_display_name_full object %} -
+ {% if perms.group.manage %} + + badge{% translate 'Edit groups' %} + + {% endif %} + + fingerprint{% translate 'Edit username' %} + + {% if perms.accounts.manage %} + + edit{% translate 'Edit' %} + + {% else %} + + edit{% translate 'Edit name and pronouns' %} + + {% endif %} + +
+
+
+
+
+
{% translate "Name" %}:
+
{% get_display_name_full object %}
-
-
{% translate "Username" %}:
-
{{ object.username }}
+
+
+
{% translate "Username" %}:
+
{{ object.username }}
+
+
+
{% translate "Email" %}:
+
{{ object.email }}
+
+
+
{% translate "Phone number" %}:
+
+ {% if object.phone_number %} + {{ object.phone_number|format_phone_number }} + {% else %} + {% translate "Missing" %} + {% endif %} +
+
+
+
{% translate "Birthdate" %}:
+
+ {% if object.birthdate %} + {{ object.birthdate|date:"d.m.Y" }} + {% else %} + {% translate "Missing" %} + {% endif %}
-
-
{% translate "Email" %}:
-
{{ object.email }}
+
+
+
{% translate "Address" %}:
+
+ {% if object.street and object.city %} + {{ object.get_display_address }} + {% else %} + {% translate "Missing" %} + {% endif %}
-
-
{% translate "Phone number" %}:
-
- {% if object.phone_number %} - {{ object.phone_number|format_phone_number }} - {% else %} - {% translate "Missing" %} - {% endif %} -
+
+
+
{% translate "Preferred Language" %}:
+
{{ object.get_preferred_language_display }}
+
+ {% if perms.accounts.view %} +
+
{% translate "Groups" %}:
+
{{ object.get_groups_display }}
+
+
+
{% translate "Permissions" %}:
+
{{ object.get_permissions_display }}
+
+ {% endif %} +
+
{% translate "Co-Purchaser" %}:
+
+ {% if object.co_purchaser %} + {{ object.co_purchaser }} + {% else %} + - + {% endif %}
-
-
{% translate "Preferred Language" %}:
-
{{ object.get_preferred_language_display }}
+
+
+ {% if perms.accounts.manage %} +
+
+ {% csrf_token %} + +
- {% if perms.accounts.view %} -
-
{% translate "Groups" %}:
-
{{ object.get_groups_display }}
-
-
-
{% translate "Permissions" %}:
-
{{ object.get_permissions_display }}
-
{% endif %} -
-
{% translate "Co-Purchaser" %}:
-
- {% if object.co_purchaser %} - {{ object.co_purchaser }} - {% else %} - - - {% endif %} -
+ {% if object.pk == request.user.pk %} + + {% endif %} +
+
+ {% if object.share_owner.rizoma_member_data and object.share_owner.rizoma_member_data.photo_id %} +
+
+ {% translate 'Member photo' %}
- {% if object.share_owner.rizoma_member_data and object.share_owner.rizoma_member_data.photo_id %} -
-
- {% translate 'Member photo' %} -
-
- {% endif %}
+ {% endif %}
- {% if not shifts_only %} -
{% share_owner_ownership_list object.share_owner %}
- {% endif %} -
-
-
{% user_shifts_overview object %}
-
{% log_entry_list tapir_user=object %}
{% if not shifts_only %} -
-
{% purchase_tracking_card tapir_user=object %}
- {% if tapir_user.share_owner and tapir_user.allows_purchase_tracking %} -
{% purchase_statistics_card tapir_user=object %}
-
{% credit_account_card tapir_user=object %}
- {% endif %} -
+
{% share_owner_ownership_list object.share_owner %}
+ {% endif %} +
+
+
{% user_shifts_overview object %}
+
{% log_entry_list tapir_user=object %}
+
+{% if not shifts_only %} +
+
{% purchase_tracking_card tapir_user=object %}
+ {% if tapir_user.share_owner and tapir_user.allows_purchase_tracking %} +
{% purchase_statistics_card tapir_user=object %}
+
{% credit_account_card tapir_user=object %}
{% endif %} +
+{% endif %} {% endblock content %} \ No newline at end of file diff --git a/rizoma/templates/core/base.html b/rizoma/templates/core/base.html index a329302ed..367976616 100644 --- a/rizoma/templates/core/base.html +++ b/rizoma/templates/core/base.html @@ -48,7 +48,7 @@ {% vite_react_refresh %} - +