diff --git a/maps/static/maps/css/app.scss b/maps/static/maps/css/app.scss index 8cae265..d0b7912 100644 --- a/maps/static/maps/css/app.scss +++ b/maps/static/maps/css/app.scss @@ -66,6 +66,14 @@ select.multiple { } @media (min-width: 60rem) { + .menu li:last-child { + &.menu__submenu-wrapper .menu__submenu { + min-width: unset; + right: 0; + width: auto; + } + } + @supports (display:grid) { .my-profiles .cards { grid-template-columns: repeat(2, 1fr); @@ -132,3 +140,47 @@ select.multiple { .card__role + .card__role { margin-top: rem(9); } + +.box { + border: dashed rem(1) var(--grey-500); + padding: var(--gutter); +} + +.account { + background: $off-white; + + .page-header { + padding-bottom: rem(50); + position: relative; + z-index: 0; + + @include breakpoint-up(md) { + padding-bottom: rem(65); + } + } + + .stack, + .page-header { + @include breakpoint-up(md) { + margin-left: auto; + margin-right: auto; + width: 50%; + } + } +} + +.input-group + .buttons { + margin-top: 1.5rem; +} + +.buttons .button + .button { + margin-top: 1.5rem; +} + +.radio label.primary { + font-weight: $font-weight-bold; + + .badge { + font-weight: $font-weight-normal; + } +} diff --git a/maps/templates/maps/account_settings.html b/maps/templates/maps/account_settings.html new file mode 100644 index 0000000..c93d71e --- /dev/null +++ b/maps/templates/maps/account_settings.html @@ -0,0 +1,22 @@ +{% extends 'maps/base.html' %} +{% load static %} +{% load i18n %} +{% block bodyclass %}account{% endblock %} +{% block content %} + +
+

{% trans 'Email' %}

+
+ {{ user.email }}
+ {% trans 'Manage email addresses' %} +
+

{% trans 'Password' %}

+
+ *******
+ {% trans 'Change password' %} +
+
+{% endblock %} diff --git a/maps/templates/maps/base.html b/maps/templates/maps/base.html index 26ade56..5c1f4ee 100644 --- a/maps/templates/maps/base.html +++ b/maps/templates/maps/base.html @@ -20,10 +20,11 @@
-{% block content %}{% endblock %} + {% block content %}{% endblock %}
{% include 'maps/footer.html' %} +{% block extra_body %}{% endblock %} diff --git a/maps/templates/maps/header.html b/maps/templates/maps/header.html index 98c69a0..c1ddb89 100644 --- a/maps/templates/maps/header.html +++ b/maps/templates/maps/header.html @@ -1,4 +1,5 @@ {% load static %} +{% load i18n %} {% url 'index' as home_url %}
@@ -69,16 +70,15 @@ {% if user.is_authenticated %} {% endif %} diff --git a/maps/templates/maps/individual_detail.html b/maps/templates/maps/individual_detail.html index 6ceb0ba..b7f376d 100644 --- a/maps/templates/maps/individual_detail.html +++ b/maps/templates/maps/individual_detail.html @@ -2,18 +2,13 @@ {% load static %} {% load i18n %} {% load maps_extras %} -{% block title %}{{ user.last_name|add:', '|add:user.first_name|titlify }}{% endblock %} -{% block bodyclass %}page{% endblock %} +{% block title %}{{ user.first_name|add:' '|add:user.last_name|titlify }}{% endblock %} +{% block bodyclass %}profile profile--individual{% endblock %} {% block content %} - {% if user.url %} -

{{ user.last_name }}, {{ user.first_name }}

- {% else %} -

{{ user.last_name }}, {{ user.first_name }}

- {% endif %}
diff --git a/maps/templates/maps/my_profiles.html b/maps/templates/maps/my_profiles.html index a719e09..ea09da0 100644 --- a/maps/templates/maps/my_profiles.html +++ b/maps/templates/maps/my_profiles.html @@ -1,28 +1,29 @@ {% extends 'maps/base.html' %} {% load static %} +{% load i18n %} {% load maps_extras %} {% block title %}{{ 'My profiles' |titlify }}{% endblock %} {% block bodyclass %}my-profiles{% endblock %} {% block content %} {% if messages %} {% for message in messages %} {% include 'maps/partials/notification.html' %} {% endfor %} {% endif %} -

Personal profile

+

{% trans 'Personal profile' %}

{% if user.has_profile %} {% else %} -

None created.

-

Create individual profile

+

{% trans 'None created.' %}

+

{% trans 'Create individual profile' %}

{% endif %} -

Organizational profiles

+

{% trans 'Organizational profiles' %}

{% if user_orgs %}
-

Create another organizational profile

+

{% trans 'Create another organizational profile' %}

{% else %} -

None created.

-

Create organizational profile

+

{% trans 'None created.' %}

+

{% trans 'Create organizational profile' %}

{% endif %} {% endblock %} diff --git a/maps/templates/maps/profile.html b/maps/templates/maps/profile.html deleted file mode 100644 index 4960663..0000000 --- a/maps/templates/maps/profile.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends 'maps/base.html' %} -{% load static %} -{% load i18n %} -{% block bodyclass %}page{% endblock %} -{% block content %} - -
Hello {{ user.first_name }}
- Change password -{% endblock %} diff --git a/maps/urls.py b/maps/urls.py index 1a34ee4..36d5bf2 100644 --- a/maps/urls.py +++ b/maps/urls.py @@ -14,6 +14,7 @@ path('organizations//delete', OrganizationDelete.as_view(), name='organization-delete'), path('individuals/', views.individual_detail, name='individual-detail'), path('my-profiles/', views.my_profiles, name='my-profiles'), + path('accounts/', views.account_settings, name='account-settings'), path('about/', AboutPageView.as_view(), {'title': 'About'}, name='about'), path('privacy-policy/', PrivacyPolicyView.as_view(), {'title': 'Privacy Policy'}, name='privacy_policy'), path('terms-of-service/', TermsOfServiceView.as_view(), {'title': 'Terms of Service'}, name='terms_of_service'), diff --git a/maps/views.py b/maps/views.py index df73538..7abf6d6 100644 --- a/maps/views.py +++ b/maps/views.py @@ -174,6 +174,10 @@ def my_profiles(request): return render(request, 'maps/my_profiles.html', context) +# Account Seetings +@login_required +def account_settings(request): + return render(request, 'maps/account_settings.html') # Static pages class PrivacyPolicyView(TemplateView): diff --git a/templates/account/account_inactive.html b/templates/account/account_inactive.html index 3347f4f..8047267 100644 --- a/templates/account/account_inactive.html +++ b/templates/account/account_inactive.html @@ -1,11 +1,13 @@ {% extends "account/base.html" %} - {% load i18n %} - -{% block head_title %}{% trans "Account Inactive" %}{% endblock %} +{% block title %}{% trans "Account inactive"|titlify %}{% endblock %} {% block content %} -

{% trans "Account Inactive" %}

- -

{% trans "This account is inactive." %}

+ +

{% trans "Home" %}

+

{% trans "Account inactive" %}

+ +
+

{% trans "This account is inactive." %}

+
{% endblock %} diff --git a/templates/account/base.html b/templates/account/base.html index fc9aeaa..0cf9300 100644 --- a/templates/account/base.html +++ b/templates/account/base.html @@ -1,2 +1,3 @@ {% extends 'maps/base.html' %} {% load maps_extras %} +{% block bodyclass %}account{% endblock %} diff --git a/templates/account/email.html b/templates/account/email.html index 019e3e8..13e6fda 100644 --- a/templates/account/email.html +++ b/templates/account/email.html @@ -1,70 +1,67 @@ {% extends "account/base.html" %} - {% load i18n %} - -{% block head_title %}{% trans "Account" %}{% endblock %} - +{% block title %}{% trans "Account" %}{% endblock %} {% block content %} -

{% trans "E-mail Addresses" %}

-{% if user.emailaddress_set.all %} -

{% trans 'The following e-mail addresses are associated with your account:' %}

- - - -{% else %} -

{% trans 'Warning:'%} {% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}

- -{% endif %} - - -

{% trans "Add E-mail Address" %}

- -
- {% csrf_token %} - {{ form.as_p }} - -
- + +
+ {% if messages %} + {% for message in messages %} + {% include 'maps/partials/notification.html' %} + {% endfor %} + {% endif %} + {% if user.emailaddress_set.all %} +

{% trans 'The following email addresses are associated with your account:' %}

+ + {% else %} +

{% trans 'Warning:'%} {% trans "You currently do not have any email address set up. You should really add an email address so you can receive notifications, reset your password, etc." %}

+ {% endif %} +

{% trans "Add email address" %}

+
+ {% csrf_token %} + {{ form }} +
+ +
{% endblock %} {% block extra_body %}