mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-24 09:58:51 +00:00
Display "member since" on the left
This commit is contained in:
parent
1c20807108
commit
322528a974
@ -83,4 +83,15 @@ ComunicWeb.common.date = {
|
||||
return years + " years";
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Get the difference of time from now to a specified
|
||||
* timestamp and return it as a string
|
||||
*
|
||||
* @param {Integer} time The base time
|
||||
* @return {String} Computed difference
|
||||
*/
|
||||
timeDiffToStr: function(time){
|
||||
return this.diffToStr(this.time() - time);
|
||||
},
|
||||
}
|
@ -83,7 +83,25 @@ ComunicWeb.pages.userPage.profileInfos = {
|
||||
type: "a",
|
||||
class: "pull-right",
|
||||
innerHTML: infos.number_friends
|
||||
})
|
||||
});
|
||||
|
||||
//Add user account creation time
|
||||
var accountCreationLi = createElem2({
|
||||
appendTo: listInfos,
|
||||
type: "li",
|
||||
class: "list-group-item"
|
||||
});
|
||||
createElem2({
|
||||
appendTo: accountCreationLi,
|
||||
type: "b",
|
||||
innerHTML: "Member since"
|
||||
});
|
||||
createElem2({
|
||||
appendTo: accountCreationLi,
|
||||
type: "a",
|
||||
class: "pull-right",
|
||||
innerHTML: ComunicWeb.common.date.timeDiffToStr(infos.account_creation_time),
|
||||
});
|
||||
|
||||
//Add user status informations (if required)
|
||||
if(signed_in()){
|
||||
|
Loading…
Reference in New Issue
Block a user