Add a notice when the user does not belong to any group.

This commit is contained in:
Pierre HUBERT
2018-09-02 14:20:32 +02:00
parent 4860ee6623
commit 6588b3d13a
2 changed files with 17 additions and 1 deletions

View File

@ -86,14 +86,25 @@ ComunicWeb.pages.groups.pages.main = {
*/
_display_list: function(target, list){
var has_group = false;
for (const i in list) {
if (list.hasOwnProperty(i)) {
const group = list[i];
has_group = true;
ComunicWeb.pages.groups.pages.main._display_group(group, target);
}
}
//Check if the user does not belong to any groups
if(!has_group){
createElem2({
appendTo: target,
type: "div",
class: "no-group-notice",
innerHTML:"You do not belong to any group yet."
});
}
},
/**