From 8705fc6581c630131e277cd8033d7588df1b8e2d Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sun, 18 Apr 2021 14:51:22 +0200 Subject: [PATCH] Show which groups are Forez groups --- assets/js/pages/groups/sections/header.js | 16 ++++++++++++---- assets/js/typings/Group.d.ts | 1 + 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/assets/js/pages/groups/sections/header.js b/assets/js/pages/groups/sections/header.js index 7bba5471..d864a5ae 100644 --- a/assets/js/pages/groups/sections/header.js +++ b/assets/js/pages/groups/sections/header.js @@ -9,7 +9,7 @@ const GroupSectionHeader = { /** * Display groups page header * - * @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 header */ display: function(info, target){ @@ -89,14 +89,23 @@ const GroupSectionHeader = { class: "col-md-7 col-metadata" }); + // Forez group + if (info.is_forez_group) { + createElem2({ + appendTo: thirdColumn, + type: "div", + innerHTML: " Forez Group" + }) + } - //Display membership level + // Display membership level ComunicWeb.pages.groups.sections.membershipBlock.display(info, thirdColumn); - //Display follow block + // Display follow block if(signed_in() && ComunicWeb.components.groups.utils.isGroupMember(info)) ComunicWeb.pages.groups.sections.followBlock.display(info, thirdColumn); + // Likes block ComunicWeb.components.like.button.display( "group", info.id, @@ -107,7 +116,6 @@ const GroupSectionHeader = { type: "div" }) ); - }, }; diff --git a/assets/js/typings/Group.d.ts b/assets/js/typings/Group.d.ts index 89cdcef8..aa16650d 100644 --- a/assets/js/typings/Group.d.ts +++ b/assets/js/typings/Group.d.ts @@ -12,6 +12,7 @@ declare interface AdvancedGroupInfo extends Group { number_likes: Number, is_liking: Boolean, conversations: Conversation[], + is_forez_group: boolean, } declare interface GroupSettings extends AdvancedGroupInfo {} \ No newline at end of file