Skip to content

Commit

Permalink
better user profile
Browse files Browse the repository at this point in the history
  • Loading branch information
lmatteis committed May 23, 2012
1 parent 04ff7be commit 51693dc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app.js
Expand Up @@ -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);
Expand Down
15 changes: 14 additions & 1 deletion templates/user.html
Expand Up @@ -23,25 +23,35 @@
<tr>
<td valign="top">about:</td>
<td>
<textarea cols="60" rows="7" wrap="virtual" name="about"></textarea>
{{#myprofile}}
<textarea cols="60" rows="7" wrap="virtual" name="about">{{about}}</textarea>
<font
size="-2">
<a href="formatdoc"><font color="#afafaf">help</font></a>
</font>
{{/myprofile}}
{{^myprofile}}
{{about}}
{{/myprofile}}
</td>
</tr>
{{#myprofile}}
<tr>
<td valign="top">email:</td>
<td>
<input type="text" name="email" value="" size="60">
</td>
</tr>
{{/myprofile}}
<!--
<tr>
<td></td>
<td>
<a href="/changepw"><u>change password</u></a>
</td>
</tr>
-->
<!--
<tr>
<td></td>
<td>
Expand All @@ -54,10 +64,13 @@
<a href="/submitted?id={{name}}"><u>submissions</u></a>
</td>
</tr>
-->
</tbody>
</table>
{{#myprofile}}
<br>
<input type="submit" value="update">
{{/myprofile}}
</form>
<br>
<br>
Expand Down

0 comments on commit 51693dc

Please sign in to comment.