From 7df3b7a0063fd9dbc81a3593ce3c86207f7fb334 Mon Sep 17 00:00:00 2001
From: Rosanny <rosanny.sihombing@hft-stuttgart.de>
Date: Wed, 4 Mar 2020 15:06:20 +0100
Subject: [PATCH] add if-else condition for project-list header

---
 routes/routes.js                  | 2 --
 views/DE/projectList/projects.pug | 7 +++++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/routes/routes.js b/routes/routes.js
index 481e2fb9..1632240d 100644
--- a/routes/routes.js
+++ b/routes/routes.js
@@ -559,13 +559,11 @@ module.exports = function (app, config, passport, i18n) {
   // ======== APP ROUTES - PROJECT LIST ====================
   app.get('/project', function (req, res) {
     if (req.isAuthenticated()) {
-      console.log("true")
       res.render(lang+'/projectList/projects', {
         isUserAuthenticated: true
       });
     }
     else {
-      console.log("false")
       res.render(lang+'/projectList/projects', {
         isUserAuthenticated: false
       });
diff --git a/views/DE/projectList/projects.pug b/views/DE/projectList/projects.pug
index 49b656ea..5b1a10a5 100644
--- a/views/DE/projectList/projects.pug
+++ b/views/DE/projectList/projects.pug
@@ -38,11 +38,14 @@ html(lang="de")
                 h3(class="mb-3 font-weight-bold") Hello World
             div(class="col-md-6 offset-md-3")
                 p Content: Project List in a table
-                    
 
     // jQuery
     script(src="https://code.jquery.com/jquery-3.3.1.min.js")
     script(src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js", integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1", crossorigin="anonymous")
     // Bootstrap
     script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
-    script(src="https://transfer.hft-stuttgart.de/js/headfoot.js")
\ No newline at end of file
+    // Header
+    if isUserAuthenticated
+        script(src="/js/headfootLogout.js")
+    else
+        script(src="https://transfer.hft-stuttgart.de/js/headfoot.js")
\ No newline at end of file
-- 
GitLab