mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 12:09:21 +00:00
Show the list of members of the group, if it is public
This commit is contained in:
parent
0965b0936b
commit
07fc609694
@ -45,7 +45,13 @@ const GroupAboutPage = {
|
|||||||
title: tr("Visibility"),
|
title: tr("Visibility"),
|
||||||
icon: "fa-eye",
|
icon: "fa-eye",
|
||||||
value: group.visibility == "secrete" ? tr("Secrete group") : (group.visibility == "open" ? tr("Open group") : tr("Private group"))
|
value: group.visibility == "secrete" ? tr("Secrete group") : (group.visibility == "open" ? tr("Open group") : tr("Private group"))
|
||||||
}
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: tr("Members list"),
|
||||||
|
icon: "fa-eye",
|
||||||
|
value: group.is_members_list_public ? tr("Public") : tr("Private")
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
if (group.description && group.description != null && group.description != "" && group.description != "null")
|
if (group.description && group.description != null && group.description != "" && group.description != "null")
|
||||||
|
@ -49,6 +49,7 @@ const GroupMembersPage = {
|
|||||||
* Load the page components
|
* Load the page components
|
||||||
*/
|
*/
|
||||||
var loadComponents = () => {
|
var loadComponents = () => {
|
||||||
|
if (info.membership != "member")
|
||||||
GroupMembersPage.addInviteForm(info, inviteFormTarget, inviteFormCallback);
|
GroupMembersPage.addInviteForm(info, inviteFormTarget, inviteFormCallback);
|
||||||
GroupMembersPage.refreshMembersList(info.id, info, membersList);
|
GroupMembersPage.refreshMembersList(info.id, info, membersList);
|
||||||
}
|
}
|
||||||
@ -215,7 +216,7 @@ const GroupMembersPage = {
|
|||||||
/**
|
/**
|
||||||
* Display a single membership information
|
* Display a single membership information
|
||||||
*
|
*
|
||||||
* @param {Object} info Information about the group
|
* @param {AdvancedGroupInfo} info Information about the group
|
||||||
* @param {Object} member Information about the membership
|
* @param {Object} member Information about the membership
|
||||||
* @param {Object} users The list of users of the group
|
* @param {Object} users The list of users of the group
|
||||||
* @param {HTMLElement} target The target for the list
|
* @param {HTMLElement} target The target for the list
|
||||||
@ -260,7 +261,7 @@ const GroupMembersPage = {
|
|||||||
class: "delete-link",
|
class: "delete-link",
|
||||||
innerHTML: "<i class='fa fa-trash'></i>"
|
innerHTML: "<i class='fa fa-trash'></i>"
|
||||||
});
|
});
|
||||||
if(userID() != userInfo.userID){
|
if(userID() != userInfo.userID && info.membership != "member"){
|
||||||
|
|
||||||
deleteUserButton.addEventListener("click", function(e){
|
deleteUserButton.addEventListener("click", function(e){
|
||||||
|
|
||||||
@ -314,6 +315,11 @@ const GroupMembersPage = {
|
|||||||
});
|
});
|
||||||
add_space(memberContainer);
|
add_space(memberContainer);
|
||||||
|
|
||||||
|
if (info.membership == "member") {
|
||||||
|
membershipLevelButton.disabled = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//Check if the user is pending
|
//Check if the user is pending
|
||||||
if(member.level == "pending"){
|
if(member.level == "pending"){
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ const GroupTabs = {
|
|||||||
data: () => {
|
data: () => {
|
||||||
return {
|
return {
|
||||||
isAdmin: group.membership == "administrator",
|
isAdmin: group.membership == "administrator",
|
||||||
canSeeMembers: group.membership == "administrator" || group.membership == "moderator",
|
canSeeMembers: group.is_members_list_public || group.membership == "administrator" || group.membership == "moderator",
|
||||||
activePage: activePage
|
activePage: activePage
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user