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

add if-else condition for project-list header

Showing with 5 additions and 4 deletions
+5 -4
......@@ -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
});
......
......@@ -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
Supports Markdown
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