Commit 3acdd9fe authored by Wolfgang Knopki's avatar Wolfgang Knopki
Browse files

changed structure to reflect only one application on landing page -> needs apache reconfiguration

parent 7bbf602d
...@@ -137,13 +137,13 @@ module.exports = function (app, config, passport, i18n) { ...@@ -137,13 +137,13 @@ module.exports = function (app, config, passport, i18n) {
passport.authenticate(config.passport.strategy, passport.authenticate(config.passport.strategy,
{ {
successRedirect: '/account/', successRedirect: '/account/',
failureRedirect: '/account/login' failureRedirect: '/login'
}) })
); );
app.get('/logout', function (req, res) { app.get('/logout', function (req, res) {
if (req.user == null) { if (req.user == null) {
return res.redirect('/account/'); return res.redirect('/');
} }
req.user.nameID = req.user.id; req.user.nameID = req.user.id;
...@@ -174,7 +174,7 @@ module.exports = function (app, config, passport, i18n) { ...@@ -174,7 +174,7 @@ module.exports = function (app, config, passport, i18n) {
} }
}) })
} else { } else {
res.redirect('/account/login'); res.redirect('/login');
} }
}); });
...@@ -238,7 +238,7 @@ module.exports = function (app, config, passport, i18n) { ...@@ -238,7 +238,7 @@ module.exports = function (app, config, passport, i18n) {
} }
]) ])
} else { } else {
res.redirect('/account/login'); res.redirect('/login');
} }
}); });
...@@ -248,7 +248,7 @@ module.exports = function (app, config, passport, i18n) { ...@@ -248,7 +248,7 @@ module.exports = function (app, config, passport, i18n) {
user: req.user // useful for view engine, useless for HTML user: req.user // useful for view engine, useless for HTML
}); });
} else { } else {
res.redirect('/account/login'); res.redirect('/login');
} }
}); });
...@@ -274,11 +274,11 @@ module.exports = function (app, config, passport, i18n) { ...@@ -274,11 +274,11 @@ module.exports = function (app, config, passport, i18n) {
else { else {
req.flash('success', 'Profile updated!'); req.flash('success', 'Profile updated!');
} }
res.redirect('/account/profile'); res.redirect('lang+/account/profile');
}) })
} }
} else { } else {
res.redirect('/account/login'); res.redirect('/login');
} }
}); });
...@@ -293,7 +293,7 @@ module.exports = function (app, config, passport, i18n) { ...@@ -293,7 +293,7 @@ module.exports = function (app, config, passport, i18n) {
// Load hashed passwd from DB // Load hashed passwd from DB
dbconn.user.query('SELECT password FROM credential WHERE user_id='+userId, function (err, rows, fields) { dbconn.user.query('SELECT password FROM credential WHERE user_id='+userId, function (err, rows, fields) {
if (err) { if (err) {
res.redirect('/account/500') res.redirect('/500')
throw err throw err
} }
var userPwd = rows[0].password var userPwd = rows[0].password
...@@ -301,19 +301,19 @@ module.exports = function (app, config, passport, i18n) { ...@@ -301,19 +301,19 @@ module.exports = function (app, config, passport, i18n) {
// check if the password is correct // check if the password is correct
bcrypt.compare(currPwd, userPwd, function(err, isMatch) { bcrypt.compare(currPwd, userPwd, function(err, isMatch) {
if (err) { if (err) {
res.redirect('/account/500') res.redirect('/500')
throw err throw err
} }
else if (!isMatch) { else if (!isMatch) {
//req.flash('error', "Sorry, your password was incorrect. Please double-check your password.") //req.flash('error', "Sorry, your password was incorrect. Please double-check your password.")
req.flash('error', "Das Passwort ist leider falsch. Bitte überprüfen Sie Ihre Eingabe.") req.flash('error', "Das Passwort ist leider falsch. Bitte überprüfen Sie Ihre Eingabe.")
//res.redirect('/account/security') //res.redirect('/security')
res.redirect('/account/security') res.redirect('/security')
} }
else { else {
if ( newPwd != retypePwd ) { if ( newPwd != retypePwd ) {
req.flash('error', "Passwords do no match. Please make sure you re-type your new password correctly.") req.flash('error', "Passwords do no match. Please make sure you re-type your new password correctly.")
res.redirect('/account/security') res.redirect(lang+'/account/security')
} }
else { else {
// update password // update password
...@@ -342,7 +342,7 @@ module.exports = function (app, config, passport, i18n) { ...@@ -342,7 +342,7 @@ module.exports = function (app, config, passport, i18n) {
} }
}); });
} }
res.redirect('/account/security') res.redirect('/security')
}) })
}); });
}); });
...@@ -354,7 +354,7 @@ module.exports = function (app, config, passport, i18n) { ...@@ -354,7 +354,7 @@ module.exports = function (app, config, passport, i18n) {
}) })
} }
else { else {
res.redirect('/account/login'); res.redirect('/login');
} }
}); });
...@@ -429,8 +429,8 @@ module.exports = function (app, config, passport, i18n) { ...@@ -429,8 +429,8 @@ module.exports = function (app, config, passport, i18n) {
//req.flash('success', 'If your email is registered, an e-mail has been sent to ' + emailAddress + ' with further instructions.'); //req.flash('success', 'If your email is registered, an e-mail has been sent to ' + emailAddress + ' with further instructions.');
req.flash('success', 'Wenn Ihre E-Mail-Adresse registriert ist, wurde eine E-Mail mit dem weiteren Vorgehen an ' + emailAddress + ' versendet.'); req.flash('success', 'Wenn Ihre E-Mail-Adresse registriert ist, wurde eine E-Mail mit dem weiteren Vorgehen an ' + emailAddress + ' versendet.');
} }
//res.redirect('/account/forgotPwd'); // deployment //res.redirect('/forgotPwd'); // deployment
res.redirect('/account/forgotPwd'); // localhost res.redirect('/forgotPwd'); // localhost
}); });
}); });
...@@ -439,8 +439,8 @@ module.exports = function (app, config, passport, i18n) { ...@@ -439,8 +439,8 @@ module.exports = function (app, config, passport, i18n) {
if (!user) { if (!user) {
//req.flash('error', 'Password reset token is invalid or has expired.'); //req.flash('error', 'Password reset token is invalid or has expired.');
req.flash('error', 'Der Schlüssel zum zurücksetzen des Passworts ist ungültig oder abgelaufen.'); req.flash('error', 'Der Schlüssel zum zurücksetzen des Passworts ist ungültig oder abgelaufen.');
//res.redirect('/account/forgotPwd'); // deployment //res.redirect('/forgotPwd'); // deployment
res.redirect('/account/forgotPwd'); // localhost res.redirect('/forgotPwd'); // localhost
} }
else { else {
res.render(lang+'/account/reset'); res.render(lang+'/account/reset');
...@@ -479,7 +479,7 @@ module.exports = function (app, config, passport, i18n) { ...@@ -479,7 +479,7 @@ module.exports = function (app, config, passport, i18n) {
} }
}); });
// redirect to login page // redirect to login page
res.redirect('/account/login') res.redirect('/login')
} }
}) })
}); });
...@@ -487,7 +487,7 @@ module.exports = function (app, config, passport, i18n) { ...@@ -487,7 +487,7 @@ module.exports = function (app, config, passport, i18n) {
} }
else { else {
req.flash('error', "User not found.") req.flash('error', "User not found.")
res.redirect('/account/login') res.redirect('/login')
} }
}); });
...@@ -533,7 +533,7 @@ module.exports = function (app, config, passport, i18n) { ...@@ -533,7 +533,7 @@ module.exports = function (app, config, passport, i18n) {
//req.flash('success', 'Your account has been created. Please log in.') //req.flash('success', 'Your account has been created. Please log in.')
req.flash('success', 'Ihr Benutzerkonto wurde angelegt. Bitte melden Sie sich an.') req.flash('success', 'Ihr Benutzerkonto wurde angelegt. Bitte melden Sie sich an.')
} }
res.redirect('/account/registration'); res.redirect('/registration');
}) })
}); });
}); });
...@@ -573,7 +573,7 @@ module.exports = function (app, config, passport, i18n) { ...@@ -573,7 +573,7 @@ module.exports = function (app, config, passport, i18n) {
project_title: mailinglistOverview[i].project_title project_title: mailinglistOverview[i].project_title
}); });
} }
res.render('mailinglists', { res.render(lang+'mailinglists', {
user: req.user, user: req.user,
mailinglists: allMailingLists mailinglists: allMailingLists
}); });
......
html(lang="de")
head
title= "Mailinglisten"
meta(charset="UTF-8")
meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no")
link(rel="stylesheet", type="text/css", href="https://transfer.hft-stuttgart.de/css/bootstrap/bootstrap.css")
link(rel="stylesheet", type="text/css", href="https://transfer.hft-stuttgart.de/css/custom/login.css")
link(rel="stylesheet", href="https://use.fontawesome.com/releases/v5.8.2/css/all.css", integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay", crossorigin="anonymous")
style.
.collapse {
display: none;
}
.collapse.in {
display: block;
}
.collapsing {
position: relative;
height: 0;
overflow: hidden;
-webkit-transition-timing-function: ease;
-o-transition-timing-function: ease;
transition-timing-function: ease;
-webkit-transition-duration: .35s;
-o-transition-duration: .35s;
transition-duration: .35s;
-webkit-transition-property: height,visibility;
-o-transition-property: height,visibility;
transition-property: height,visibility;
}
body
<hr />
div()
h5(align="left") Aktive Mailinglisten
div(class="flex-container" style="align-items:flex-start")
div(class="table")
table(border="0" id="Projektliste")
tr
th Name
th Link
th zugeh. Projekt
for item in mailinglists
if item.projectstatus == '1'
tr
td #{item.name}
td <a href="#{item.src}">#{item.src}</a>
td <a href='projectoverview?#{item.id}'>#{item.project_title}</a>
<hr />
div()
h5(align="left") Eintragung in Mailingliste
p() Wenn Sie sich in eine Mailingliste eintragen wollen, folgen Sie folgender Anleitung:
// 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")
// M4_LAB
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