mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-19 12:25:16 +00:00
Improve tabs appearance
This commit is contained in:
@ -90,6 +90,16 @@ const GroupsPage = {
|
||||
// Display the tabs of the group
|
||||
await GroupTabs.show(group, target, page);
|
||||
|
||||
switch(page) {
|
||||
|
||||
case "posts":
|
||||
GroupPostsPage.display(group, target)
|
||||
return;
|
||||
|
||||
default:
|
||||
ComunicWeb.common.error.pageNotFound(null, target);
|
||||
}
|
||||
|
||||
} catch(e) {
|
||||
console.error(e);
|
||||
target.appendChild(createCallout(
|
||||
|
@ -9,11 +9,10 @@ const GroupPostsPage = {
|
||||
/**
|
||||
* Display information about a group
|
||||
*
|
||||
* @param {Number} id The ID of the group to display
|
||||
* @param {Object} info Information about the group to display
|
||||
* @param {AdvancedGroupInfo} info Information about the group to display
|
||||
* @param {HTMLElement} target The target for the page
|
||||
*/
|
||||
display: function(id, info, target){
|
||||
display: function(info, target){
|
||||
|
||||
//Check if the user can create posts or not
|
||||
if(ComunicWeb.components.groups.utils.canCreatePosts(info)){
|
||||
@ -33,7 +32,7 @@ const GroupPostsPage = {
|
||||
});
|
||||
|
||||
//Display form
|
||||
ComunicWeb.components.posts.form.display("group", id, postFormCol);
|
||||
ComunicWeb.components.posts.form.display("group", info.id, postFormCol);
|
||||
}
|
||||
|
||||
//Display group posts
|
||||
|
Reference in New Issue
Block a user