Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • User Account User Account
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • m4lab_tv1
  • User AccountUser Account
  • Merge requests
  • !16
An error occurred while fetching the assigned milestone of the selected merge_request.

Mlab 167

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Varun Srivastava requested to merge MLAB-167 into master 5 years ago
  • Overview 1
  • Commits 32
  • Pipelines 0
  • Changes 19

No change done to the code. Created the branch in wrong project

  • Wolfgang Knopki @knopkiwg closed 5 years ago

    closed

  • Wolfgang Knopki
    Wolfgang Knopki @knopkiwg · 5 years ago

    Wrong project and wrong branch -> not merging

  • Loading
  • Loading
  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
Compare
  • master (base)

and
  • latest version
    7a243ea7
    32 commits, 5 years ago

19 files
+ 476
- 200

    Preferences

    File browser
    Compare changes
con‎fig‎
conf‎ig.js‎ +1 -0
publ‎ic/js‎
registr‎ation.js‎ +1 -1
rou‎tes‎
routes-a‎ccount.js‎ +39 -34
routes-p‎roject.js‎ +63 -6
view‎s/DE‎
acc‎ount‎
conta‎ct.pug‎ +80 -0
home‎.pug‎ +4 -2
profi‎le.pug‎ +8 -8
securi‎ty.pug‎ +2 -2
servic‎es.pug‎ +1 -1
pro‎ject‎
addProjectO‎verview.pug‎ +16 -11
mailingl‎ists.pug‎ +62 -27
project-sim‎plified.pug‎ +30 -28
projec‎t.html‎ +125 -67
projectOv‎erview.pug‎ +1 -4
projec‎ts.pug‎ +1 -4
videoconfe‎rences.pug‎ +1 -4
app‎.js‎ +11 -1
package-‎lock.json‎ +29 -0
packag‎e.json‎ +1 -0
config/config.js
+ 1
- 0
  • View file @ 7a243ea7


@@ -22,6 +22,7 @@ module.exports = {
port: 3306, // MySQL port
dbUser: 'userdb', // User DB
host_project: 'm4lab.hft-stuttgart.de', // DB host project db
//host_project: 'localhost', // local
dbProject: 'projectDB' // Project DB
},
mailer: {
public/js/registration.js
+ 1
- 1
  • View file @ 7a243ea7


@@ -8,7 +8,7 @@ $('#inputEmail').change(function(){
$('#emailWarning').empty()
isEmailValid = data
if(!isEmailValid) {
$('#emailWarning').html('M4_LAB account with this email address is already exist.')
$('#emailWarning').html('Mit dieser E-Mail-Adresse existiert bereits ein Benutzerkonto in unserem Transferportal.')
}
switchSubmitButton()
})
routes/routes-account.js
+ 39
- 34
  • View file @ 7a243ea7


@@ -58,7 +58,7 @@ module.exports = function (app, config, passport, i18n) {
app.post(config.passport.saml.path,
passport.authenticate(config.passport.strategy,
{
failureRedirect: '/',
failureRedirect: '/account/',
failureFlash: true
}),
function (req, res) {
@@ -67,7 +67,7 @@ module.exports = function (app, config, passport, i18n) {
);
// to generate Service Provider's XML metadata
app.get('/saml/metadata',
app.get('/saml/metadata',
function(req, res) {
res.type('application/xml');
var spMetadata = samlStrategy.generateServiceProviderMetadata(fs.readFileSync(__dirname + '/cert/cert.pem', 'utf8'));
@@ -104,8 +104,8 @@ module.exports = function (app, config, passport, i18n) {
}
})
} else {
res.redirect('/account/login'); // localhost
}
res.redirect('/login'); // localhost
}
});
app.get('/login',
@@ -118,14 +118,14 @@ module.exports = function (app, config, passport, i18n) {
app.get('/logout', function (req, res) {
if (req.user == null) {
return res.redirect('/account/');
return res.redirect('/');
}
req.user.nameID = req.user.id;
req.user.nameIDFormat = req.user.idFormat;
return samlStrategy.logout(req, function(err, uri) {
req.logout();
if ( req.session ) {
req.session.destroy((err) => {
if(err) {
@@ -133,7 +133,7 @@ module.exports = function (app, config, passport, i18n) {
}
});
}
return res.redirect(uri);
});
});
@@ -149,7 +149,7 @@ module.exports = function (app, config, passport, i18n) {
}
})
} else {
res.redirect('/account/login');
res.redirect('/login');
}
});
@@ -183,7 +183,7 @@ module.exports = function (app, config, passport, i18n) {
// create JSON object of projects and user status for front-end
function(userProjects, projectsOverview, done) {
var allProjects = [] // JSON object
var userProjectId = [] // array of user's project_id
for (var i = 0; i < userProjects.length; i++) {
userProjectId.push(userProjects[i].project_id)
@@ -213,7 +213,7 @@ module.exports = function (app, config, passport, i18n) {
}
])
} else {
res.redirect('/account/login');
res.redirect('/login');
}
});
@@ -223,7 +223,7 @@ module.exports = function (app, config, passport, i18n) {
user: req.user // useful for view engine, useless for HTML
});
} else {
res.redirect('/account/login');
res.redirect('/login');
}
});
@@ -238,7 +238,7 @@ module.exports = function (app, config, passport, i18n) {
industry: req.body.inputIndustry,
speciality: req.body.inputSpeciality,
}
if (req.isAuthenticated()) {
if (userData.email) {
dbconn.user.query('UPDATE user SET ? WHERE email = "' +userData.email+'"', userData, function (err, rows, fields) {
@@ -250,14 +250,14 @@ module.exports = function (app, config, passport, i18n) {
//req.flash('success', 'Profile updated!');
req.flash('success', 'Ihr Benutzerprofil wurde aktualisiert!');
}
res.redirect('/account/profile');
res.redirect('/profile');
})
}
} else {
res.redirect('/account/login');
res.redirect('/login');
}
});
app.post('/changePwd', function (req, res) {
if (req.isAuthenticated()) {
var currPwd = req.body.inputCurrPwd
@@ -269,27 +269,32 @@ module.exports = function (app, config, passport, i18n) {
// Load hashed passwd from DB
dbconn.user.query('SELECT password FROM credential WHERE user_id='+userId, function (err, rows, fields) {
if (err) {
res.redirect('/500')
throw err
console.error(err)
res.status(500).render(lang+'/500', {
error: err
})
}
var userPwd = rows[0].password
// check if the password is correct
bcrypt.compare(currPwd, userPwd, function(err, isMatch) {
if (err) {
res.redirect('/500')
throw err
console.error(err)
res.status(500).render(lang+'/500', {
error: err
})
}
else if (!isMatch) {
//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.")
//res.redirect('/security')
res.redirect('/account/security')
res.redirect('/security')
}
else {
if ( newPwd != retypePwd ) {
req.flash('error', "Passwords do no match. Please make sure you re-type your new password correctly.")
res.redirect('/account/security')
//req.flash('error', "Passwords do no match. Please make sure you re-type your new password correctly.")
req.flash('error', 'Passwörter stimmen nicht überein. Bitte stellen Sie sicher, dass Sie das Passwort beide Male genau gleich eingeben.')
res.redirect('/security')
}
else {
// update password
@@ -318,19 +323,19 @@ module.exports = function (app, config, passport, i18n) {
}
});
}
res.redirect('/account/security')
res.redirect('/security')
})
});
});
}
}
})
})
})
}
})
})
}
else {
res.redirect('/account/login');
res.redirect('/login');
}
});
@@ -348,7 +353,7 @@ module.exports = function (app, config, passport, i18n) {
"we've received a request to reset your password. However, this email address is not on our database of registered users.\n\n"+
"Thanks,\nM4_LAB Team";
var emailSubject = "Account Access Attempted"; */
async.waterfall([
function(done) {
crypto.randomBytes(20, function(err, buf) {
@@ -406,7 +411,7 @@ module.exports = function (app, config, passport, i18n) {
req.flash('success', 'Wenn Ihre E-Mail-Adresse registriert ist, wurde eine E-Mail mit dem weiteren Vorgehen an ' + emailAddress + ' versendet.');
}
//res.redirect('/forgotPwd'); // deployment
res.redirect('/account/forgotPwd'); // localhost
res.redirect('/forgotPwd'); // localhost
});
});
@@ -416,7 +421,7 @@ module.exports = function (app, config, passport, i18n) {
//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.');
//res.redirect('/forgotPwd'); // deployment
res.redirect('/account/forgotPwd'); // localhost
res.redirect('/forgotPwd'); // localhost
}
else {
res.render(lang+'/account/reset');
@@ -455,7 +460,7 @@ module.exports = function (app, config, passport, i18n) {
}
});
// redirect to login page
res.redirect('/account/login')
res.redirect('/login')
}
})
});
@@ -463,10 +468,10 @@ module.exports = function (app, config, passport, i18n) {
}
else {
req.flash('error', "User not found.")
res.redirect('/account/login')
res.redirect('/login')
}
});
});
// todo: user registration with captcha
@@ -507,9 +512,9 @@ module.exports = function (app, config, passport, i18n) {
}
else {
//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');
})
});
});
routes/routes-project.js
+ 63
- 6
  • View file @ 7a243ea7


@@ -2,6 +2,8 @@ const methods = require('./methods')
const async = require('async')
const helpers = require('./helpers')
const pictSizeLimit = 1000000 // 1 MB
module.exports = function (app) {
// ======== APP ROUTES - PROJECT ====================
@@ -26,7 +28,8 @@ module.exports = function (app) {
name: mailinglistOverview[i].name,
src: mailinglistOverview[i].src,
projectstatus: mailinglistOverview[i].projectstatus,
project_title: mailinglistOverview[i].project_title
project_title: mailinglistOverview[i].project_title,
keywords: mailinglistOverview[i].keywords
});
}
@@ -104,7 +107,7 @@ module.exports = function (app) {
res.render(lang+'/project/addProjectOverview')
}
else {
res.redirect('/account/login')
res.redirect('/login')
}
})
@@ -144,7 +147,7 @@ module.exports = function (app) {
if (err) {
//req.flash('error', "Failed")
req.flash('error', "Fehlgeschlagen")
res.redirect('/account/addProjectOverview');
res.redirect('/addProjectOverview');
}
else {
req.flash('success', 'Your project has been created.')
@@ -160,13 +163,45 @@ module.exports = function (app) {
if (req.body.wiki)
wiki = 1
var projectLogo = req.files.logo
var projectPicture = req.files.src
var projectLogoPath, projectPicturePath
if (projectLogo) {
// raise error if size limit is exceeded
if (projectLogo.size === pictSizeLimit) {
req.flash('error', 'Projektlogo exceeds 1 MB');
res.redirect('/addprojectoverview');
}
else {
// TEST PATH FOR DEVELOPMENT (LOCALHOST)
projectLogoPath = './folder-in-server-to-save-projektlogo/'+req.body.pname+'/'+projectLogo.name
// PATH FOR TEST/LIVE SERVER
// var projectLogoPath = to-be-defined
}
}
if (projectPicture) {
// raise error if size limit is exceeded
if (projectPicture.size === pictSizeLimit) {
req.flash('error', 'Projektbild exceeds 1 MB');
res.redirect('/addprojectoverview');
}
else {
// TEST PATH FOR DEVELOPMENT (LOCALHOST)
projectPicturePath = './folder-in-server-to-save-projektbild/'+req.body.pname+'/'+projectPicture.name
// PATH FOR TEST/LIVE SERVER
// var projectPicturePath = to-be-defined
}
}
var projectTerm = req.body.termForm + " - " + req.body.termTo
var projectOverviewData = {
pname: req.body.pname,
title: req.body.title,
onelinesummary: req.body.summary,
category: req.body.category,
logo: req.body.logo,
logo: projectLogoPath,
gitlab: req.body.gitlabURL,
wiki: wiki,
overview: req.body.overview,
@@ -178,7 +213,7 @@ module.exports = function (app) {
term: projectTerm,
further_details: req.body.furtherDetails,
website: req.body.website,
src: req.body.src,
src: projectPicturePath,
caption: req.body.caption,
contact_lastname: req.body.contactName,
contact_email: req.body.contactEmail,
@@ -186,6 +221,28 @@ module.exports = function (app) {
leader_email: req.body.leaderEmail
}
// save pictures
if (projectLogo) {
projectLogo.mv(projectLogoPath, function(err) {
if (err) {
console.error(err)
res.status(500).render(lang+'/500', {
error: err
})
}
});
}
if (projectPicture) {
projectPicture.mv(projectPicturePath, function(err) {
if (err) {
console.error(err)
res.status(500).render(lang+'/500', {
error: err
})
}
});
}
/* RS: Temporary solution while Project DB is still in early phase.
When User DB and Project DB are integrated and quite stabil, this operation should be done in 1 transaction.
*/
@@ -224,7 +281,7 @@ module.exports = function (app) {
if (err) {
//req.flash('error', "Failed")
req.flash('error', "Fehlgeschlagen")
res.redirect('/account/addProjectOverview');
res.redirect('/addProjectOverview');
}
else {
req.flash('success', 'Your project has been created.')
views/DE/account/contact.pug 0 → 100644
+ 80
- 0
  • View file @ 7a243ea7

doctype html
html(lang="de")
head
title= "Kontakt"
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="/css/bootstrap.min.css")
link(rel="stylesheet", type="text/css", href="/fonts/ionicons.min.css")
link(rel="stylesheet", type="text/css", href="/css/Contact-Form-Clean.css")
link(rel="stylesheet", type="text/css", href="/css/Testimonials.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
div(class="container")
div(class="row")
div(class="col-md-12" style="margin-bottom: 40px;")
img(class="mx-auto" src="/img/Kontakt.jpg" width="100%")
div(class="contact-clean" style="background-color: rgb(234,234,234);")
if successes
for success in successes
div.alert.alert-success.alert-dismissible #{ success }
a(class="close", href="#", data-dismiss="alert", aria-label="close") &times;
if errors
for error, i in errors
div.alert.alert-danger.alert-dismissible.fade.show #{ error }
a(class="close", href="#", data-dismiss="alert", aria-label="close") &times;
form(method="POST")
h2(class="text_center") Kontaktieren Sie uns
div(class="form-group")
input#name(class="form-control" type="text" name="name" placeholder="Name")
div(class="form-group")
input#inputEmail(name="inputEmail", type="email", class="form-control", placeholder="E-Mail-Adresse*", maxlength="45" required)
div(class="form-group")
textarea#message(class="form-control" name="message" placeholder="Nachricht" rows="14")
div(class="form-group")
input#submitBtn(class="btn btn-primary" type="submit" style="background-color: #8a348b;" value="SENDEN")
div(class="contact-clean" style="background-color: rgb(234,234,234);padding: 80px;padding-top: 0px;")
form(method="POST")
p(style="margin-top: 25px;") <strong>Hochschule für Technik Stuttgart</strong><br/>Institut für Angewandte Forschung<br/>Innovative Hochschule - Projekt M4_LAB<br/>Schellingstr. 24<br/>70174 Stuttgart<br/>Deutschland<br/><br/><a href="mailto:support-transfer@hft-stuttgart.de">support-transfer@hft-stuttgart.de</a><br/><br/><a href="https://www.hft-stuttgart.de/">www.hft-stuttgart.de</a> / <a href="https://www.hft-stuttgart.de/M4LAB">www.hft-stuttgart.de/M4LAB</a><br/>
div(style="background-color: rgba(138,52,139,0.45);")
div(class="container")
div(class="row")
div(class="col-md-4 col-lg-2")
div(class="col-md-4 col-lg-8")
div(style="background-color: #feffff;margin: 0px;padding: 60px;padding-top: 20px;padding-bottom: 20px;")
img(class="d-flex d-lg-flex justify-content-center justify-content-lg-center align-items-lg-start mx-auto" src="/img/Logo_TV1.png" width="100px" style="padding-bottom: 35px;")
h2(class="text-center" style="color: #8a348b;") <strong>Transferportal</strong>
p(class="text-center") Das Transferportal entsteht in einem Teilprojekt der Innovativen <a href="https://www.hft-stuttgart.de">Hochschule für Technik Stuttgart</a>. Im <a href="https://www.hft-stuttgart.de/forschung/innovative-hochschule-m4-lab">Innovationslabor M4_LAB</a> wird das Transferportal als eine Webpräsenz entwickelt, welches Wissen, Lösungen und Dienste für HFT-Mitglieder, externe Partner und die allgemeine Öffentlichkeit bereitstellt.<br/><br/>Es ergänzt die Informationen der allgemeinen HFT-Webseite durch konkrete Ergebnisse aus Forschung und Entwicklung, verfügbar in verschiedenster Form wie beispielsweise Daten, Dokumentationen und Software-Code.<br/><br/>Zudem stellt es Kollaborationsmittel für Projektpartner und später auch Partizipationsmöglichkeiten für die breite Öffentlichkeit bereit.
div(class="col-md-4 col-lg-2")
// 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="/js/headfoot.js")
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: MLAB-167

Menu

Explore Projects Groups Snippets

Dies ist die Gitlab-Instanz des Transferportals der Hochschule für Technik Stuttgart. Hier geht es zurück zum Portal