Improve tabs appearance

This commit is contained in:
2021-03-15 18:30:18 +01:00
parent 9d1ebf5899
commit 1067b577fd
6 changed files with 49 additions and 11 deletions

View File

@ -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(

View File

@ -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