mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-10-30 17:54:59 +00:00 
			
		
		
		
	Display "member since" on the left
This commit is contained in:
		| @@ -83,4 +83,15 @@ ComunicWeb.common.date = { | |||||||
| 			return years + " years"; | 			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", | 			type: "a", | ||||||
| 			class: "pull-right", | 			class: "pull-right", | ||||||
| 			innerHTML: infos.number_friends | 			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) | 		//Add user status informations (if required) | ||||||
| 		if(signed_in()){ | 		if(signed_in()){ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Pierre
					Pierre