mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 05:49:22 +00:00
Ready to implement about page
This commit is contained in:
parent
c4aced5ed2
commit
abed0b7513
5
assets/css/pages/groups/pages/about.css
Normal file
5
assets/css/pages/groups/pages/about.css
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
/**
|
||||||
|
* About group page
|
||||||
|
*
|
||||||
|
* @author Pierre Hubert
|
||||||
|
*/
|
@ -97,7 +97,11 @@ const GroupsPage = {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case "members":
|
case "members":
|
||||||
GroupMembersSection.display(group, target)
|
GroupMembersPage.display(group, target)
|
||||||
|
return;
|
||||||
|
|
||||||
|
case "about":
|
||||||
|
await GroupAboutPage.display(group, target);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case "settings":
|
case "settings":
|
||||||
@ -116,22 +120,6 @@ const GroupsPage = {
|
|||||||
"danger"
|
"danger"
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*//Check which page to open
|
|
||||||
if(page == "group")
|
|
||||||
ComunicWeb.pages.groups.pages.group.open(groupID, target);
|
|
||||||
|
|
||||||
else if(page == "settings")
|
|
||||||
ComunicWeb.pages.groups.pages.settings.open(groupID, target);
|
|
||||||
|
|
||||||
else if(page == "members")
|
|
||||||
ComunicWeb.pages.groups.pages.members.open(groupID, target);
|
|
||||||
|
|
||||||
|
|
||||||
//Unrecognized page
|
|
||||||
else
|
|
||||||
ComunicWeb.common.error.pageNotFound(args, target);*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
32
assets/js/pages/groups/pages/about.js
Normal file
32
assets/js/pages/groups/pages/about.js
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/**
|
||||||
|
* Groups about page
|
||||||
|
*
|
||||||
|
* @author Pierre Huber
|
||||||
|
*/
|
||||||
|
|
||||||
|
const GroupAboutPage = {
|
||||||
|
/**
|
||||||
|
* @param {AdvancedGroupInfo} group
|
||||||
|
* @param {HTMLElement} target
|
||||||
|
*/
|
||||||
|
display: async function(group, target) {
|
||||||
|
// Load template
|
||||||
|
const tpl = await Page.loadHTMLTemplate("pages/groups/pages/about.html");
|
||||||
|
const el = document.createElement("div")
|
||||||
|
el.innerHTML = tpl;
|
||||||
|
target.appendChild(el);
|
||||||
|
|
||||||
|
Vue.createApp({
|
||||||
|
|
||||||
|
data: () => {
|
||||||
|
return {
|
||||||
|
group: group
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
}
|
||||||
|
|
||||||
|
}).mount(el);
|
||||||
|
}
|
||||||
|
};
|
@ -4,7 +4,7 @@
|
|||||||
* @author Pierre HubERT
|
* @author Pierre HubERT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const GroupMembersSection = {
|
const GroupMembersPage = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply group information
|
* Apply group information
|
||||||
@ -43,8 +43,8 @@ const GroupMembersSection = {
|
|||||||
* Load the page components
|
* Load the page components
|
||||||
*/
|
*/
|
||||||
var loadComponents = () => {
|
var loadComponents = () => {
|
||||||
GroupMembersSection.addInviteForm(info, inviteFormTarget, inviteFormCallback);
|
GroupMembersPage.addInviteForm(info, inviteFormTarget, inviteFormCallback);
|
||||||
GroupMembersSection.refreshMembersList(info.id, info, membersList);
|
GroupMembersPage.refreshMembersList(info.id, info, membersList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -474,4 +474,4 @@ const GroupMembersSection = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ComunicWeb.pages.groups.pages.members = GroupMembersSection;
|
ComunicWeb.pages.groups.pages.members = GroupMembersPage;
|
@ -97,6 +97,17 @@ const GroupSectionHeader = {
|
|||||||
if(signed_in() && ComunicWeb.components.groups.utils.isGroupMember(info))
|
if(signed_in() && ComunicWeb.components.groups.utils.isGroupMember(info))
|
||||||
ComunicWeb.pages.groups.sections.followBlock.display(info, thirdColumn);
|
ComunicWeb.pages.groups.sections.followBlock.display(info, thirdColumn);
|
||||||
|
|
||||||
|
ComunicWeb.components.like.button.display(
|
||||||
|
"group",
|
||||||
|
info.id,
|
||||||
|
info.number_likes,
|
||||||
|
info.is_liking,
|
||||||
|
createElem2({
|
||||||
|
appendTo: thirdColumn,
|
||||||
|
type: "div"
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
11
assets/templates/pages/groups/pages/about.html
Normal file
11
assets/templates/pages/groups/pages/about.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<!-- Groups about page -->
|
||||||
|
<div class="row group-page about-page">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title">tr("About") <i>{{group.name}}</i></h3>
|
||||||
|
</div>
|
||||||
|
<div class="box-body"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -270,6 +270,7 @@ class Dev {
|
|||||||
"css/pages/groups/pages/settings.css",
|
"css/pages/groups/pages/settings.css",
|
||||||
"css/pages/groups/pages/members.css",
|
"css/pages/groups/pages/members.css",
|
||||||
"css/pages/groups/pages/forbidden.css",
|
"css/pages/groups/pages/forbidden.css",
|
||||||
|
"css/pages/groups/pages/about.css",
|
||||||
|
|
||||||
//Groups sections
|
//Groups sections
|
||||||
"css/pages/groups/sections/header.css",
|
"css/pages/groups/sections/header.css",
|
||||||
@ -534,6 +535,7 @@ class Dev {
|
|||||||
"js/pages/groups/pages/settings.js",
|
"js/pages/groups/pages/settings.js",
|
||||||
"js/pages/groups/pages/members.js",
|
"js/pages/groups/pages/members.js",
|
||||||
"js/pages/groups/pages/forbidden.js",
|
"js/pages/groups/pages/forbidden.js",
|
||||||
|
"js/pages/groups/pages/about.js",
|
||||||
|
|
||||||
//Groups sections
|
//Groups sections
|
||||||
"js/pages/groups/sections/header.js",
|
"js/pages/groups/sections/header.js",
|
||||||
|
Loading…
Reference in New Issue
Block a user