Commit b6e1ad84 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

Merge branch 'settings' into 'master'

Settings

issue #36

See merge request !11
parents 1e9e3f2f a0879342
......@@ -16,11 +16,73 @@
</div>
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="col-md-12 text-center">
<h2><strong>Welcome, {{ request.user.first_name }}!</strong></h2>
</div>
</div>
<br />
{% load socialaccount %} {% providers_media_js %}
<div class="row">
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<h1 class="panel-title text-center"><strong>Social Media Settings</strong></h1>
</div>
<div class="panel-body">
<p class="text-center">Verify your social media accounts to link them to other students.</p>
<div class="row text-center">
<div class="col-md-6">
{% if accounts.facebook %}
<p><i class="fa fa-check-square-o"></i> Verified!</p>
{% endif %}
<a href="{% provider_login_url 'facebook' method='js_sdk' process='connect' next='#' %}">
<h4><i class="fa fa-facebook fa-2x"></i></h4>
<h4>Facebook</h4>
</a>
</div>
<div class="col-md-6">
{% if accounts.google %}
<p><i class="fa fa-check-square-o"></i> Verified!</p>
{% endif %}
<a href="{% provider_login_url 'google' method='js_sdk' process='connect' next='#' %}">
<h4><i class="fa fa-google fa-2x"></i></h4>
<h4>Google</h4>
</a>
</div>
</div>
<br />
<div class="row text-center">
<div class="col-md-6">
{% if accounts.twitter %}
<p><i class="fa fa-check-square-o"></i> Verified!</p>
{% endif %}
<a href="{% provider_login_url 'twitter' method='js_sdk' process='connect' next='#' %}">
<h4><i class="fa fa-twitter fa-2x"></i></h4>
<h4>Twitter</h4>
</a>
</div>
<div class="col-md-6">
{% if accounts.instagram %}
<p><i class="fa fa-check-square-o"></i> Verified!</p>
{% endif %}
<a href="{% provider_login_url 'instagram' method='js_sdk' process='connect' next='#' %}">
<h4><i class="fa fa-instagram fa-2x"></i></h4>
<h4>Instagram</h4>
</a>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-8">
<div class="panel panel-default">
<div class="panel-heading">
<h1 class="panel-title text-center"><strong>Welcome, {{ request.user.first_name }}!</strong></h1>
<h1 class="panel-title text-center"><strong>Student Settings</strong></h1>
</div>
<div class="panel-body">
......
......@@ -42,7 +42,7 @@
<div class="row text-center">
{% comment %} is it not possible to redirect the login failure? {% endcomment %}
<div class="col-md-3">
{% if verified %}
{% if accounts.facebook %}
<p><i class="fa fa-check-square-o"></i> Verified!</p>
{% endif %}
<a href="{% provider_login_url 'facebook' method='js_sdk' process='connect' next='#' %}">
......@@ -50,7 +50,7 @@
</a>
</div>
<div class="col-md-3">
{% if verified %}
{% if accounts.google %}
<p><i class="fa fa-check-square-o"></i> Verified!</p>
{% endif %}
<a href="{% provider_login_url 'google' method='js_sdk' process='connect' next='#' %}">
......@@ -58,7 +58,7 @@
</a>
</div>
<div class="col-md-3">
{% if verified %}
{% if accounts.twitter %}
<p><i class="fa fa-check-square-o"></i> Verified!</p>
{% endif %}
<a href="{% provider_login_url 'twitter' method='js_sdk' process='connect' next='#' %}">
......@@ -66,7 +66,7 @@
</a>
</div>
<div class="col-md-3">
{% if verified %}
{% if accounts.instagram %}
<p><i class="fa fa-check-square-o"></i> Verified!</p>
{% endif %}
<a href="{% provider_login_url 'instagram' method='js_sdk' process='connect' next='#' %}">
......
......@@ -27,8 +27,8 @@ urlpatterns = patterns('',
cache_page(60 * 2)(DetailStudent.as_view()),
name='detail_student'),
url(r'^student/(?P<slug>[\w-]+)/welcome/$',
cache_page(60 * 15)(UpdateStudent.as_view()),
url(r'^student/(?P<slug>[\w-]+)/settings/$',
cache_page(4)(UpdateStudent.as_view()),
name='updateStudent'),
url(r'^settings/$',
......
......@@ -26,7 +26,7 @@
<li><a href="/accounts/student/{{ user.username }}">{{ user.username }}</a>
</li>
<li>
<a href="/accounts/settings/"><i class="fa fa-cog fa-fw fa-lg"></i></a>
<a href="{% url 'updateStudent' request.user.username %}"><i class="fa fa-cog fa-fw fa-lg"></i></a>
</li>
<li><a href="{% url 'logout' %}">Logout</a>
</li>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment