Show conversations members numbers in conversations list

This commit is contained in:
Pierre 2017-06-13 16:50:06 +02:00
parent 3d1dd2cbed
commit cc296c2bac
2 changed files with 22 additions and 0 deletions

View File

@ -9,3 +9,11 @@
color: #777;
font-size: 10px;
}
.conversations-list-box .conversations-members-numbers .fa.fa-users {
margin-right: 2px;
}
.conversations-list-box .conversations-members-numbers {
margin-bottom: 0px;
}

View File

@ -301,6 +301,20 @@ ComunicWeb.components.conversations.list = {
});
}
//Add members number
//Create paragraph
var membersNumberParagraphElem = createElem("p", linkElem);
membersNumberParagraphElem.className = "conversations-members-numbers";
var membersNumberSmallElem = createElem("small", membersNumberParagraphElem);
//Add icon
var membersNumberIconElem = createElem("i", membersNumberSmallElem);
membersNumberIconElem.className = "fa fa-users";
//Specify value
var membersNumberValueElem = createElem("span", membersNumberSmallElem);
membersNumberValueElem.innerHTML = (conversationInfos.members.length === 1 ? "1 member" : conversationInfos.members.length + " members");
//Success
return true;
}