You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

119 lines
3.0 KiB
Smarty

12 years ago
<div class="well">
12 years ago
12 years ago
<div class="account-username-box">
<span class="account-username">
<a href="/users/{username}">{username}</a>
</span>
<div class="account-sub-links inline-block pull-right">
<span id="friendsLink" class="pull-right"><a href="/users/{username}/friends">friends</a></span>
<span id="editLink" class="pull-right"><a href="/users/{username}/edit">edit</a></span>
</div>
</div>
<div class="row-fluid">
<div class="span3" style="text-align: center; margin-bottom:20px;">
<div class="account-picture-block">
<img src="{picture}" class="user-profile-picture"/>
</div>
</div>
<div class="span9">
<div class="inline-block">
<div class="account-bio-block">
<span class="account-bio-label">email</span>
<span>{email}</span>
<br/>
<span class="account-bio-label">full name</span>
<span>{fullname}</span>
<br/>
<span class="account-bio-label">website</span>
<span><a href="{website}">{website}</a></span>
<br/>
<span class="account-bio-label">location</span>
<span>{location}</span>
<br/>
<span class="account-bio-label">age</span>
<span>{age}</span>
<br/>
<hr/>
<span class="account-bio-label">member for</span>
<span>{joindate}</span>
<br/>
12 years ago
<span class="account-bio-label">reputation</span>
<span id='reputation'>{reputation}</span>
<br/>
<span class="account-bio-label">posts</span>
<span id='postcount'>{postcount}</span>
12 years ago
<br/>
<hr/>
12 years ago
<span class="account-bio-label">signature</span>
<div class="post-signature">
<span id='signature'>{signature}</span>
</div>
</div>
</div>
</div>
</div>
<div id="user-actions" class="container">
<a id="add-friend-btn" href="#" class="btn">Follow</a>
</div>
12 years ago
<br/>
<div id="user-action-alert" class="alert alert-success hide"></div>
</div>
<script type="text/javascript">
12 years ago
var yourid = '{yourid}';
var theirid = '{theirid}';
(function() {
var isFriend = {isFriend};
$(document).ready(function() {
var rep = $('#reputation');
rep.html(app.addCommas(rep.html()));
var postcount = $('#postcount');
postcount.html(app.addCommas(postcount.html()));
12 years ago
var editLink = $('#editLink');
var addFriendBtn = $('#add-friend-btn');
if( yourid !== theirid) {
editLink.hide();
if(isFriend)
addFriendBtn.hide();
else
addFriendBtn.show();
}
else {
12 years ago
addFriendBtn.hide();
}
12 years ago
addFriendBtn.on('click', function() {
$.post('/users/addfriend', {uid: theirid},
function(data) {
addFriendBtn.remove();
12 years ago
$('#user-action-alert').html('Friend Added!').show();
}
);
return false;
});
});
}());
</script>