]> asedeno.scripts.mit.edu Git - bluechips.git/commitdiff
Add a new /user action with pointers to the others.
authorEvan Broder <broder@mit.edu>
Thu, 25 Feb 2010 04:13:50 +0000 (23:13 -0500)
committerEvan Broder <broder@mit.edu>
Thu, 25 Feb 2010 04:22:09 +0000 (23:22 -0500)
bluechips/controllers/user.py
bluechips/templates/user/index.mako [new file with mode: 0644]

index c59733355c131c4f56e3df911fa204e5141c4182..8fff3c8efa3ec92b5faa6015a80475966200a1c0 100644 (file)
@@ -50,6 +50,10 @@ class NewUserSchema(Schema):
 
 
 class UserController(BaseController):
+    def index(self):
+        c.title = 'User Settings'
+        return render('/user/index.mako')
+
     def email(self):
         c.title = 'User Settings'
         return render('/user/email.mako')
diff --git a/bluechips/templates/user/index.mako b/bluechips/templates/user/index.mako
new file mode 100644 (file)
index 0000000..272699d
--- /dev/null
@@ -0,0 +1,10 @@
+<%inherit file="/base.mako"/>
+
+<h2>User Settings</h2>
+
+<ul>
+  <li><a href="${h.url_for(controller='user', action='email')}">Set e-mail address</a></li>
+% if request.environ['user'].resident:
+  <li><a href="${h.url_for(controller='user', action='new')}">Register a new user</a></li>
+% endif
+</ul>