Skip to content

Commit fd23fc5

Browse files
committed
Merge pull request #114 from opdemand/113-controller-web-ui
Aligned the Deis web UI with the deis.io/docset theme.
2 parents 4edc124 + 976ba88 commit fd23fc5

13 files changed

Lines changed: 106 additions & 61 deletions

deis/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@
137137
'django.contrib.admin',
138138
'django.contrib.auth',
139139
'django.contrib.contenttypes',
140+
'django.contrib.humanize',
140141
'django.contrib.messages',
141142
'django.contrib.sessions',
142143
'django.contrib.sites',

web/templates/account/email.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ <h2>{% trans "Add E-mail Address" %}</h2>
5050

5151
<form method="post" action="" class="add_email uniForm">
5252
{% csrf_token %}
53-
{{ add_email_form.as_p}}
53+
{{ form.as_p}}
5454
<button name="action_add" type="submit">{% trans "Add E-mail" %}</button>
5555
</form>
5656

web/templates/account/login.html

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,22 @@
44
{% load account %}
55
{% load url from future %}
66

7-
{% block head_title %}{% trans "Log in" %}{% endblock %}
7+
{% block head_title %}{% trans "Sign In" %}{% endblock %}
88

99
{% block content %}
1010

11-
<div class="span5 offset3">
12-
<a href="{{ signup_url }}">Sign up</a> for a {{ site.name }} account
11+
<h1>{% trans "Log In" %}</h1>
1312

14-
{% if socialaccount.providers %}
13+
<p>{% blocktrans %}Need an account? <a href="{{ signup_url }}"><strong>Sign up</strong></a>.{% endblocktrans %}</p>
14+
15+
{% if socialaccount.providers %}
16+
<p>{% blocktrans with site.name as site_name %}Please log in with one
17+
of your existing third party accounts.{% endblocktrans %}</p>
1518
<div class="socialaccount_ballot">
1619
<ul class="socialaccount_providers">
1720
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
1821
</ul>
22+
<div class="login-or">{% trans 'or' %}</div>
1923
</div>
2024
{% include "socialaccount/snippets/login_extra.html" %}
2125
{% endif %}
@@ -26,10 +30,9 @@
2630
{% if redirect_field_value %}
2731
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
2832
{% endif %}
29-
<a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% trans "Reset Password" %}</a><br>
30-
<button class="primaryAction" type="submit">{% trans "Log in" %}</button>
33+
<a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
34+
<button class="primaryAction" type="submit">{% trans "Log In" %}</button>
3135
</form>
3236

33-
</div>
3437
{% endblock %}
3538

web/templates/account/password_change.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ <h1>{% trans "Change Password" %}</h1>
88

99
<form method="POST" action="" class="password_change">
1010
{% csrf_token %}
11-
{{ password_change_form.as_p }}
11+
{{ form.as_p }}
1212
<button type="submit" name="action">{% trans "Change Password" %}</button>
1313
</form>
1414
{% endblock %}

web/templates/account/password_reset.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ <h1>{% trans "Password Reset" %}</h1>
1111
{% if user.is_authenticated %}
1212
{% include "account/snippets/already_logged_in.html" %}
1313
{% endif %}
14-
15-
<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}</p>
16-
14+
15+
<p>{% trans "Can't remember your password?<br>Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}</p>
16+
1717
<form method="POST" action="" class="password_reset">
1818
{% csrf_token %}
19-
{{ password_reset_form.as_p }}
19+
{{ form.as_p }}
2020
<input type="submit" value="{% trans "Reset My Password" %}" />
2121
</form>
22-
22+
2323
<p>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</p>
2424
{% endblock %}
2525

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{% extends "account/base.html" %}
2+
3+
{% load url from future %}
4+
{% load i18n %}
5+
{% block head_title %}{% trans "Change Password" %}{% endblock %}
6+
7+
{% block content %}
8+
<h1>{% trans "Change Password" %}</h1>
9+
<p>{% trans 'Your password is now changed.' %}</p>
10+
{% endblock %}

web/templates/account/password_set.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ <h1>{% trans "Set Password" %}</h1>
99

1010
<form method="POST" action="" class="password_set">
1111
{% csrf_token %}
12-
{{ password_set_form.as_p }}
12+
{{ form.as_p }}
1313
<input type="submit" name="action" value="{% trans "Set Password" %}"/>
1414
</form>
1515
{% endblock %}

web/templates/account/signup.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{% block content %}
99
<h1>{% trans "Sign Up" %}</h1>
1010

11-
<p>{% blocktrans %}Already have an account? Then please <a href="{{ login_url }}">sign in</a>.{% endblocktrans %}</p>
11+
<p>{% blocktrans %}Already have an account? <a href="{{ login_url }}"><strong>Log in</strong></a>.{% endblocktrans %}</p>
1212

1313
<form class="signup" id="signup_form" method="post" action="{% url 'account_signup' %}">
1414
{% csrf_token %}

web/templates/socialaccount/login_cancelled.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<h1>{% trans "Login Cancelled" %}</h1>
1111

12-
{% url 'socialaccount_login' as login_url %}
12+
{% url 'account_login' as login_url %}
1313

1414
<p>{% blocktrans %}You decided to cancel logging in to our site using one of your existing accounts. If this was a mistake, please proceed to <a href="{{login_url}}">sign in</a>.{% endblocktrans %}</p>
1515

web/templates/web/account.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
{% extends "web/base.html" %}
2+
{% load gravatar_tags %}
3+
{% load i18n %}
24

35
{% block content %}
46
<h2>{{ request.user }}'s Account</a></h2>
7+
<img src="{% gravatar_url request.user.email %}" class="img-circle" height="64" width="64">
8+
<form method="post" action="{% url 'account_logout' %}">
9+
{% csrf_token %}
10+
{% if redirect_field_value %}
11+
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
12+
{% endif %}
13+
<button type="submit">{% trans 'Log Out' %}</button>
14+
</form>
15+
{% if user.is_staff %}
16+
<a href="{% url 'admin:index' %}">Admin</a>
17+
{% endif %}
518
{% endblock %}

0 commit comments

Comments
 (0)