From 1fb1e62fb6e7d852bb10c17481381fdaedb627e4 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Mon, 16 Jul 2018 08:27:31 +0200 Subject: [PATCH] Display url and description information in group header --- assets/css/pages/groups/sections/header.css | 3 ++- assets/js/pages/groups/sections/header.js | 25 ++++++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/assets/css/pages/groups/sections/header.css b/assets/css/pages/groups/sections/header.css index b2556eac..c803b6bc 100644 --- a/assets/css/pages/groups/sections/header.css +++ b/assets/css/pages/groups/sections/header.css @@ -17,7 +17,8 @@ color: #6f737b; } -.group-header .col-info .fa { +.group-header .col-info .fa, +.group-header .col-metadata .fa { margin-right: 10px; width: 10px; } diff --git a/assets/js/pages/groups/sections/header.js b/assets/js/pages/groups/sections/header.js index 732f9a22..de01c4f8 100644 --- a/assets/js/pages/groups/sections/header.js +++ b/assets/js/pages/groups/sections/header.js @@ -66,11 +66,30 @@ ComunicWeb.pages.groups.sections.header = { var secondColumn = createElem2({ appendTo: row, type: "div", - class: "col-md-4" + class: "col-md-4 col-info" }); - add_p(secondColumn, "Column 2 : Group info"); + //Group URL (if any) + if(info.url != "null"){ + var urlElem = createElem2({ + appendTo: secondColumn, + type: "a", + class: "a", + href: info.url, + innerHTML: " " + info.url + }); + urlElem.target = "_blank"; + } + + + //Group description (if any) + if(info.url != "null") + createElem2({ + appendTo: secondColumn, + type: "div", + innerHTML: " " + info.description + }); @@ -78,7 +97,7 @@ ComunicWeb.pages.groups.sections.header = { var thirdColumn = createElem2({ appendTo: row, type: "div", - class: "col-md-4 col-info" + class: "col-md-4 col-metadata" }); //Add join date