Permalink
Browse files

Added placeholder links for stats and login/logout.

Committing now to hand over to Matt.
  • Loading branch information...
1 parent ee569b0 commit 7de5caeebf416bd8f9c89f4562b7fdf1aae4b6c6 @malcolmt committed Aug 15, 2010
Showing with 17 additions and 3 deletions.
  1. +2 −0 minerva/urls.py
  2. +5 −0 remember_me_urls.py
  3. +1 −1 static/css/style.layout.css
  4. +9 −2 templates/base.html
View
2 minerva/urls.py
@@ -8,5 +8,7 @@
url(r'^$', views.question, name="question-page"),
url("test/$", direct_to_template,
{"template": "minerva/test_display.html"}, name="test-page"),
+ url("stats/$", direct_to_template,
+ {"template": "fixme_placeholder.html"}, name="stats"),
)
View
5 remember_me_urls.py
@@ -4,6 +4,7 @@
from django.conf.urls.defaults import * # pylint: disable-msg=W0401,W0614
from django.contrib import admin
from django.views.static import serve
+from django.views.generic.simple import direct_to_template
import minerva.urls
@@ -14,6 +15,10 @@
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/', include(admin.site.urls)),
(r'', include(minerva.urls)),
+ url("login/$", direct_to_template,
+ {"template": "fixme_placeholder.html"}, name="login"),
+ url("logout/$", direct_to_template,
+ {"template": "fixme_placeholder.html"}, name="logout"),
)
if settings.DEV_MODE:
View
2 static/css/style.layout.css
@@ -45,7 +45,7 @@ input {
text-align: center;
}
-.login {
+.tools {
float: right;
padding-right: 1em;
}
View
11 templates/base.html
@@ -1,3 +1,4 @@
+{# {% load auth_tags %} #}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@@ -10,8 +11,14 @@
<div id="header">
{% block header %}
<h1>Minerva: Foreign language vocabulary training</h1>
- <div class="login">
- <p><a href="#">Login</a></p>
+ <div class="tools">
+ {% if user.is_authenticated %}
+ <p>Hello {{ user }} | <a href="{% url stats %}">Statistics</a> |
+ <a href="{% url logout %}">Logout</a></p>
+ {% else %}
+ <p id="login">Login</p>
+ {# <div id="login-form">{% login_form %}</div> #}
+ {% endif %}
</div>&nbsp;
{% endblock %}
</div>

0 comments on commit 7de5cae

Please sign in to comment.