Permalink
Browse files

Skeleton for user profile

  • Loading branch information...
1 parent 02e4d32 commit 2f724123bfdcca88120ae356840bf81c7fe7d831 @tiwilliam tiwilliam committed Jun 12, 2012
View
@@ -12,10 +12,6 @@
app.register_blueprint(api.user.page, url_prefix="/api/user")
app.register_blueprint(api.project.page, url_prefix="/api/project")
-@app.route("/signup")
-def signup():
- return render_template('signup.html')
-
@app.route("/logout")
def logout():
if 'user_id' in session:
View
@@ -7,6 +7,8 @@ define([
'app/view/project/create',
'app/view/project/show',
+ 'app/view/user/profile',
+
'app/util'
], function(
BaseMarkup,
@@ -17,6 +19,8 @@ define([
CreateProjectView,
ShowProjectView,
+ UserProfileView,
+
Utility
) {
// Application context
@@ -86,6 +90,7 @@ define([
'': 'indexHandler',
'discover': 'discoverHandler',
+ 'user/profile': 'userProfileHandler',
'project/create': 'createProjectHandler',
'project/:id': 'showProjectHandler'
@@ -113,6 +118,14 @@ define([
showProjectHandler: function(pid) {
changeContentView(new ShowProjectView());
+ },
+
+ /********************************************************************
+ * USER RELATED VIEWS
+ *******************************************************************/
+
+ userProfileHandler: function() {
+ changeContentView(new UserProfileView());
}
});
@@ -0,0 +1,10 @@
+define(function() {
+ var UserProfileView = Backbone.View.extend({
+ render: function() {
+ var content = this.make('h1', {}, 'Hello user profile view');
+ this.$el.append(content);
+ return this;
+ }
+ });
+ return UserProfileView;
+});
@@ -6,7 +6,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
- <a class="brand" href="#">
+ <a class="brand" href="/">
<img src="/static/img/logo.png" alt="Teamstarter" />
</a>
</div>
@@ -5,7 +5,7 @@
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
- <li><a href="#">Profile</a></li>
+ <li><a href="/user/profile">Profile</a></li>
<li class="divider"></li>
<li><a id="logout-link" href="#">Log Out</a></li>
</ul>

0 comments on commit 2f72412

Please sign in to comment.