From 18e99253c55adb067f6a0852aa4db3dd80f23a65 Mon Sep 17 00:00:00 2001
From: Joe TS Dell <thunyathep.s@outlook.com>
Date: Tue, 25 May 2021 12:01:51 +0200
Subject: [PATCH] update team

---
 public/content/team.json | 19 +++++++++++++++-
 public/js/add_content.js | 47 +++++++++++++++++++++++++---------------
 readme.md                |  4 ++--
 3 files changed, 50 insertions(+), 20 deletions(-)

diff --git a/public/content/team.json b/public/content/team.json
index dab426e..0bcf02b 100644
--- a/public/content/team.json
+++ b/public/content/team.json
@@ -1,11 +1,28 @@
 [
+    {
+        "firstName": "Prof. Dr. Volker",
+        "lastName": "Coors",
+        "jobTitle_en": "Lab Leader",
+        "imgUrl": "/imgs/avatar/volker.Coors.jpg",
+        "profile_link": "https://www.hft-stuttgart.de/p/volker-coors",
+        "researchTopics": "Smart Cities | OGC Standards | Sensors & IoT | 3D City Models | 3D Web Visualization | 3D Simulation | Big Data",
+        "optional": {
+            "researchGateURL": "https://www.researchgate.net/profile/Volker-Coors",
+            "LinkedInURL": "https://www.linkedin.com/in/volker-coors-97173a6/"
+        }
+    },
     {
         "firstName": "Joe T.",
         "lastName": "Santhanavanich",
         "jobTitle_en": "Researcher",
         "imgUrl": "/imgs/avatar/JoeSquare.jpg",
         "profile_link": "https://www.hft-stuttgart.de/p/thunyathep-santhanavanich",
-        "researchTopics": "Smart Cities | OGC Standards | Sensors & IoT | 3D City Models | 3D Web Visualization | 3D Simulation | Big Data"
+        "researchTopics": "Smart Cities | OGC Standards | Sensors & IoT | 3D City Models | 3D Web Visualization | 3D Simulation | Big Data",
+        "optional": {
+            "researchGateURL": "https://www.researchgate.net/profile/Thunyathep-Santhanavanich",
+            "googleScholarURL": "https://scholar.google.com/citations?user=RKNY04EAAAAJ&hl=en",
+            "LinkedInURL": "https://www.linkedin.com/in/thunyatheps/"
+        }
     },
     {
         "firstName": "Patrick",
diff --git a/public/js/add_content.js b/public/js/add_content.js
index 6f869d1..7fdbdaf 100644
--- a/public/js/add_content.js
+++ b/public/js/add_content.js
@@ -68,33 +68,46 @@ function addTeam(item) {
 
   } else {
 
-    var html_team = ``
+    var optional_profile_url_link = ``
+    if ('optional' in item) {
+      if ('researchGateURL' in item.optional) {
+        if (item.optional.researchGateURL !== "") {
+          optional_profile_url_link += `<a class="p-2 fa-lg" href="${item.optional.researchGateURL}" target="_blank">
+          <i class="fab fa-researchgate"></i>
+        </a>` 
+          
+        }
+      }
+      if ('googleScholarURL' in item.optional) {
+        if (item.optional.googleScholarURL !== "") {
+          optional_profile_url_link += `<a class="p-2 fa-lg" href="${item.optional.googleScholarURL}" target="_blank">
+          <i class="fab fa-google"></i>
+        </a>`
+        }
+      }
+      if ('LinkedInURL' in item.optional) {
+        if (item.optional.LinkedInURL !== "") {
+          optional_profile_url_link += `<a class="p-2 fa-lg" href="${item.optional.LinkedInURL}" target="_blank">
+          <i class="fab fa-linkedin"></i>
+        </a>`
+        }
+      }
+      if (optional_profile_url_link !== "") {
+        optional_profile_url_link = `<ul class="list-unstyled mb-0">${optional_profile_url_link}</ul>`
+      }
+    }
     var html_team = `
         <div class="col-lg-3 col-md-6 mb-lg-0 mb-5">
           <div class="avatar mx-auto">
             <img src="${item.imgUrl}" class="rounded-circle z-depth-1" width="150px">
           </div>
           <h5 class="font-weight-bold mt-4 mb-3">${item.firstName} ${item.lastName}</h5>
-          <p class="text-uppercase blue-text"><strong>Researcher</strong></p>
+          <p class="text-uppercase blue-text"><strong>${item.jobTitle_en}</strong></p>
           <a href=${item.profile_link} target="_blank">
             <button class="btn btn-primary btn-sm profile">See full profile</button>
           </a>
           <p class="grey-text">Research topic: ${item.researchTopics}</p>
-          <!--
-
-          <ul class="list-unstyled mb-0">
-            <a class="p-2 fa-lg" href="https://www.researchgate.net/profile/Thunyathep-Santhanavanich" target="_blank">
-              <i class="fab fa-researchgate"></i>
-            </a>
-            <a class="p-2 fa-lg" href="https://scholar.google.com/citations?user=RKNY04EAAAAJ&hl=en" target="_blank">
-              <i class="fab fa-google"></i>
-            </a>
-            <a class="p-2 fa-lg" href="https://www.linkedin.com/in/thunyatheps/" target="_blank">
-              <i class="fab fa-linkedin"></i>
-            </a>
-          </ul>
-
-          -->
+          ${optional_profile_url_link}
         </div>
     `
     new_row.innerHTML = new_row.innerHTML + html_team
diff --git a/readme.md b/readme.md
index 954c716..d7c2b03 100644
--- a/readme.md
+++ b/readme.md
@@ -26,8 +26,8 @@ Website for Geoinformatic Research Group (Prof. Coors)
 ### Tasks for Joe:
 - [x] fixing the Callback Logic on the Publication Section
 - [ ] Documentation on how to add contents to the web.
-- [ ] Upgrade the `public/js/add_paper.js` to support the `URL` and `PDF` link.
-- [ ] Team Section
+- [x] Upgrade the `public/js/add_paper.js` to support the `URL` and `PDF` link.
+- [x] Team Section
 - [ ] Combine all scripts together + maintaining the GIT.
 
 
-- 
GitLab