1
0
Fork 0

Multiple grid/spacing UI fixes on account/avatar templates

merge-requests/149/head
Nikos Roussos 2015-08-13 21:21:24 +03:00
parent 9e0e53cbb8
commit 9d1604d609
28 changed files with 270 additions and 357 deletions

View File

@ -100,6 +100,15 @@ a:hover {
text-align: center;
}
.form-group {
margin-left: 0px;
margin-right: 0px;
}
.bottom-details {
margin-top: 10px;
}
.img-avatar {
border: 2px solid white;
border-radius: 50px;
@ -109,6 +118,10 @@ a:hover {
margin-right: 5px;
}
.form-avatar {
margin-bottom: 10px;
}
.progress {
margin-bottom: 0px;
}

View File

@ -3,60 +3,60 @@
{% load url from future %}
{% load crispy_forms_tags %}
{% block head_title %} - Account{% endblock %}
{% block head_title %} - Email{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-md-5">
<h2>E-mail Addresses</h2>
{% if user.emailaddress_set.all %}
<p>The following e-mail addresses are associated with your account:</p>
<div class="row">
<div class="col-md-5">
<h2>Email</h2>
{% if user.emailaddress_set.all %}
<p>The following email addresses are associated with your account:</p>
<form action="{% url 'account_email' %}" class="email_list" method="post">{% csrf_token %}
<fieldset class="blockLabels">
<form action="{% url 'account_email' %}" class="email_list" method="post">{% csrf_token %}
<fieldset class="blockLabels">
{% for emailaddress in user.emailaddress_set.all %}
<div class="ctrlHolder">
<label for="email_radio_{{ forloop.counter }}" class="{% if emailaddress.primary %}primary_email{% endif %}">
{% for emailaddress in user.emailaddress_set.all %}
<div class="ctrlHolder">
<label for="email_radio_{{ forloop.counter }}" class="{% if emailaddress.primary %}primary_email{% endif %}">
<input id="email_radio_{{ forloop.counter }}" type="radio" name="email" {% if emailaddress.primary %}checked="checked"{% endif %} value="{{ emailaddress.email }}"/>
<input id="email_radio_{{ forloop.counter }}" type="radio" name="email" {% if emailaddress.primary %}checked="checked"{% endif %} value="{{ emailaddress.email }}"/>
{{ emailaddress.email }}
{% if emailaddress.verified %}
<span class="verified">Verified</span>
{% else %}
<span class="unverified">Unverified</span>
{% endif %}
{% if emailaddress.primary %}<span class="primary">Primary</span>{% endif %}
</label>
</div>
{% endfor %}
<div class="buttonHolder">
<button class="secondaryAction" type="submit" name="action_primary" >Make Primary</button>
<button class="secondaryAction" type="submit" name="action_send" >{Re-send Verification</button>
<button class="primaryAction" type="submit" name="action_remove" >Remove</button>
{{ emailaddress.email }}
{% if emailaddress.verified %}
<span class="glyphicon glyphicon-ok" aria-hidden="true" title="Verified"></span>
{% else %}
<span class="glyphicon glyphicon-remove" aria-hidden="true" title="Unverified"></span>
{% endif %}
{% if emailaddress.primary %}
<span class="glyphicon glyphicon-star" aria-hidden="true" title="Primary"></span>
{% endif %}
</label>
</div>
{% endfor %}
</fieldset>
</form>
<div class="buttonHolder">
<button class="btn btn-sm btn-primary" type="submit" name="action_primary">Make Primary</button>
<button class="btn btn-sm btn-default" type="submit" name="action_send">Re-send Verification</button>
<button class="btn btn-sm btn-danger" type="submit" name="action_remove">Remove</button>
</div>
{% else %}
<p>
<strong>Warning:</strong> 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.
</p>
{% endif %}
<h2>Add E-mail Address</h2>
<form method="post" action="." class="add_email">{% csrf_token %}
{{ form|crispy }}
<button class="btn" name="action_add" type="submit">Add E-mail</button>
</fieldset>
</form>
</div>
{% else %}
<p>
<strong>Warning:</strong> 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.
</p>
{% endif %}
<h2>Add Email Address</h2>
<form method="post" action="." class="add_email">{% csrf_token %}
{{ form|crispy }}
<button class="btn btn-sm btn-primary" name="action_add" type="submit">Add Email</button>
</form>
</div>
</div>
{% endblock %}
@ -64,7 +64,7 @@
{% block extra_body %}
<script type="text/javascript">
(function() {
var message = "Do you really want to remove the selected e-mail address?";
var message = "Do you really want to remove the selected email address?";
var actions = document.getElementsByName('action_remove');
if (actions.length) {
actions[0].addEventListener("click", function(e) {

View File

@ -6,28 +6,27 @@
{% block head_title %} - Confirm E-mail Address{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2>Confirm E-mail Address</h2>
<div class="row">
<div class="col-xs-5">
<h2>Confirm E-mail Address</h2>
{% if confirmation %}
{% user_display confirmation.email_address.user as user_display %}
<p>
Please confirm that <a href="mailto:{{ email }}">{{ email }}</a>
is an e-mail address for user {{ user_display }}.
</p>
<form method="post" action="{% url 'account_confirm_email' confirmation.key %}">{% csrf_token %}
<button class="submit" type="submit">Confirm</button>
</form>
{% else %}
{% url 'account_email' as email_url %}
<p>
This e-mail confirmation link expired or is invalid.
Please <a href="{{ email_url }}">issue a new e-mail confirmation request</a>.
</p>
{% endif %}
</div>
{% if confirmation %}
{% user_display confirmation.email_address.user as user_display %}
<p>
Please confirm that <a href="mailto:{{ email }}">{{ email }}</a>
is an e-mail address for user {{ user_display }}.
</p>
<form method="post" action="{% url 'account_confirm_email' confirmation.key %}">
{% csrf_token %}
<button class="btn btn-primary" type="submit">Confirm</button>
</form>
{% else %}
{% url 'account_email' as email_url %}
<p>
This e-mail confirmation link expired or is invalid.
Please <a href="{{ email_url }}">issue a new e-mail confirmation request</a>.
</p>
{% endif %}
</div>
</div>
{% endblock %}

View File

@ -5,16 +5,14 @@
{% block head_title %} - Confirm E-mail Address{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2>Confirm E-mail Address</h2>
{% user_display email_address.user as user_display %}
<p>
You have confirmed that <a href="mailto:{{ email }}">{{ email }}</a>
is an e-mail address for user {{ user_display }}.
</p>
</div>
<div class="row">
<div class="col-xs-5">
<h2>Confirm E-mail Address</h2>
{% user_display email_address.user as user_display %}
<p>
You have confirmed that <a href="mailto:{{ email }}">{{ email }}</a>
is an e-mail address for user {{ user_display }}.
</p>
</div>
</div>
{% endblock %}

View File

@ -7,36 +7,37 @@
{% block head_title %} - Sign In{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-md-5">
<h2>Sign In</h2>
{% if socialaccount.providers %}
<p>
Please sign in with one
of your existing third party accounts. Or, <a href="{{ signup_url }}">sign up</a>
for a {{ site_name }} account and sign in below:
</p>
<div class="row">
<div class="col-md-5">
<h2>Log In</h2>
{% if socialaccount.providers %}
<p>
Please sign in with one
of your existing third party accounts. Or, <a href="{{ signup_url }}">sign up</a>
for a {{ site_name }} account and sign in below:
</p>
<div class="socialaccount_ballot">
<ul class="socialaccount_providers">
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
</ul>
<div class="login-or">or</div>
</div>
<div class="socialaccount_ballot">
<ul class="socialaccount_providers">
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
</ul>
<div class="login-or">or</div>
</div>
{% include "socialaccount/snippets/login_extra.html" %}
{% include "socialaccount/snippets/login_extra.html" %}
{% endif %}
<form class="login" method="POST" action="{% url 'account_login' %}">{% csrf_token %}
{{ form|crispy }}
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %}
<form class="login" method="POST" action="{% url 'account_login' %}">{% csrf_token %}
{{ form|crispy }}
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %}
<a class="button secondaryAction" href="{% url 'account_reset_password' %}">Forgot Password?</a>
<button class="btn btn-primary" type="submit">Sign In</button>
</form>
</div>
<button class="btn btn-primary" type="submit">Sign In</button>
<div class="bottom-details">
<a href="{% url 'account_reset_password' %}">Forgot Password?</a> |
<a href="{% url 'account_signup' %}">Sign Up</a>
</div>
</form>
</div>
</div>
{% endblock %}

View File

@ -5,18 +5,16 @@
{% block head_title %} - Sign Out{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-md-5">
<h2>Sign Out</h2>
<p>Are you sure you want to sign out?</p>
<form method="post" action="{% url 'account_logout' %}">{% csrf_token %}
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
{% endif %}
<button class="btn btn-danger" type="submit">Sign Out</button>
</form>
</div>
<div class="row">
<div class="col-md-5">
<h2>Sign Out</h2>
<p>Are you sure you want to sign out?</p>
<form method="post" action="{% url 'account_logout' %}">{% csrf_token %}
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
{% endif %}
<button class="btn btn-danger" type="submit">Sign Out</button>
</form>
</div>
</div>
{% endblock %}

View File

@ -4,16 +4,14 @@
{% block head_title %} - Change Password{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-md-5">
<h2>Change Password</h2>
<div class="row">
<div class="col-md-5">
<h2>Change Password</h2>
<form method="POST" action="./" class="password_change">{% csrf_token %}
{{ form|crispy }}
<button class="btn" type="submit" name="action">Change Password</button>
</form>
</div>
<form method="POST" action="./" class="password_change">{% csrf_token %}
{{ form|crispy }}
<button class="btn btn-primary" type="submit" name="action">Change Password</button>
</form>
</div>
</div>
{% endblock %}

View File

@ -1,11 +0,0 @@
{% extends "account/base.html" %}
{% block head_title %} - Delete Password{% endblock %}
{% block content %}
<h2>Delete Password</h2>
<p>You may delete your password since you are currently logged in using OpenID.</p>
<form method="post" action="./">{% csrf_token %}
<button class="btn" type="submit">delete my password</button>
</form>
{% endblock %}

View File

@ -1,8 +0,0 @@
{% extends "account/base.html" %}
{% block head_title %} - Password Deleted{% endblock %}
{% block content %}
<h2>Password Deleted</h2>
<p>Your password has been deleted.</p>
{% endblock %}

View File

@ -6,22 +6,22 @@
{% block head_title %} - Password Reset{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-md-5">
<h2>Password Reset</h2>
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
<div class="row">
<div class="col-md-5">
<h2>Password Reset</h2>
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
<p>Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it."</p>
<p>
Forgotten your password? Enter your e-mail address below,
and we'll send you an e-mail allowing you to reset it.
</p>
<form method="POST" action="./" class="password_reset">{% csrf_token %}
{{ form|crispy }}
<button class="btn" type="submit">Reset My Password</button>
</form>
<p>Please contact us if you have any trouble resetting your password.</p>
</div>
<form method="POST" action="./" class="password_reset">{% csrf_token %}
{{ form|crispy }}
<button class="btn btn-primary" type="submit">Reset</button>
</form>
</div>
</div>
{% endblock %}

View File

@ -5,15 +5,16 @@
{% block head_title %} - Password Reset{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2>Password Reset</h2>
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
<p>We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.</p>
</div>
<div class="row">
<div class="col-xs-12">
<h2>Password Reset</h2>
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
<p>
We have sent you an e-mail. Please contact us if you do not receive
it within a few minutes.
</p>
</div>
</div>
{% endblock %}

View File

@ -6,25 +6,26 @@
{% block head_title %} - Change Password{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2>{% if token_fail %}Bad Token{% else %}Change Password{% endif %}</h2>
<div class="row">
<div class="col-xs-5">
<h2>{% if token_fail %}Bad Token{% else %}Change Password{% endif %}</h2>
{% if token_fail %}
{% url 'account_reset_password' as passwd_reset_url %}
<p>The password reset link was invalid, possibly because it has already been used. Please request a <a href="{{ passwd_reset_url }}">new password reset</a>.</p>
{% if token_fail %}
{% url 'account_reset_password' as passwd_reset_url %}
<p>
The password reset link was invalid, possibly because it has already been used.
Please request a <a href="{{ passwd_reset_url }}">new password reset</a>.
</p>
{% else %}
{% if form %}
<form method="POST" action="./">{% csrf_token %}
{{ form|crispy }}
<button type="submit" class="btn btn-primary" name="action">Save</button>
</form>
{% else %}
{% if form %}
<form method="POST" action="./">{% csrf_token %}
{{ form|crispy }}
<button type="submit" name="action">change password</button>
</form>
{% else %}
<p>Your password is now changed.</p>
{% endif %}
<p>Your password is now changed.</p>
{% endif %}
</div>
{% endif %}
</div>
</div>
{% endblock %}

View File

@ -4,12 +4,10 @@
{% block head_title %} - Change Password{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-md-5">
<h2>Change Password</h2>
<p>Your password is now changed.'</p>
</div>
<div class="row">
<div class="col-md-5">
<h2>Change Password</h2>
<p>Your password is now changed.</p>
</div>
</div>
{% endblock %}

View File

@ -6,15 +6,13 @@
{% block head_title %} - Set Password{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-md-5">
<h2>Set Password</h2>
<form method="POST" action="./" class="password_set">{% csrf_token %}
{{ form|crispy }}
<input type="submit" name="action" value="Set Password"/>
</form>
</div>
<div class="row">
<div class="col-md-5">
<h2>Set Password</h2>
<form method="POST" action="./" class="password_set">{% csrf_token %}
{{ form|crispy }}
<input type="submit" name="action" value="Set Password"/>
</form>
</div>
</div>
{% endblock %}

View File

@ -6,15 +6,19 @@
{% block title %} - Sign Up{% endblock title %}
{% block content %}
<h1>Sign Up</h1>
<div class="row">
<div class="col-md-5">
<h1>Sign Up</h1>
<p>Already have an account? Then please <a href="{{ login_url }}">sign in</a>.</p>
<p>Already have an account? Then please <a href="{{ login_url }}">log in</a>.</p>
<form class="signup" id="signup_form" method="post" action="{% url 'account_signup' %}">{% csrf_token %}
{{ form|crispy }}
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %}
<button class="btn" type="submit">Sign Up &raquo;</button>
</form>
<form class="signup" id="signup_form" method="post" action="{% url 'account_signup' %}">{% csrf_token %}
{{ form|crispy }}
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %}
<button class="btn btn-primary" type="submit">Sign Up</button>
</form>
</div>
</div>
{% endblock content %}

View File

@ -5,16 +5,14 @@
{% block head_title %} - Invitation only Sign Ups{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-md-5">
<h2>Invitation only Sign Ups</h2>
<p>SatNOGS Network is currently on Alpha state.</p>
<p>
You can though request an account on our
<a href="https://community.satnogs.org/" target="_blank">Community forum</a>.
</p>
</div>
<div class="row">
<div class="col-md-5">
<h2>Invitation only Sign Ups</h2>
<p>SatNOGS Network is currently on Alpha state.</p>
<p>
You can though request an account on our
<a href="https://community.satnogs.org/" target="_blank">Community forum</a>.
</p>
</div>
</div>
{% endblock %}

View File

@ -4,16 +4,14 @@
{% block head_title %} - Verify Your E-mail Address{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-md-5">
<h2>Verify Your E-mail Address</h2>
<p>
We have sent an e-mail to <a href="mailto:{{ email }}">{{ email }}</a>
for verification. Follow the link provided to finalize the signup process.
Please contact us if you do not receive it within a few minutes.
</p>
</div>
<div class="row">
<div class="col-md-5">
<h2>Verify Your E-mail Address</h2>
<p>
We have sent an e-mail to <a href="mailto:{{ email }}">{{ email }}</a>
for verification. Follow the link provided to finalize the signup process.
Please contact us if you do not receive it within a few minutes.
</p>
</div>
</div>
{% endblock %}

View File

@ -5,22 +5,27 @@
{% block head_title %} - Verify Your E-mail Address{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-md-5">
<h2>Verify Your E-mail Address</h2>
{% url 'account_email' as email_url %}
<div class="row">
<div class="col-md-5">
<h2>Verify Your E-mail Address</h2>
{% url 'account_email' as email_url %}
<p>This part of the site requires us to verify that
<p>
This part of the site requires us to verify that
you are who you claim to be. For this purpose, we require that you
verify ownership of your e-mail address.</p>
verify ownership of your e-mail address.
</p>
<p>We have sent an e-mail to you for
verification. Please click on the link inside this e-mail. Please
contact us if you do not receive it within a few minutes.</p>
<p>
We have sent an e-mail to you for
verification. Please click on the link inside this e-mail.
Please contact us if you do not receive it within a few minutes.
</p>
<p><strong>Note:</strong> you can still <a href="{{ email_url }}">change your e-mail address</a>.</p>
</div>
<p>
<strong>Note:</strong> you can still
<a href="{{ email_url }}">change your e-mail address</a>.
</p>
</div>
</div>
{% endblock %}

View File

@ -1,22 +1 @@
{% extends "avatar/base.html" %}
{% load avatar_tags %}
{% load url from future %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2>Your current avatar:</h2>
{% avatar user %}
{% if not avatars %}
<p>You haven't uploaded an avatar yet. Please upload one now.</p>
{% endif %}
<form enctype="multipart/form-data" method="POST" action="{% url 'avatar_add' %}">
{{ upload_avatar_form.as_p }}
<p>{% csrf_token %}<input type="submit" value="Upload New Image" /></p>
</form>
</div>
</div>
</div>
{% endblock %}
{% extends "avatar/change.html" %}

View File

@ -3,26 +3,30 @@
{% load url from future %}
{% block content %}
<div class="container">
<h2>Avatar</h2>
<div class="row">
<div class="col-xs-12">
<h2>Your current avatar:</h2>
{% avatar user %}
{% if not avatars %}
<p>You haven't uploaded an avatar yet. Please upload one now.</p>
{% else %}
<form method="POST" action="{% url 'avatar_change' %}">
<ul>
{{ primary_avatar_form.as_ul }}
</ul>
<p>{% csrf_token %}<input type="submit" value="Choose new Default" /></p>
</form>
{% endif %}
<form enctype="multipart/form-data" method="POST" action="{% url 'avatar_add' %}">
{{ upload_avatar_form.as_p }}
<p>{% csrf_token %}<input type="submit" value="Upload New Image" /></p>
<div class="col-md-1">
{% avatar user %}
</div>
<div class="col-md-9">
{% if not avatars %}
<p>You haven't uploaded an avatar yet. Showing what found at Gravatar.</p>
{% endif %}
<form class="form-avatar" enctype="multipart/form-data" method="POST" action="{% url 'avatar_add' %}">
{% csrf_token %}
{{ upload_avatar_form.as_p }}
<input type="submit" class="btn btn-sm btn-primary" value="Upload New Image">
</form>
{% if avatars %}
<form class="form-avatar" method="POST" action="{% url 'avatar_delete' %}">
{% csrf_token %}
{% for avatar in avatars %}
<input name="choices" value="{{ avatar.id }}" type="hidden">
{% endfor %}
<input type="submit" class="btn btn-sm btn-danger" value="Delete Current Avatar">
</form>
{% endif %}
</div>
</div>
</div>
{% endblock %}

View File

@ -1,23 +0,0 @@
{% extends "avatar/base.html" %}
{% load url from future %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2>Please select the avatars that you would like to delete.</h2>
{% if not avatars %}
{% url 'avatar_change' as avatar_change_url %}
<p>You have no avatars to delete. Please <a href="{{ avatar_change_url }}">upload one</a> now.</p>
{% else %}
<form method="POST" action="{% url 'avatar_delete' %}">
<ul>
{{ delete_avatar_form.as_ul }}
</ul>
<p>{% csrf_token %}<input type="submit" value="Delete These" /></p>
</form>
{% endif %}
</div>
</div>
</div>
{% endblock %}

View File

@ -6,7 +6,7 @@
<html lang="en" ng-app>
<head>
<meta charset="utf-8">
<title>SatNOGS - Network{% block title %}{% endblock title %}</title>
<title>SatNOGS Network{% block title %}{% endblock title %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="{% static 'css/lib/bootstrap.min.css' %}">
<link rel="stylesheet" href="{% static 'css/lib/bootstrap-theme.min.css' %}">

View File

@ -11,8 +11,8 @@
<h2>{% avatar user 50 %} {{ user.displayname }}
{% if user == request.user %}
<div class="pull-right edit-profile-buttons">
<a class="btn btn-primary" href="{% url 'users:update_user' %}">My Info</a>
<a class="btn btn-primary" href="{% url 'account_email' %}">E-Mail</a>
<a class="btn btn-primary" href="{% url 'users:update_user' %}">Settings</a>
<a class="btn btn-primary" href="{% url 'account_email' %}">Email</a>
<a class="btn btn-primary" href="{% url 'avatar_change' %}">Avatar</a>
<a class="btn btn-info" data-toggle="modal" data-target="#APIModal" href="#">API Key</a>
</div>
@ -22,7 +22,7 @@
</div>
<div class="row">
<div class="col-sm-12">
<div class="col-md-12">
<h3>Ground Stations</h3>
</div>
</div>
@ -96,7 +96,7 @@
{% endif %}
<div class="row">
<div class="col-sm-12">
<div class="col-md-12">
<h3>Observations</h3>
</div>
</div>

View File

@ -1,22 +1,23 @@
{% extends "base.html" %}
{% load crispy_forms_tags %}
{% load avatar_tags %}
{% block title %} - User: {{ user.username }}{% endblock %}
{% block title %} - Settings{% endblock %}
{% block content %}
<h2>{% block header %}User: {{ user.username }}{% endblock %}</h2>
<div class="row">
<div class="col-lg-12">
<h1>{% block header %}User: {{ user.username }}{% endblock %}</h1>
<form class="form-horizontal"
method="post"
<div class="col-md-5">
<form method="post"
action="{% url 'users:update_user' %}">{% csrf_token %}
{{ form|crispy }}
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-default">Update</button>
</div>
{{ form|crispy }}
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-sm btn-primary">Update</button>
</div>
</form>
</div>
</form>
</div>
</div>
{% endblock %}

View File

@ -1,26 +0,0 @@
{% extends "base.html" %}
{% load static %}
{% load avatar_tags %}
{% block title %} - Members{% endblock %}
{% block content %}
<div class="row">
<div class="col-xs-12">
<h2>Users</h2>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="list-group">
{% for user in user_list %}
<a href="{% url 'users:view_user' username=user.username %}" class="list-group-item">
<h4 class="list-group-item-heading">{% avatar user 35 %} {{ user.username }}</h4>
<p class="list-group-item-text">{{ maker.tagline }}</p>
</a>
{% endfor %}
</div>
</div>
</div>
{% endblock content %}

View File

@ -5,7 +5,6 @@ from network.users import views
urlpatterns = patterns(
'network.users.views',
url(r'^$', view=views.UserListView.as_view(), name='list_user'),
url(r'^redirect/$', view=views.UserRedirectView.as_view(), name='redirect_user'),
url(r'^update/$', view=views.UserUpdateView.as_view(), name='update_user'),
url(r'^(?P<username>[\w.@+-]+)/$', 'view_user', name='view_user'),

View File

@ -15,12 +15,6 @@ from network.base.forms import StationForm
from network.base.models import Station, Observation, Antenna
class UserDetailView(LoginRequiredMixin, DetailView):
model = User
slug_field = "username"
slug_url_kwarg = "username"
class UserRedirectView(LoginRequiredMixin, RedirectView):
permanent = False
@ -43,12 +37,6 @@ class UserUpdateView(LoginRequiredMixin, UpdateView):
return User.objects.get(username=self.request.user.username)
class UserListView(LoginRequiredMixin, ListView):
model = User
slug_field = "username"
slug_url_kwarg = "username"
def view_user(request, username):
"""View for user page."""
user = User.objects.get(username=username)

View File

@ -17,7 +17,7 @@ Pillow==2.8.1
# Users
django-allauth==0.20.0
-e git+https://github.com/comzeradd/django-avatar.git@gravatar_https#egg=avatar
django-avatar==2.1.1
django-crispy-forms==1.4.0
# Astronomy