From 1c208071082bfa189378e99a2e5143d6bb07e995 Mon Sep 17 00:00:00 2001 From: Pierre Date: Sat, 23 Dec 2017 18:19:06 +0100 Subject: [PATCH] Display the number of friends --- assets/js/pages/userPage/profileInfos.js | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/assets/js/pages/userPage/profileInfos.js b/assets/js/pages/userPage/profileInfos.js index e371977b..7c2a9ed5 100644 --- a/assets/js/pages/userPage/profileInfos.js +++ b/assets/js/pages/userPage/profileInfos.js @@ -60,6 +60,31 @@ ComunicWeb.pages.userPage.profileInfos = { innerHTML: infos.firstName + " " + infos.lastName }); + //Add list of informations about user + var listInfos = createElem2({ + appendTo: boxBody, + type: "url", + class: "list-group list-group-unbordered" + }); + + //Add number of friends + var friendsLi = createElem2({ + appendTo: listInfos, + type: "li", + class: "list-group-item" + }); + createElem2({ + appendTo: friendsLi, + type: "b", + innerHTML: "Friends" + }); + createElem2({ + appendTo: friendsLi, + type: "a", + class: "pull-right", + innerHTML: infos.number_friends + }) + //Add user status informations (if required) if(signed_in()){ if(userID() != infos.userID){