From 51693dcc05eca139965cd594b1dd7cb03279e698 Mon Sep 17 00:00:00 2001 From: Luca Matteis Date: Wed, 23 May 2012 10:02:45 +0200 Subject: [PATCH] better user profile --- app.js | 3 ++- templates/user.html | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index a3057cd..e8a5128 100644 --- a/app.js +++ b/app.js @@ -210,7 +210,8 @@ ddoc.lists.user = function(head, req) { title: user.name + ' | ', username: username, login: !(username), - user: user + user: user, + myprofile: user.name === username }; var html = Mustache.to_html(this.templates.user, data, this.templates.partials); diff --git a/templates/user.html b/templates/user.html index eba71f4..749b3c7 100644 --- a/templates/user.html +++ b/templates/user.html @@ -23,25 +23,35 @@ about: - + {{#myprofile}} + help + {{/myprofile}} + {{^myprofile}} + {{about}} + {{/myprofile}} + {{#myprofile}} email: + {{/myprofile}} + + + {{#myprofile}}
+ {{/myprofile}}