account settings

v1.18.x
Baris Usakli 12 years ago
parent 5df7af6075
commit 6af3b0ffc6

@ -0,0 +1,6 @@
$(document).ready(function() {
});

@ -8,8 +8,9 @@
<a href="/users/{userslug}">{username}</a>
</span>
<div class="account-sub-links inline-block pull-right">
<span id="followersLink" class="pull-right"><a href="/users/{userslug}/followers">followers</a></span>
<span id="followingLink" class="pull-right"><a href="/users/{userslug}/following">following</a></span>
<span id="settingsLink" class="pull-right"><a href="/users/{userslug}/settings">settings</a></span>
<span class="pull-right"><a href="/users/{userslug}/followers">followers</a></span>
<span class="pull-right"><a href="/users/{userslug}/following">following</a></span>
<span id="editLink" class="pull-right"><a href="/users/{userslug}/edit">edit</a></span>
</div>
</div>

@ -66,8 +66,9 @@
<a href="/users/{userslug}/edit">edit</a>
</span>
<div class="account-sub-links inline-block pull-right">
<span id="followersLink" class="pull-right"><a href="/users/{userslug}/followers">followers</a></span>
<span id="followingLink" class="pull-right"><a href="/users/{userslug}/following">following</a></span>
<span id="settingsLink" class="pull-right"><a href="/users/{userslug}/settings">settings</a></span>
<span class="pull-right"><a href="/users/{userslug}/followers">followers</a></span>
<span class="pull-right"><a href="/users/{userslug}/following">following</a></span>
<span id="editLink" class="pull-right"><a href="/users/{userslug}/edit">edit</a></span>
</div>
</div>

@ -0,0 +1,32 @@
<div class="well">
<div class="account-username-box">
<span class="account-username">
<a href="/users/{userslug}">{username}</a> <i class="icon-chevron-right"></i>
<a href="/users/{userslug}/settings">settings</a>
</span>
<div class="account-sub-links inline-block pull-right">
<span id="settingsLink" class="pull-right"><a href="/users/{userslug}/settings">settings</a></span>
<span class="pull-right"><a href="/users/{userslug}/followers">followers</a></span>
<span class="pull-right"><a href="/users/{userslug}/following">following</a></span>
<span id="editLink" class="pull-right"><a href="/users/{userslug}/edit">edit</a></span>
</div>
</div>
<div class="row-fluid">
<div class="span6">
<h4>privacy</h4>
<label class="checkbox">
<input type="checkbox"> Show my email
</label>
</div>
<div class="span6">
span10
</div>
</div>
</div>
<script type="text/javascript" src="{relative_path}/src/forum/accountsettings.js"></script>

@ -23,6 +23,7 @@
"users[^]*edit": "accountedit",
"users[^]*following": "following",
"users[^]*followers": "followers",
"users[^]*settings": "accountsettings",
"users/[^]*": "account",
"recent": "recent",

@ -7,8 +7,9 @@
<a href="/users/{userslug}/followers">followers</a>
</span>
<div class="account-sub-links inline-block pull-right">
<span id="followersLink" class="pull-right"><a href="/users/{userslug}/followers">followers</a></span>
<span id="followingLink" class="pull-right"><a href="/users/{userslug}/following">following</a></span>
<span id="settingsLink" class="pull-right"><a href="/users/{userslug}/settings">settings</a></span>
<span class="pull-right"><a href="/users/{userslug}/followers">followers</a></span>
<span class="pull-right"><a href="/users/{userslug}/following">following</a></span>
<span id="editLink" class="pull-right"><a href="/users/{userslug}/edit">edit</a></span>
</div>
</div>

@ -9,8 +9,9 @@
<a href="/users/{userslug}/following">following</a>
</span>
<div class="account-sub-links inline-block pull-right">
<span id="followersLink" class="pull-right"><a href="/users/{userslug}/followers">followers</a></span>
<span id="followingLink" class="pull-right"><a href="/users/{userslug}/following">following</a></span>
<span id="settingsLink" class="pull-right"><a href="/users/{userslug}/settings">settings</a></span>
<span class="pull-right"><a href="/users/{userslug}/followers">followers</a></span>
<span class="pull-right"><a href="/users/{userslug}/following">following</a></span>
<span id="editLink" class="pull-right"><a href="/users/{userslug}/edit">edit</a></span>
</div>
</div>

@ -76,6 +76,20 @@ var user = require('./../user.js'),
});
});
app.get('/users/:userslug/settings', function(req, res) {
if(!req.user)
return res.redirect('/403');
user.getUserField(req.user.uid, 'userslug', function(userslug) {
if(req.params.userslug && userslug === req.params.userslug) {
res.send(app.build_header(res) + app.create_route('users/'+req.params.userslug+'/settings','accountsettings') + templates['footer']);
} else {
return res.redirect('/404');
}
});
});
app.post('/users/uploadpicture', function(req, res) {
if(!req.user)
return res.redirect('/403');

Loading…
Cancel
Save