Display posts creation form on groups pages.

This commit is contained in:
Pierre HUBERT
2018-07-16 09:13:51 +02:00
parent 07af7c961d
commit 5c0cdced85
4 changed files with 46 additions and 4 deletions

View File

@ -65,6 +65,28 @@ ComunicWeb.pages.groups.pages.group = {
//Display the header for the group
ComunicWeb.pages.groups.sections.header.display(info, headerColumn);
//Check if the user can create posts or not
if(ComunicWeb.components.groups.utils.canCreatePosts(info)){
//Intialize posts creation form
var postFormRow = createElem2({
appendTo: target,
type: "div",
class: "row group-page"
});
//Add column
var postFormCol = createElem2({
appendTo: postFormRow,
type: "div",
class: "col-md-6"
});
//Display form
ComunicWeb.components.posts.form.display("group", id, postFormCol);
}
}
}

View File

@ -292,7 +292,7 @@ ComunicWeb.pages.groups.pages.settings = {
//Moderators only
createFormGroup({
target: postsLevelsForm,
label: "Moderators and moderators only can create groups",
label: "Administrators and moderators only can create groups",
name: "group-posts-level",
type: "radio",
value: "moderators",

View File

@ -18,14 +18,14 @@ ComunicWeb.pages.groups.sections.header = {
var headerContainer = createElem2({
appendTo: target,
type: "div",
class: "group-header"
class: "group-header box box-primary"
});
//Create a row
var row = createElem2({
appendTo: headerContainer,
type: "div",
class: "row"
class: "box-body row"
});
//First column