Commit 7df3b7a0 authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

add if-else condition for project-list header

parent a6fa8da9
...@@ -559,13 +559,11 @@ module.exports = function (app, config, passport, i18n) { ...@@ -559,13 +559,11 @@ module.exports = function (app, config, passport, i18n) {
// ======== APP ROUTES - PROJECT LIST ==================== // ======== APP ROUTES - PROJECT LIST ====================
app.get('/project', function (req, res) { app.get('/project', function (req, res) {
if (req.isAuthenticated()) { if (req.isAuthenticated()) {
console.log("true")
res.render(lang+'/projectList/projects', { res.render(lang+'/projectList/projects', {
isUserAuthenticated: true isUserAuthenticated: true
}); });
} }
else { else {
console.log("false")
res.render(lang+'/projectList/projects', { res.render(lang+'/projectList/projects', {
isUserAuthenticated: false isUserAuthenticated: false
}); });
......
...@@ -38,11 +38,14 @@ html(lang="de") ...@@ -38,11 +38,14 @@ html(lang="de")
h3(class="mb-3 font-weight-bold") Hello World h3(class="mb-3 font-weight-bold") Hello World
div(class="col-md-6 offset-md-3") div(class="col-md-6 offset-md-3")
p Content: Project List in a table p Content: Project List in a table
// jQuery // jQuery
script(src="https://code.jquery.com/jquery-3.3.1.min.js") 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") script(src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js", integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1", crossorigin="anonymous")
// Bootstrap // 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://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") // Header
\ No newline at end of file if isUserAuthenticated
script(src="/js/headfootLogout.js")
else
script(src="https://transfer.hft-stuttgart.de/js/headfoot.js")
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment