58 lines
1.7 KiB
HTML
58 lines
1.7 KiB
HTML
<div id="profile">
|
|
<div class="h1_wrap">
|
|
<h1 class="round"><span>Profil</span></h1>
|
|
</div>
|
|
<div id="avatar" class="clickable round"></div>
|
|
<div class="user round">
|
|
<p>Nom : <span id="profile_name"></span></p>
|
|
<p>Société : <span id="profile_company"></span></p>
|
|
<p>Mission actuelle : <span id="profile_assignment"></span></p>
|
|
</div>
|
|
<p class="user_history_title">Historique</p>
|
|
<div id="user_history" class="round hide"></div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
databap.pageInit = function()
|
|
{
|
|
//TODO : to be replaced by tinyscrollbar
|
|
databap.$main.css('overflow', 'auto');
|
|
|
|
databap.getInfo
|
|
(
|
|
'profile',
|
|
function(profile)
|
|
{
|
|
//user info
|
|
databap.getMainElem('#profile_name').text(profile.name);
|
|
databap.getMainElem('#profile_company').text(profile.company);
|
|
databap.getMainElem('#profile_assignment').text(profile.status);
|
|
|
|
//Profile link
|
|
databap.getMainElem('#avatar').click(function(){alert(databap.getExternalLink('p', profile.nickname));});
|
|
|
|
//user history
|
|
$UserHistory = databap.getMainElem('#user_history');
|
|
if(typeof profile.history != 'undefined')
|
|
{
|
|
$.each
|
|
(
|
|
profile.history,
|
|
function(id_code, code_info)
|
|
{
|
|
var url = databap.getCodeLink(code_info.phrase);
|
|
var code = $('<p class="history_line">'+code_info.date+' - '+code_info.action+' : <a href="'+url+'" title="'+code_info.phrase+'" target="_blank">'+code_info.description+'</a></p>');
|
|
$UserHistory.append(code);
|
|
}
|
|
);
|
|
$UserHistory.show('fast', function(){databap.setInitEnd(true);});
|
|
}
|
|
else
|
|
{
|
|
databap.setInitEnd(true);
|
|
}
|
|
},
|
|
{user:databap.vars.profile_user},
|
|
'json'
|
|
);
|
|
};
|
|
</script> |