diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 64817da6af7c48e8ec34472a5cfe0666b75cf4bb..0d65017186a6f34b98e10cb9cc077ac8940cb3ec 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,10 @@ -pages-devel: +deploy-testing: stage: deploy script: + - cat $configfiledev > ./config/config.js + - cat $cert > ./routes/cert/cert.pem + - cat $certidp > ./routes/cert/cert_idp.pem + - cat $key > ./routes/cert/key.pem - npm install - "pm2 delete --silent account || :" - pm2 start ./app.js --name=account @@ -9,11 +13,14 @@ pages-devel: - testing only: - testing - - test_logoutbutton - -pages-devel: + +deploy-master: stage: deploy script: + - cat $configfileprod > ./config/config.js + - cat $cert > ./routes/cert/cert.pem + - cat $certidp > ./routes/cert/cert_idp.pem + - cat $key > ./routes/cert/key.pem - npm install - "pm2 delete --silent account || :" - pm2 start ./app.js --name=account diff --git a/app.js b/app.js index 68d3e9442d8290a20f6bded553c389810031c0ac..d5b02f9918b375a734081d76f460e85207b9a1aa 100644 --- a/app.js +++ b/app.js @@ -9,6 +9,8 @@ const session = require('express-session'); const errorhandler = require('errorhandler'); const flash = require('express-flash'); const fileUpload = require('express-fileupload'); +const helmet = require('helmet'); +const compression = require('compression'); const i18n = require('i18n'); // internationalization i18n.configure({ @@ -16,7 +18,7 @@ i18n.configure({ directory: './locales' }); -var env = process.env.NODE_ENV || 'development'; +var env = process.env.NODE_ENV || 'production'; const config = require('./config/config')[env]; var app = express(); @@ -33,6 +35,8 @@ app.use(fileUpload({ } })); +app.use(helmet()); +app.use(compression()); app.use(morgan('combined')); app.use(cookieParser()); app.use(bodyParser.json()); @@ -69,7 +73,6 @@ app.use(function(req, res, next) { }); require('./routes/routes-account')(app, config, passport, i18n); -require('./routes/routes-project')(app, config, passport); require('./routes/api')(app, config, passport); // Handle 404 diff --git a/config/config.js b/config/config.js index be66b51ebed90d24cfa526f9c5be95ef33b1a1d3..eaab87640d0e7c3eb28fc8c090654f238cafb4c2 100644 --- a/config/config.js +++ b/config/config.js @@ -2,36 +2,69 @@ module.exports = { development: { app: { name: 'User Account Management', - port: process.env.PORT || 9989 + port: process.env.PORT || 9989, + host: 'http://localhost:9989' }, passport: { strategy: 'saml', saml: { path: process.env.SAML_PATH || '/saml/SSO', - entryPoint: process.env.SAML_ENTRY_POINT || 'https://transfer.hft-stuttgart.de/idp/saml2/idp/SSOService.php', - //issuer: 'sp-account.m4lab.hft-stuttgart.de', //local metadata - issuer: 'sp-account-prod.m4lab.hft-stuttgart.de', //production metadata - logoutUrl: 'https://transfer.hft-stuttgart.de/idp/saml2/idp/SingleLogoutService.php' + entryPoint: process.env.SAML_ENTRY_POINT || 'Saml Entry Point', + issuer: 'SAML issuer', //local metadata + logoutUrl: 'SAML logout URL' } }, database: { - host: 'transfer.hft-stuttgart.de', // DB host - user: 'DBManager', // DB username - password: 'Stuttgart2019', // DB password + host: 'localhost', // DB host + user: 'usernamedb', // DB username + password: 'passworddb', // DB password port: 3306, // MySQL port dbUser: 'userdb', // User DB - host_project: 'transfer.hft-stuttgart.de', // DB host project db - //host_project: 'localhost', // local - dbProject: 'projectDB' // Project DB + host_project: 'localhost', // DB host project db + dbProject: 'projectdb' // Project DB }, mailer: { - host: 'mail.hft-stuttgart.de', // hostname + host: 'mailhost', // hostname secureConnection: false, // TLS requires secureConnection to be false port: 587, // port for secure SMTP - authUser: 'ad\\support-transfer', - authPass: '6laumri2', + authUser: 'mailuser', + authPass: 'mailpass', tlsCiphers: 'SSLv3', - from: 'support-transfer@hft-stuttgart.de', + from: 'mailfrom', + } + }, + testing: { + app: { + name: 'User Account Management', + port: process.env.PORT || 9989, + host: 'https://m4lab.hft-stuttgart.de/account' + }, + passport: { + strategy: 'saml', + saml: { + path: process.env.SAML_PATH || '/saml/SSO', + entryPoint: process.env.SAML_ENTRY_POINT || 'saml entry point', + issuer: 'SAML issuer', //testing metadata + logoutUrl: 'SAML logout URL' + } + }, + database: { + host: 'dbhost', // DB host + user: 'dbuser', // DB username + password: 'dbpass', // DB password + port: 3306, // MySQL port + dbUser: 'userdb', // User DB + host_project: 'dbhost', // DB host project db + dbProject: 'projectdb' // Project DB + }, + mailer: { + host: 'mailhost', // hostname + secureConnection: false, // TLS requires secureConnection to be false + port: 587, // port for secure SMTP + authUser: 'mailuser', + authPass: 'mailpass', + tlsCiphers: 'SSLv3', + from: 'mailfrom', } } -} +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 8def620529bb811a0d3e89dcac0b8c7aa8a42574..f3d2af9d966979243ab00e95f680efef0c848de8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -102,9 +102,9 @@ }, "dependencies": { "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" } } }, @@ -158,6 +158,11 @@ "type-is": "~1.6.17" } }, + "bowser": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.9.0.tgz", + "integrity": "sha512-2ld76tuLBNFekRgmJfT2+3j5MIrP6bFict8WAIT3beq+srz1gcKNAdNKMqHqauQt63NmAa88HfP1/Ypa9Er3HA==" + }, "boxen": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", @@ -214,6 +219,11 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" }, + "camelize": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", + "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=" + }, "capture-stack-trace": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz", @@ -293,6 +303,42 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, + "compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "requires": { + "mime-db": ">= 1.43.0 < 2" + }, + "dependencies": { + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + } + } + }, + "compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "requires": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "dependencies": { + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + } + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -335,6 +381,11 @@ "safe-buffer": "5.1.2" } }, + "content-security-policy-builder": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/content-security-policy-builder/-/content-security-policy-builder-2.1.0.tgz", + "integrity": "sha512-/MtLWhJVvJNkA9dVLAp6fg9LxD2gfI6R2Fi1hPmfjYXSahJJzcfvoeDOxSyp4NvxMuwWv3WMssE9o31DoULHrQ==" + }, "content-type": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", @@ -397,6 +448,11 @@ "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=" }, + "dasherize": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dasherize/-/dasherize-2.0.0.tgz", + "integrity": "sha1-bYCcnNDPe7iVLYD8hPoT1H3bEwg=" + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -453,6 +509,11 @@ "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz", "integrity": "sha1-6oCxBqh1OHdOijpKWv4pPeSJ4Kk=" }, + "dont-sniff-mimetype": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/dont-sniff-mimetype/-/dont-sniff-mimetype-1.1.0.tgz", + "integrity": "sha512-ZjI4zqTaxveH2/tTlzS1wFp+7ncxNZaIEWYg3lzZRHkKf5zPT/MnEG6WL0BhHMJUabkh8GeU5NL5j+rEUCb7Ug==" + }, "dot-prop": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", @@ -643,6 +704,11 @@ } } }, + "feature-policy": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/feature-policy/-/feature-policy-0.3.0.tgz", + "integrity": "sha512-ZtijOTFN7TzCujt1fnNhfWPFPSHeZkesff9AXZj+UEjYBynWNUIYpC87Ve4wHzyexQsImicLu7WsC2LHq7/xrQ==" + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -753,6 +819,72 @@ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" }, + "helmet": { + "version": "3.23.3", + "resolved": "https://registry.npmjs.org/helmet/-/helmet-3.23.3.tgz", + "integrity": "sha512-U3MeYdzPJQhtvqAVBPntVgAvNSOJyagwZwyKsFdyRa8TV3pOKVFljalPOCxbw5Wwf2kncGhmP0qHjyazIdNdSA==", + "requires": { + "depd": "2.0.0", + "dont-sniff-mimetype": "1.1.0", + "feature-policy": "0.3.0", + "helmet-crossdomain": "0.4.0", + "helmet-csp": "2.10.0", + "hide-powered-by": "1.1.0", + "hpkp": "2.0.0", + "hsts": "2.2.0", + "nocache": "2.1.0", + "referrer-policy": "1.2.0", + "x-xss-protection": "1.3.0" + }, + "dependencies": { + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + } + } + }, + "helmet-crossdomain": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/helmet-crossdomain/-/helmet-crossdomain-0.4.0.tgz", + "integrity": "sha512-AB4DTykRw3HCOxovD1nPR16hllrVImeFp5VBV9/twj66lJ2nU75DP8FPL0/Jp4jj79JhTfG+pFI2MD02kWJ+fA==" + }, + "helmet-csp": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/helmet-csp/-/helmet-csp-2.10.0.tgz", + "integrity": "sha512-Rz953ZNEFk8sT2XvewXkYN0Ho4GEZdjAZy4stjiEQV3eN7GDxg1QKmYggH7otDyIA7uGA6XnUMVSgeJwbR5X+w==", + "requires": { + "bowser": "2.9.0", + "camelize": "1.0.0", + "content-security-policy-builder": "2.1.0", + "dasherize": "2.0.0" + } + }, + "hide-powered-by": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/hide-powered-by/-/hide-powered-by-1.1.0.tgz", + "integrity": "sha512-Io1zA2yOA1YJslkr+AJlWSf2yWFkKjvkcL9Ni1XSUqnGLr/qRQe2UI3Cn/J9MsJht7yEVCe0SscY1HgVMujbgg==" + }, + "hpkp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hpkp/-/hpkp-2.0.0.tgz", + "integrity": "sha1-EOFCJk52IVpdMMROxD3mTe5tFnI=" + }, + "hsts": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/hsts/-/hsts-2.2.0.tgz", + "integrity": "sha512-ToaTnQ2TbJkochoVcdXYm4HOCliNozlviNsg+X2XQLQvZNI/kCHR9rZxVYpJB3UPcHz80PgxRyWQ7PdU1r+VBQ==", + "requires": { + "depd": "2.0.0" + }, + "dependencies": { + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + } + } + }, "http-errors": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", @@ -988,9 +1120,9 @@ "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha1-tEf2ZwoEVbv+7dETku/zMOoJdUg=" + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" }, "longest": { "version": "1.0.1", @@ -1101,9 +1233,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "morgan": { "version": "1.9.1", @@ -1143,6 +1275,11 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", "integrity": "sha1-/qz3zPUlp3rpY0Q2pkiD/+yjRvs=" }, + "nocache": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/nocache/-/nocache-2.1.0.tgz", + "integrity": "sha512-0L9FvHG3nfnnmaEQPjT9xhfN4ISk0A8/2j4M37Np4mcDesJjHgEUfgPhdCyZuFI954tjokaIj/A3NdpFNdEh4Q==" + }, "node-forge": { "version": "0.7.6", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.6.tgz", @@ -1636,6 +1773,11 @@ "picomatch": "^2.0.4" } }, + "referrer-policy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/referrer-policy/-/referrer-policy-1.2.0.tgz", + "integrity": "sha512-LgQJIuS6nAy1Jd88DCQRemyE3mS+ispwlqMk3b0yjZ257fI1v9c+/p6SD5gP5FGyXUIgrNOAfmyioHwZtYv2VA==" + }, "regenerator-runtime": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", @@ -2044,6 +2186,11 @@ "signal-exit": "^3.0.2" } }, + "x-xss-protection": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/x-xss-protection/-/x-xss-protection-1.3.0.tgz", + "integrity": "sha512-kpyBI9TlVipZO4diReZMAHWtS0MMa/7Kgx8hwG/EuZLiA6sg4Ah/4TRdASHhRRN3boobzcYgFRUFSgHRge6Qhg==" + }, "xdg-basedir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", diff --git a/package.json b/package.json index 2df854950e08a3f9e37eb6ff7ff44b94f786b621..6a35d13cb6a1166c8801bbd7cc21328ff600353e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "m4lab-user-account", "version": "0.0.1", - "description": "Example for PassportJS SAML strategy", + "description": "M4_LAB User Account", "author": { "name": "Rosanny Sihombing", "email": "rosanny.sihombing@hft-stuttgart.de", @@ -9,12 +9,11 @@ }, "keywords": [ "m4_lab", - "saml", - "sso" + "account" ], "repository": { "type": "git", - "url": "https://transfer.gitlab.com/tbd.git" + "url": "https://transfer.hft-stuttgart.de/gitlab/m4lab_tv1/user-account.git" }, "scripts": { "start": "nodemon app.js", @@ -24,6 +23,7 @@ "async": "^3.1.0", "bcryptjs": "^2.4.3", "body-parser": "^1.19.0", + "compression": "^1.7.4", "cookie-parser": "1.4.3", "crypto": "^1.0.1", "errorhandler": "1.4.3", @@ -32,6 +32,7 @@ "express-flash": "0.0.2", "express-session": "^1.17.0", "fs": "0.0.1-security", + "helmet": "^3.23.3", "i18n": "^0.8.5", "morgan": "^1.9.1", "mysql": "^2.17.1", diff --git a/routes/dbconn.js b/routes/dbconn.js index 834eb1aaa465674e73190ffc8d8809b2d28c3274..a39f7368e9872389db9b36555b87a92d40a6eb05 100644 --- a/routes/dbconn.js +++ b/routes/dbconn.js @@ -1,6 +1,6 @@ const mysql = require('mysql') -var env = process.env.NODE_ENV || 'development'; +var env = process.env.NODE_ENV || 'testing'; const config = require('../config/config')[env] // ==== USER ACOOUNT DB CONNECTION ==== diff --git a/routes/mailer.js b/routes/mailer.js index 510b5bb1d11e075f446cdf19b8a954411025ee38..2c51bd7d5ed5682bfdd9fa0c48788e1bd4affe19 100644 --- a/routes/mailer.js +++ b/routes/mailer.js @@ -1,6 +1,6 @@ const nodemailer = require('nodemailer') -var env = process.env.NODE_ENV || 'development'; +var env = process.env.NODE_ENV || 'testing'; const config = require('../config/config')[env] var smtpTransport = nodemailer.createTransport({ diff --git a/routes/methods.js b/routes/methods.js index 9864273b4322e89b4d4e3093f1979b4b8b01986b..91b75af3914ac3003c770446014828594c1c518e 100644 --- a/routes/methods.js +++ b/routes/methods.js @@ -42,14 +42,26 @@ var methods = { throw err }); } - // COMMIT - dbconn.user.commit(function(err) { + // MLAB-129: INSERT verification token + let verificationData = { + user_id: newUserId, + token: data.verificationToken + } + dbconn.user.query('INSERT INTO verification SET ?', verificationData, function (err, results, fields) { if (err) { return dbconn.user.rollback(function() { throw err }); } - }); + // COMMIT + dbconn.user.commit(function(err) { + if (err) { + return dbconn.user.rollback(function() { + throw err + }) + } + }) + }) }) }); }); @@ -57,7 +69,20 @@ var methods = { }) }, getUserByEmail: function(email, callback) { - dbconn.user.query('SELECT salutation, title, firstname, lastname, industry, organisation, speciality FROM user WHERE email = "' +email+'"', function (err, rows, fields) { + dbconn.user.query('SELECT verificationStatus, salutation, title, firstname, lastname, industry, organisation, speciality, m4lab_idp FROM user WHERE email = "' +email+'"', function (err, rows, fields) { + if (err) { + throw err; + } + else { + if ( rows.length > 0) { + user = rows[0]; + } + } + callback(user, err); + }); + }, + getUserById: function(userId, callback) { + dbconn.user.query('SELECT verificationStatus, email, salutation, title, firstname, lastname, industry, organisation, speciality FROM user WHERE id = ' +userId, function (err, rows, fields) { if (err) { throw err; } @@ -70,7 +95,7 @@ var methods = { }); }, checkUserEmail: function(email, callback) { - var user; + let user dbconn.user.query('SELECT id, email FROM user WHERE email = "' +email+'"', function (err, rows, fields) { if (err) { throw err; @@ -84,7 +109,7 @@ var methods = { }); }, getUserByToken: function(token, callback) { - var user; + let user dbconn.user.query('SELECT t1.user_id, t2.email FROM userdb.credential AS t1 INNER JOIN userdb.user AS t2 ON t1.user_id = t2.id AND t1.resetPasswordToken = "' +token+'" and resetPasswordExpires > '+Date.now(), function (err, rows, fields) { if (err) { @@ -100,75 +125,92 @@ var methods = { } ); }, - updateUser: function(userData, callback) { - dbconn.user.query('UPDATE user SET ? WHERE email = "' +userData.email+'"', userData, function (err, rows, fields) { - if (err) throw err; - callback(err); + updateUserById: function(userData, callback) { + dbconn.user.query('UPDATE user SET ? WHERE id = ' +userData.id, userData, function (err, rows, fields) { + if (err) throw err + callback(err) }) }, updateCredential: function(data, callback) { dbconn.user.query('UPDATE credential SET ? WHERE user_id = ' +data.user_id, data, function (err, rows, fields) { - if (err) throw err; - callback(err); + if (err) throw err + callback(err) }) }, getUserIdByEmail: function(email, callback) { - var userId + let userId dbconn.user.query('SELECT id FROM user WHERE email = "' +email+'"', function (err, rows, fields) { if (err) { - throw err; + throw err } else { if ( rows.length > 0) { - userId = rows[0].id; + userId = rows[0].id } } - callback(userId, err); + callback(userId, err) }); }, getUserProjectRole: function(userId, callback) { dbconn.user.query('SELECT project_id, role_id FROM user_project_role WHERE user_id = "' +userId+'"', function (err, rows, fields) { - if (err) throw err; - callback(rows, err); + if (err) throw err + callback(rows, err) }); }, addUserProjectRole: function(data, callback) { dbconn.user.query('INSERT INTO user_project_role SET ?', data, function (err, results, fields){ - if (err) throw err; - callback(err); - }) - }, - // ======================= project db ======================= - getAllProjects: function(callback) { - dbconn.project.query('CALL getAllprojects', function (err, rows, fields){ - if (err) throw err; - callback(rows[0], err); + if (err) throw err + callback(err) }) }, - getAllMailinglists: function(callback) { - dbconn.project.query('CALL getAllLists', function (err, rows, fields){ - if (err) throw err; - callback(rows[0], err); - }) - }, - getProjectOverviewById: function(projectId, callback) { - dbconn.project.query('CALL GetProjectInformationByProjectID(' + projectId+ ')', function (err, rows, fields){ - if (err) throw err; - callback(rows[0], err); - }) - }, - getProjectImagesById: function(projectId, callback) { - dbconn.project.query('CALL getImagesByProjectID(' + projectId+ ')', function (err, rows, fields){ - if (err) throw err; - callback(rows[0], err); + getVerificationTokenByUserId: function(userId, callback) { + let token + dbconn.user.query('SELECT token FROM verification WHERE user_id = "' +userId+'"', function (err, rows, fields) { + if (err) { + throw err + } + else { + if (rows.length > 0) { + token = rows[0].token + } + } + callback(token, err) }) }, - addProjectOverview: function(data, callback) { - dbconn.project.query('INSERT INTO project_overview SET ?', data, function (err, results, fields){ + getUserIdByVerificationToken: function(token, callback) { + let userId + dbconn.user.query('SELECT user_id FROM verification WHERE token = "' +token+'"', function (err, rows, fields) { if (err) { - console.error(err); + throw err } - callback(results, err); + else if(rows[0]) { + userId = rows[0].user_id + } + callback(userId, err) + }) + }, + verifyUserAccount: function(userData, callback) { + dbconn.user.beginTransaction(function(err) { // START TRANSACTION + if (err) { throw err } + // update user status + dbconn.user.query('UPDATE user SET ? WHERE id =' +userData.id, userData, function (err, rows, fields) { + if (err) { + return dbconn.user.rollback(function() { throw err }) + } + // delete verification token + dbconn.user.query('DELETE FROM verification WHERE user_id = '+userData.id, function (err, rows, fields) { + if (err) { + return dbconn.user.rollback(function() { throw err }) + } + // COMMIT + dbconn.user.commit(function(err) { + if (err) { + return dbconn.user.rollback(function() { throw err }) + } + }) + }) + }) + callback(err) }) } }; diff --git a/routes/routes-account.js b/routes/routes-account.js index 43394cac613791892e2b9bb950a3b827ec394e3a..5e6292c184384c7be83f5a244d5972b665fe23ce 100644 --- a/routes/routes-account.js +++ b/routes/routes-account.js @@ -22,6 +22,20 @@ module.exports = function (app, config, passport, i18n) { done(null, user); }); + const mailSignature = 'Mit den besten Grüßen,
das Transferportal-Team der HFT Stuttgart

' + + 'Transferportal der Hochschule für Technik Stuttgart
' + + 'Schellingstr. 24 70174 Stuttgart
' + + 'm4lab@hft-stuttgart.de
' + + 'https://transfer.hft-stuttgart.de
' + + 'HFT  ' + + 'Facebook  ' + + 'Instagram  ' + + 'Twitter  ' + + 'Youtube  ' + + '' + + 'Snapchat' + + '
' + var samlStrategy = new SamlStrategy({ // URL that goes from the Identity Provider -> Service Provider callbackUrl: config.passport.saml.path, @@ -86,13 +100,13 @@ module.exports = function (app, config, passport, i18n) { // ======== APP ROUTES - ACCOUNT ==================== var updatePasswordMailSubject = "Ihr Passwort für das Transferportal wurde gespeichert." - var mailSignature = "Mit den besten Grüßen,\ndas Transferportal-Team der HFT Stuttgart\n\n"+ - "Transferportal der Hochschule für Technik Stuttgart\n"+ - "Schellingstr. 24\n"+ - "70174 Stuttgart\n"+ - "m4lab@hft-stuttgart.de\n"+ - "https://transfer.hft-stuttgart.de" - var updatePasswordMailContent = "Lieber Nutzer,\n\n"+"Ihr Passwort wurde erfolgreich geändert.\n\n"+mailSignature + // var mailSignature = "Mit den besten Grüßen,\ndas Transferportal-Team der HFT Stuttgart\n\n"+ + // "Transferportal der Hochschule für Technik Stuttgart\n"+ + // "Schellingstr. 24\n"+ + // "70174 Stuttgart\n"+ + // "m4lab@hft-stuttgart.de\n"+ + // "https://transfer.hft-stuttgart.de" + var updatePasswordMailContent = '
Lieber Nutzer,

Ihr Passwort wurde erfolgreich geändert.

' + mailSignature + '
'; app.get('/', function (req, res) { if (req.isAuthenticated()) { @@ -142,10 +156,18 @@ module.exports = function (app, config, passport, i18n) { if (req.isAuthenticated()) { methods.getUserByEmail(req.user.email, function(data, err){ if (!err) { - res.render(lang+'/account/profile', { - user: data, - email: req.user.email - }); + if (data.verificationStatus == 1) { + console.log(data) + res.render(lang+'/account/profile', { + user: data, + email: req.user.email + }) + } + else { + res.render(lang+'/account/home', { + user: data + }); + } } }) } else { @@ -155,63 +177,79 @@ module.exports = function (app, config, passport, i18n) { app.get('/services', function (req, res) { if (req.isAuthenticated()) { - async.waterfall([ - // get userId by email from userdb - function(done) { - methods.getUserIdByEmail(req.user.email, function(userId, err) { - if (!err) { - done(err, userId) - } - }) - }, - // get user-project-role from userdb - function(userId, done) { - methods.getUserProjectRole(userId, function(userProjects, err) { - if (!err) { - done(err, userProjects) - } - }) - }, - // get all projects from projectdb - function(userProjects, done) { - methods.getAllProjects(function(projectsOverview, err) { - if (!err) { - done(err, userProjects, projectsOverview) - } - }) - }, - // 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) + methods.getUserByEmail(req.user.email, function(data, err){ + if (!err) { + if (data.verificationStatus == 1) { + res.render(lang+'/account/services', { + user: data + }); + /* !!! DO NOT DELETE. TEMPORARILY DISABLED FOR FUTURE USE. !!! + async.waterfall([ + // get userId by email from userdb + function(done) { + methods.getUserIdByEmail(req.user.email, function(userId, err) { + if (!err) { + done(err, userId) + } + }) + }, + // get user-project-role from userdb + function(userId, done) { + methods.getUserProjectRole(userId, function(userProjects, err) { + if (!err) { + done(err, userProjects) + } + }) + }, + // get all projects from projectdb + function(userProjects, done) { + methods.getAllProjects(function(projectsOverview, err) { + if (!err) { + done(err, userProjects, projectsOverview) + } + }) + }, + // 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) + } + + for (var i = 0; i < projectsOverview.length; i++) { + // check if projectId is exist in userProjectId[] + var status = false + if (userProjectId.indexOf(projectsOverview[i].id) > -1) { + status = true + } + // add data to JSON object + allProjects.push({ + id: projectsOverview[i].id, + title: projectsOverview[i].title, + summary: projectsOverview[i].onelinesummary, + cp: projectsOverview[i].contact_email, + userStatus: status + }); + } + + // render the page + res.render(lang+'/account/services', { + user: data, + project: allProjects + }); + } + ]) + */ } - - for (var i = 0; i < projectsOverview.length; i++) { - // check if projectId is exist in userProjectId[] - var status = false - if (userProjectId.indexOf(projectsOverview[i].id) > -1) { - status = true - } - // add data to JSON object - allProjects.push({ - id: projectsOverview[i].id, - title: projectsOverview[i].title, - summary: projectsOverview[i].onelinesummary, - cp: projectsOverview[i].contact_email, - userStatus: status + else { + res.render(lang+'/account/home', { + user: data }); } - - // render the page - res.render(lang+'/account/services', { - user: req.user, - project: allProjects - }); } - ]) + }) } else { res.redirect('/login'); } @@ -219,9 +257,20 @@ module.exports = function (app, config, passport, i18n) { app.get('/security', function (req, res) { if (req.isAuthenticated()) { - res.render(lang+'/account/security', { - user: req.user // useful for view engine, useless for HTML - }); + methods.getUserByEmail(req.user.email, function(data, err){ + if (!err) { + if (data.verificationStatus == 1 && data.m4lab_idp == 1) { + res.render(lang+'/account/security', { + user: data + }) + } + else { + res.render(lang+'/account/home', { + user: data + }); + } + } + }) } else { res.redirect('/login'); } @@ -316,7 +365,7 @@ module.exports = function (app, config, passport, i18n) { mailer.options.to = req.user.email //mailOptions.subject = "Your M4_LAB Password has been updated." mailer.options.subject = updatePasswordMailSubject - mailer.options.text = updatePasswordMailContent + mailer.options.html = updatePasswordMailContent mailer.transport.sendMail(mailer.options, function(err) { if (err) { console.log(err) @@ -372,12 +421,17 @@ module.exports = function (app, config, passport, i18n) { "Otherwise, you can reset your password using this link: http://m4lab.hft-stuttgart.de/account/reset/" + token + "\n" + "This password reset is only valid for 1 hour.\n\n"+ "Thanks,\nM4_LAB Team" */ - var emailContent = "Lieber Nutzer,\n\n"+ - "wir haben Ihre Anfrage zur Erneuerung Ihres Passwortes erhalten. Falls Sie diese Anfrage nicht gesendet haben, ignorieren Sie bitte diese E-Mail.\n\n"+ - "Sie können Ihr Passwort mit dem Klick auf diesen Link ändern: http://m4lab.hft-stuttgart.de/account/reset/" + token + "\n" + // test server - //"Sie können Ihr Passwort mit dem Klick auf diesen Link ändern: http://localhost:9989/reset/" + token + "\n" + // localhost - "Dieser Link ist aus Sicherheitsgründen nur für 1 Stunde gültig.\n\n"+mailSignature - + // var emailContent = "Lieber Nutzer,\n\n"+ + // "wir haben Ihre Anfrage zur Erneuerung Ihres Passwortes erhalten. Falls Sie diese Anfrage nicht gesendet haben, ignorieren Sie bitte diese E-Mail.\n\n"+ + // "Sie können Ihr Passwort mit dem Klick auf diesen Link ändern: http://m4lab.hft-stuttgart.de/account/reset/" + token + "\n" + // test server + // //"Sie können Ihr Passwort mit dem Klick auf diesen Link ändern: http://localhost:9989/reset/" + token + "\n" + // localhost + // "Dieser Link ist aus Sicherheitsgründen nur für 1 Stunde gültig.\n\n"+mailSignature + + var emailContent = '
Lieber Nutzer, Varun

' + + '

wir haben Ihre Anfrage zur Erneuerung Ihres Passwortes erhalten. Falls Sie diese Anfrage nicht gesendet haben, ignorieren Sie bitte diese E-Mail.

' + + 'Sie können Ihr Passwort mit dem Klick auf diesen Link ändern: http://m4lab.hft-stuttgart.de/account/reset/' + token + '
' + // test server + 'Dieser Link ist aus Sicherheitsgründen nur für 1 Stunde gültig.

' + mailSignature + '
'; + var credentialData = { user_id: user.id, resetPasswordToken: token, @@ -390,7 +444,7 @@ module.exports = function (app, config, passport, i18n) { // send email mailer.options.to = emailAddress; mailer.options.subject = emailSubject; - mailer.options.text = emailContent; + mailer.options.html = emailContent; mailer.transport.sendMail(mailer.options, function(err) { done(err, 'done'); }); @@ -453,7 +507,7 @@ module.exports = function (app, config, passport, i18n) { // send notifiaction email mailer.options.to = user.email mailer.options.subject = updatePasswordMailSubject - mailer.options.text = updatePasswordMailContent + mailer.options.html = updatePasswordMailContent mailer.transport.sendMail(mailer.options, function(err) { if (err) { console.log(err) @@ -474,16 +528,11 @@ module.exports = function (app, config, passport, i18n) { }); - // todo: user registration with captcha + // ============= NEW USERS REGISTRATION =========================== app.get('/registration', function(req, res) { res.render(lang+'/account/registration') }) - app.post('/registration', function(req, res) { - // TODO: - // create gitlab account? - // send email to activate profile? - // user data var curDate = new Date() var userData = { @@ -497,27 +546,179 @@ module.exports = function (app, config, passport, i18n) { speciality: req.body.inputSpeciality, createdDate: curDate.toISOString().slice(0,10) } - // encrypt password - bcrypt.genSalt(saltRounds, function(err, salt) { - bcrypt.hash(req.body.inputPassword, salt, function(err, hash) { - // create account - var newAccount = { - profile: userData, - password: hash + + var userEmail = userData.email + var pos = userEmail.indexOf('@') + var emailLength = userEmail.length + var emailDomain = userEmail.slice(pos, emailLength); + + if ( emailDomain.toLowerCase() == "@hft-stuttgart.de") { + req.flash('error', "Fehlgeschlagen: HFT-Account") + res.redirect('/account/registration'); + } + else { + let token + async.waterfall([ + function(done) { + crypto.randomBytes(20, function(err, buf) { + token = buf.toString('hex'); + done(err, token); + }); + }, + // encrypt password + function(token, done) { + bcrypt.genSalt(saltRounds, function(err, salt) { + bcrypt.hash(req.body.inputPassword, salt, function(err, hash) { + var newAccount = { + profile: userData, + password: hash, + verificationToken: token + } + done(err, newAccount) + }); + }); + }, + // save data + function(newAccount, err) { + methods.registerNewUser(newAccount, function(err){ + if (err) { + req.flash('error', "Fehlgeschlagen") + } + else { + // send email + var emailSubject = "Bitte bestätigen Sie Ihr M4_LAB Benutzerkonto" + // var emailContent = "Lieber Nutzer,\n\n"+ + // "vielen Dank für Ihre Anmeldung am Transferportal der HFT Stuttgart.\n"+ + // "Um Ihre Anmeldung zu bestätigen, klicken Sie bitte diesen Link: "+config.app.host+"/verifyAccount?token="+token+"\n"+ + // "Ohne Bestätigung Ihres Kontos müssen wir Ihr Konto leider nach 7 Tagen löschen.\n\n"+ + // "Sollten Sie sich selbst nicht mit Ihren Daten am Transferportal registriert haben, ignorieren Sie diese E-Mail bitte.\n\n"+mailSignature + var emailContent = '
Lieber Nutzer,

' + + '

vielen Dank für Ihre Anmeldung am Transferportal der HFT Stuttgart.
' + + 'Um Ihre Anmeldung zu bestätigen, klicken Sie bitte diesen Link: ' + config.app.host + '/verifyAccount?token=' + token + + '

' + + 'Ohne Bestätigung Ihres Kontos müssen wir Ihr Konto leider nach 7 Tagen löschen.


' + mailSignature + + '
'; + mailer.options.to = req.body.inputEmail; + mailer.options.subject = emailSubject; + mailer.options.html = emailContent; + mailer.transport.sendMail(mailer.options, function(err) { + if (err) { + console.log('cannot send email') + throw err + } + }) + // user feedback + req.flash('success', 'Vielen Dank für Ihre Registrierung!'+'\r\n\r\n'+ + 'Wir haben Ihnen eine E-Mail an Ihre verwendete Adresse gesendet. Diese enthält einen Link zur Bestätigung Ihres Accounts.'+'\r\n'+ + 'Wenn Sie die Mail nicht in ihrem Postfach vorfinden, prüfen Sie bitte auch Ihren Spam-Ordner.') + } + res.redirect('/account/registration') + }) + } + ]) + } + }) + + // ============= USER VERIFICATION ================================ + app.get("/verifyAccount", function(req, res){ + console.log(req.query) + methods.getUserIdByVerificationToken(req.query.token, function(userId, err){ + if (userId) { + let userData = { + id: userId, + verificationStatus: 1 } - methods.registerNewUser(newAccount, function(err){ + methods.verifyUserAccount(userData, function(err){ if (err) { - //req.flash('error', "Failed") - req.flash('error', "Fehlgeschlagen") + console.log("Error: "+err) + res.render(lang+'/account/verification', { + status: false + }); } else { - //req.flash('success', 'Your account has been created. Please log in.') - req.flash('success', 'Ihr Benutzerkonto wurde angelegt. Bitte melden Sie sich an.') + // send welcome email after successful account verification + methods.getUserById(userId, function(data, err){ + if (err) { + console.log("Error: "+err) + } + else { + // send email + var emailSubject = "Herzlich willkommen" + // var emailContent = "Lieber Nutzer,\n\n"+ + // "herzlich willkommen beim Transferportal der HFT Stuttgart!\n"+ + // "Sie können nun alle Dienste des Portals nutzen.\n\n"+mailSignature + var emailContent = '
Lieber Nutzer,

' + + '

herzlich willkommen beim Transferportal der HFT Stuttgart!
' + + 'Sie können nun alle Dienste des Portals nutzen.


' + mailSignature; + mailer.options.to = data.email; + mailer.options.subject = emailSubject; + mailer.options.html = emailContent; + mailer.transport.sendMail(mailer.options, function(err) { + if (err) { + console.log('cannot send email') + throw err + } + }) + } + }) + + res.render(lang+'/account/verification', { + status: true + }); } - res.redirect('/account/registration'); }) - }); - }); + } + else { + res.render(lang+'/account/verification', { + status: null + }); + } + }) + }) + app.get("/resendVerificationEmail", function(req, res){ + if (req.isAuthenticated()) { + var emailAddress = req.user.email + + methods.getUserIdByEmail(req.user.email, function(userId, err) { + if (!err) { + // get token + methods.getVerificationTokenByUserId(userId, function(token, err){ + if (!err) { + if (token) { + // send email + var emailSubject = "Bitte bestätigen Sie Ihr M4_LAB Benutzerkonto" + // var emailContent = "Lieber Nutzer,\n\n"+ + // "vielen Dank für Ihre Anmeldung am Transferportal der HFT Stuttgart. "+ + // "\nUm Ihre Anmeldung zu bestätigen, klicken Sie bitte diesen Link: "+config.app.host+"/verifyAccount?token="+token+ + // "\n\nOhne Bestätigung Ihres Kontos müssen wir Ihr Konto leider nach 7 Tagen löschen.\n\n"+mailSignature + var emailContent = '

Lieber Nutzer,

' + + '

vielen Dank für Ihre Anmeldung am Transferportal der HFT Stuttgart.
' + + 'Um Ihre Anmeldung zu bestätigen, klicken Sie bitte diesen Link: ' + config.app.host + '/verifyAccount?token=' + token + + '

' + + 'Ohne Bestätigung Ihres Kontos müssen wir Ihr Konto leider nach 7 Tagen löschen.


' + mailSignature + + '
'; + mailer.options.to = emailAddress; + mailer.options.subject = emailSubject; + mailer.options.html = emailContent; + mailer.transport.sendMail(mailer.options, function(err) { + if (err) { + console.log('cannot send email') + throw err + } + }) + res.send(true) + } + else { + res.send(false) + } + } + else { + console.log(err) + } + }) + } + }) + } }) app.get('/email/:email', function(req, res) { diff --git a/routes/routes-project.js b/routes/routes-project.js deleted file mode 100644 index d34bab483d73e2db2a259a6290b000caadbe2755..0000000000000000000000000000000000000000 --- a/routes/routes-project.js +++ /dev/null @@ -1,362 +0,0 @@ -const methods = require('./methods') -const async = require('async') -const helpers = require('./helpers') - -const pictSizeLimit = 1000000 // 1 MB - -module.exports = function (app) { - - // ======== APP ROUTES - PROJECT ==================== - var lang = 'DE' - - app.get('/mailinglists', function (req, res) { - async.waterfall([ - function(done) { - methods.getAllMailinglists(function(mailinglistOverview, err) { - if (!err) { - done(err, mailinglistOverview) - } - }) - }, - // create JSON object of mailinglists for front-end - function(mailinglistOverview, done) { - var allMailingLists = [] // JSON object - for (let i = 0; i < mailinglistOverview.length; i++) { - // add data to JSON object - allMailingLists.push({ - id: mailinglistOverview[i].id, - name: mailinglistOverview[i].name, - src: mailinglistOverview[i].src, - projectstatus: mailinglistOverview[i].projectstatus, - project_title: mailinglistOverview[i].project_title, - keywords: mailinglistOverview[i].keywords - }); - } - - res.render(lang+'/project/mailinglists', { - isUserAuthenticated: req.isAuthenticated(), - user: req.user, - mailinglists: allMailingLists - }); - } - ]) - }); - - app.get('/project_', function (req, res) { - async.waterfall([ - // get all projects from projectdb - function(done) { - methods.getAllProjects(function(projectsOverview, err) { - if (!err) { - done(err, projectsOverview) - } - }) - }, - // create JSON object for front-end - function(projectsOverview, done) { - var activeProjects = [] - var nonActiveProjects = [] - - for (var i = 0; i < projectsOverview.length; i++) { - var project = { - id: projectsOverview[i].id, - logo: projectsOverview[i].logo, - akronym: projectsOverview[i].pname, - title: projectsOverview[i].title, - summary: projectsOverview[i].onelinesummary, - category: projectsOverview[i].category, - cp: projectsOverview[i].contact_email, - gitlab: projectsOverview[i].gitlab - } - if (projectsOverview[i].projectstatus == 0) { - nonActiveProjects.push(project) - } - else if (projectsOverview[i].projectstatus == 1) { - activeProjects.push(project) - } - } - - // render the page - if (req.isAuthenticated()) { - res.render(lang+'/project/projects', { - isUserAuthenticated: true, - nonActive: nonActiveProjects, - active: activeProjects - }); - } - else { - res.render(lang+'/project/projects', { - isUserAuthenticated: false, - nonActive: nonActiveProjects, - active: activeProjects - }); - } - } - ]) - }) - - app.get('/project', function (req, res) { - res.render(lang+'/project/project-simplified', { - isUserAuthenticated: req.isAuthenticated(), - user: req.user - }); - }) - - app.get('/addprojectoverview', function (req, res) { - if (req.isAuthenticated()) { - res.render(lang+'/project/addProjectOverview') - } - else { - res.redirect('/login') - } - }) - - app.post('/addprojectoverview__', function (req, res) { - if (req.isAuthenticated()) { - var wiki = 0 - if (req.body.wiki) - wiki = 1 - - 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, - gitlab: req.body.gitlabURL, - wiki: wiki, - overview: req.body.overview, - question: req.body.question, - approach: req.body.approach, - result: req.body.result, - keywords: req.body.keywords, - announcement: req.body.announcement, - term: projectTerm, - further_details: req.body.furtherDetails, - website: req.body.website, - src: req.body.src, - caption: req.body.caption, - contact_lastname: req.body.contactName, - contact_email: req.body.contactEmail, - leader_lastname: req.body.leaderName, - leader_email: req.body.leaderEmail - } - - methods.addProjectOverview(projectOverviewData, function(err){ - if (err) { - //req.flash('error', "Failed") - req.flash('error', "Fehlgeschlagen") - res.redirect('/addProjectOverview'); - } - else { - req.flash('success', 'Your project has been created.') - res.redirect('/project'); - } - }) - } - }) - - app.post('/addprojectoverview', function (req, res) { - if (req.isAuthenticated()) { - var wiki = 0 - 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: projectLogoPath, - gitlab: req.body.gitlabURL, - wiki: wiki, - overview: req.body.overview, - question: req.body.question, - approach: req.body.approach, - result: req.body.result, - keywords: req.body.keywords, - announcement: req.body.announcement, - term: projectTerm, - further_details: req.body.furtherDetails, - website: req.body.website, - src: projectPicturePath, - caption: req.body.caption, - contact_lastname: req.body.contactName, - contact_email: req.body.contactEmail, - leader_lastname: req.body.leaderName, - 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. - */ - var userId // todo: make this global variable? - async.waterfall([ - // get userId by email from userdb - function(done) { - methods.getUserIdByEmail(req.user.email, function(id, err) { - if (!err) { - userId = id - done(err) - } - }) - }, - // add project overview - function(done) { - methods.addProjectOverview(projectOverviewData, function(data, err){ - if (err) { - res.status(500).render(lang+'/500', { - error: err - }) - } - else { - done(err, data.insertId) - } - }) - }, - // assign the created overview to logged-in user - function(projectOverviewId, done) { - var userProjectRoleData = { - project_id: projectOverviewId, - user_id: userId, - role_id: 3 // OVERVIEW_CREATOR - } - methods.addUserProjectRole(userProjectRoleData, function(userProjects, err) { - if (err) { - //req.flash('error', "Failed") - req.flash('error', "Fehlgeschlagen") - res.redirect('/addProjectOverview'); - } - else { - req.flash('success', 'Your project has been created.') - res.redirect('/project'); - } - }) - } - ]) - } - }) - - app.get('/updateprojectoverview', function (req, res) { - // only their own project - }) - - app.post('/updateprojectoverview', function (req, res) { - // only their own project - }) - - app.get('/projectoverview', function(req, res){ - async.waterfall([ - function(done) { - methods.getProjectOverviewById(req.query.projectID, function(projectOverview, err) { - if (!err) { - done(err, projectOverview) - } - }) - }, - function(projectOverview,done){ - methods.getProjectImagesById(req.query.projectID, function(projectImages, err) { - if (!err) { - done(err, projectImages, projectOverview) - } - }) - }, - // render projectOverview page - function(projectImages, projectOverview, done) { - - console.log(projectImages); - partnerWebsites = helpers.stringToArray(projectOverview[0].partner_website); - partnerNames = helpers.stringToArray(projectOverview[0].partner_name); - awardSites = helpers.stringToArray(projectOverview[0].award_website); - awardNames = helpers.stringToArray(projectOverview[0].award_name); - sponsorWebsites = helpers.stringToArray(projectOverview[0].sponsor_website); - sponsorImgs = helpers.stringToArray(projectOverview[0].sponsor_img); - sponsorNames = helpers.stringToArray(projectOverview[0].sponsor_name); - - res.render(lang+'/project/projectOverview', { - isUserAuthenticated: req.isAuthenticated(), - user: req.user, - projectOV: projectOverview, - projectImgs: projectImages, - partnerWS: partnerWebsites, - partnerN: partnerNames, - awardWS: awardSites, - awardN: awardNames, - sponsorWS: sponsorWebsites, - sponsorIMG: sponsorImgs, - sponsorN: sponsorNames - }); - } - ]) - }) - - app.get('/videoconferences', function(req, res){ - res.render(lang+'/project/videoconferences', { - isUserAuthenticated: req.isAuthenticated(), - user: req.user, - }); - }) - - app.get('/landingpage', function(req, res){ - res.render(lang+'/project/landingpage', { - isUserAuthenticated: req.isAuthenticated(), - user: req.user, - }); - }) -}; \ No newline at end of file diff --git a/views/DE/404.pug b/views/DE/404.pug index c4178253b9cec40907906ccd33fc39ac6e85c990..5a16f0863287e4c4728d22cb6b594203d1fd9edc 100644 --- a/views/DE/404.pug +++ b/views/DE/404.pug @@ -4,7 +4,7 @@ html(lang="de") title= "404 - Page not found" 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") style. .container { height: 400px; diff --git a/views/DE/500.pug b/views/DE/500.pug index 704573397c7252fc0a8034428da47602afa9b994..aea0e76c327decde492f063feeac5a7a364a9ac4 100644 --- a/views/DE/500.pug +++ b/views/DE/500.pug @@ -4,7 +4,7 @@ html(lang="de") title= "500 - Internal Server Error" 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") style. .container { height: 400px; diff --git a/views/DE/account/contact.pug b/views/DE/account/contact.pug index 25e4dc9c402ef556088b707e1bbe2ce99b41c2a5..67107cf97428ed9e4eff11d8b5de2f7802b11d9f 100644 --- a/views/DE/account/contact.pug +++ b/views/DE/account/contact.pug @@ -4,34 +4,13 @@ html(lang="de") 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="/css/m4lab.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", type="text/css", href="/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") diff --git a/views/DE/account/forgotPwd.pug b/views/DE/account/forgotPwd.pug index 46210a02d8c8cbbafed3ed8e9b65b3c086ad8246..75390a804545e10751dac8bf6b08502b3ce29caa 100644 --- a/views/DE/account/forgotPwd.pug +++ b/views/DE/account/forgotPwd.pug @@ -4,30 +4,10 @@ html(lang="de") title= "Forgot Password" 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", type="text/css", href="/css/bootstrap.min.css") + link(rel="stylesheet", type="text/css", href="/css/m4lab.css") + link(rel="stylesheet", type="text/css", href="/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-fluid") div(class="row") diff --git a/views/DE/account/home.pug b/views/DE/account/home.pug index fa11d3f7d186ba91c1f1bccae8307e5602df3e24..54c4ced06d6cc73a0282137f68510d4b75cf2a22 100644 --- a/views/DE/account/home.pug +++ b/views/DE/account/home.pug @@ -4,38 +4,49 @@ html(lang="de") title= "User Account" 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="/css/m4lab.css") link(rel="stylesheet", href="https://use.fontawesome.com/releases/v5.8.2/css/all.css", integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay", crossorigin="anonymous") body - div(class="container-fluid") - div(class="row min-vh-100 flex-column flex-md-row") - aside(class="col-12 col-md-2 p-0 flex-shrink-1") - nav(class="navbar navbar-expand flex-md-column flex-row align-items-start py-2") - div(class="collapse navbar-collapse") - ul(class="flex-md-column flex-row navbar-nav w-100 justify-content-between") - li(class="nav-item") - a(class="nav-link pl-0 text-nowrap" href="#") - span(class="font-weight-bold" style="color:black;") #{user.firstname} #{user.lastname} - li(class="nav-item") - a(class="nav-link pl-0" href="/account/profile") - i(class="fa fa-user fa-fw") - span(class="d-none d-md-inline") Benutzerprofil - li(class="nav-item") - a(class="nav-link pl-0" href="/account/security") - i(class="fa fa-lock fa-fw") - span(class="d-none d-md-inline") Sicherheitseinstellungen - li(class="nav-item") - a(class="nav-link pl-0" href="/account/services") - i(class="fa fa-tasks fa-fw") - span(class="d-none d-md-inline") Projekte und Dienste - li(class="nav-item") - a(class="nav-link pl-0" href="/logout") - i(class="fa fa-sign-out-alt fa-fw") - span(class="d-none d-md-inline") Logout - main(class="col bg-faded py-3 flex-grow-1") - p Willkommen im Benutzerkonto-Bereich des HFT Transferportals - p In diesem Bereich können Sie Ihr Benutzerkonto pflegen.
Dazu finden Sie auf der linken Seite verschiedene Menüs. - p Bei Rückfragen kontaktieren Sie uns bitte unter: support-transfer@hft-stuttgart.de + div(class="container") + if user.verificationStatus == 0 + div.alert.alert-warning.alert-dismissible + | Willkommen im Benutzerkonto-Bereich des HFT Transferportals + |

+ | Wir haben Ihnen eine E-Mail an Ihre verwendete Adresse gesendet. Diese enthält einen Link zur Bestätigung Ihres Accounts. + | Wenn Sie die Mail nicht in ihrem Postfach vorfinden, prüfen Sie bitte auch Ihren Spam-Ordner. + |
Falls Sie keine E-Mail von uns erhalten haben, können Sie diese hier erneut anfordern. + div(class="spinner-border text-secondary", role="status", style="display: none") + else + div(class="row min-vh-100 flex-column flex-md-row") + aside(class="col-12 col-md-3 p-0 flex-shrink-1") + nav(class="navbar navbar-expand flex-md-column flex-row align-items-start py-2") + div(class="collapse navbar-collapse") + ul(class="flex-md-column flex-row navbar-nav w-100 justify-content-between") + li(class="nav-item") + a(class="nav-link pl-0 text-nowrap" href="#") + span(class="font-weight-bold" style="color:black;") #{user.firstname} #{user.lastname} + li(class="nav-item") + a(class="nav-link pl-0" href="/account/profile") + i(class="fa fa-user fa-fw") + span(class="d-none d-md-inline") Benutzerprofil + if user.m4lab_idp == 1 + li(class="nav-item") + a(class="nav-link pl-0" href="/account/security") + i(class="fa fa-lock fa-fw") + span(class="d-none d-md-inline") Sicherheitseinstellungen + li(class="nav-item") + a(class="nav-link pl-0" href="/account/services") + i(class="fa fa-tasks fa-fw") + span(class="d-none d-md-inline") Projekte und Dienste + li(class="nav-item") + a(class="nav-link pl-0" href="/logout" style="color:red;") + i(class="fa fa-sign-out-alt fa-fw") + span(class="d-none d-md-inline") Logout + main(class="col bg-faded py-3 flex-grow-1") + p Willkommen im Benutzerkonto-Bereich des HFT Transferportals + p In diesem Bereich können Sie Ihr Benutzerkonto pflegen.
Dazu finden Sie auf der linken Seite verschiedene Menüs. + p Bei Rückfragen kontaktieren Sie uns bitte unter: support-transfer@hft-stuttgart.de // jQuery script(src="https://code.jquery.com/jquery-3.3.1.min.js") @@ -43,4 +54,25 @@ html(lang="de") // 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") \ No newline at end of file + script(src="https://m4lab.hft-stuttgart.de/js/headfoot.js") + script. + // call verifyAccount + function verify() { + $(".spinner-border").show() + $.get( "/resendVerificationEmail", function( data ) { + console.log(data) + if (data) { + alert( "Email sent!" ) + } + else { + alert("Please contact support-transfer@hft-stuttgart.de to verify your account.") + } + }) + .fail(function() { + alert( "Something went wrong. Please try again." ) // todo: to DE + }) + .always(function() { + $(".spinner-border").hide() + }) + + } \ No newline at end of file diff --git a/views/DE/account/profile.pug b/views/DE/account/profile.pug index 12f789894c9c8b1348e41bf12e12cd5c81d9433c..190fc1c7a9ff7c900a8bf2e55065865cf954ab27 100644 --- a/views/DE/account/profile.pug +++ b/views/DE/account/profile.pug @@ -4,32 +4,34 @@ html(lang="de") title= "User Profile" 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="/css/m4lab.css") link(rel="stylesheet", href="https://use.fontawesome.com/releases/v5.8.2/css/all.css", integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay", crossorigin="anonymous") body - div(class="container-fluid") + div(class="container") div(class="row min-vh-100 flex-column flex-md-row") - aside(class="col-12 col-md-2 p-0 flex-shrink-1") + aside(class="col-12 col-md-3 p-0 flex-shrink-1") nav(class="navbar navbar-expand flex-md-column flex-row align-items-start py-2") div(class="collapse navbar-collapse") ul(class="flex-md-column flex-row navbar-nav w-100 justify-content-between") li(class="nav-item") - a(class="nav-link pl-0 text-nowrap" href="#") + a(class="nav-link pl-0 text-nowrap" href="/account/") span(class="font-weight-bold" style="color:black;") #{user.firstname} #{user.lastname} li(class="nav-item") a(class="nav-link pl-0" href="/account/profile") i(class="fa fa-user fa-fw" style="color:black;") span(class="d-none d-md-inline" style="color:black;") Benutzerprofil - li(class="nav-item") - a(class="nav-link pl-0" href="/account/security") - i(class="fa fa-lock fa-fw") - span(class="d-none d-md-inline") Sicherheitseinstellungen + if user.m4lab_idp == 1 + li(class="nav-item") + a(class="nav-link pl-0" href="/account/security") + i(class="fa fa-lock fa-fw") + span(class="d-none d-md-inline") Sicherheitseinstellungen li(class="nav-item") a(class="nav-link pl-0" href="/account/services") i(class="fa fa-tasks fa-fw") span(class="d-none d-md-inline") Projekte und Dienste li(class="nav-item") - a(class="nav-link pl-0" href="/logout") + a(class="nav-link pl-0" href="/logout" style="color:red;") i(class="fa fa-sign-out-alt fa-fw") span(class="d-none d-md-inline") Logout main(class="col bg-faded py-3 flex-grow-1") @@ -45,7 +47,7 @@ html(lang="de") div(class="form-row") div(class='form-group col-md-2') label(for="title") Anrede - select#inputSalutation(name="inputSalutation", class="form-control", , value=user.salutation) + select#inputSalutation(name="inputSalutation", class="form-control", value=user.salutation) option(value="") - Anrede - option(value="Herr") Herr option(value="Frau") Frau @@ -99,4 +101,4 @@ html(lang="de") // 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") \ No newline at end of file + script(src="https://m4lab.hft-stuttgart.de/js/headfoot.js") \ No newline at end of file diff --git a/views/DE/account/registration.pug b/views/DE/account/registration.pug index 3de3ed5a731a614fc8baa4eea95465e98a6df82f..39fc405de3a0a70555a373cc94e01fdd16cdad10 100644 --- a/views/DE/account/registration.pug +++ b/views/DE/account/registration.pug @@ -4,29 +4,10 @@ html(lang="de") title= "Create New Account" 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="/css/m4lab.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; - } .warning { color: red; font-size: 11px; @@ -34,9 +15,12 @@ html(lang="de") body div(class="container-fluid") div(class="row") - div(class="col-md-6 offset-md-2") + div(class="pt-4 pb-4 col-md-6 offset-md-2") h3(class="mb-3 font-weight-bold") Neues Benutzerkonto anlegen div(class="col-md-6 offset-md-3") + div(class="alert alert-info" role="alert") + | Auf dieser Seite können sich Benutzer, die keinen Account an der HFT haben, registrieren.
+ | Um sich mit ihrem HFT-Account anzumelden, klicken Sie hier. if successes for success in successes div.alert.alert-success.alert-dismissible #{ success } @@ -46,7 +30,7 @@ html(lang="de") div.alert.alert-danger.alert-dismissible.fade.show #{ error } a(class="close", href="#", data-dismiss="alert", aria-label="close") × form(method="POST") - h5(class="mb-3 font-weight-bold") Anmeldedaten + h5(class="pt-2 mb-3 font-weight-bold") Anmeldedaten div(class='form-row') div(class='form-group col-md-6') input#inputEmail(name="inputEmail", type="email", class="form-control", placeholder="E-Mail-Adresse*", maxlength="45" required) @@ -54,7 +38,7 @@ html(lang="de") div(class="form-group col-md-6") input#inputPassword(name="inputPassword", type="password", class="form-control", data-toggle="password", placeholder="Passwort*", maxlength="45" required) span#passwordWarning(class='warning') - h5(class="mb-3 font-weight-bold") Benutzerprofil + h5(class="pt-2 mb-3 font-weight-bold") Benutzerprofil div(class="form-row") div(class='form-group col-md-2') select#inputSalutation(name="inputSalutation", class="form-control") @@ -94,4 +78,4 @@ html(lang="de") // M4_LAB script(src="/js/generalFunction.js") script(src="/js/registration.js") - script(src="/js/headfoot.js") \ No newline at end of file + script(src="https://m4lab.hft-stuttgart.de/js/headfoot.js") \ No newline at end of file diff --git a/views/DE/account/reset.pug b/views/DE/account/reset.pug index 56aa2d9220f06e178f93b0f985d187d61938828c..a6ef872a20e5f0c4c1345bc0dcc0b9a1779e5416 100644 --- a/views/DE/account/reset.pug +++ b/views/DE/account/reset.pug @@ -4,30 +4,10 @@ html(lang="de") title= "Reset Password" 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", type="text/css", href="/css/bootstrap.min.css") + link(rel="stylesheet", type="text/css", href="/css/m4lab.css") + link(rel="stylesheet", type="text/css", href="/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-fluid") div(class="row") diff --git a/views/DE/account/security.pug b/views/DE/account/security.pug index 15c438871580fd7d9edc0ffdfef78a0bbc531827..81da0660528ec831556790aa9b89f34ada1758b1 100644 --- a/views/DE/account/security.pug +++ b/views/DE/account/security.pug @@ -4,21 +4,22 @@ html(lang="de") title= "User Profile" 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="/css/m4lab.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. .warning { font-size: 11px; } body - div(class="container-fluid") + div(class="container") div(class="row min-vh-100 flex-column flex-md-row") - aside(class="col-12 col-md-2 p-0 flex-shrink-1") + aside(class="col-12 col-md-3 p-0 flex-shrink-1") nav(class="navbar navbar-expand flex-md-column flex-row align-items-start py-2") div(class="collapse navbar-collapse") ul(class="flex-md-column flex-row navbar-nav w-100 justify-content-between") li(class="nav-item") - a(class="nav-link pl-0 text-nowrap" href="#") + a(class="nav-link pl-0 text-nowrap" href="/account/") span(class="font-weight-bold" style="color:black;") #{user.firstname} #{user.lastname} li(class="nav-item") a(class="nav-link pl-0" href="/account/profile") @@ -33,7 +34,7 @@ html(lang="de") i(class="fa fa-tasks fa-fw") span(class="d-none d-md-inline") Projekte und Dienste li(class="nav-item") - a(class="nav-link pl-0" href="/logout") + a(class="nav-link pl-0" href="/logout" style="color:red;") i(class="fa fa-sign-out-alt fa-fw") span(class="d-none d-md-inline") Logout main(class="col bg-faded py-3 flex-grow-1") @@ -64,7 +65,7 @@ html(lang="de") span#message div(class="invalid-feedback") Bitte füllen Sie dieses Feld aus. input#updateBtn(type="submit", class="btn btn-primary", value="Passwort ändern" disabled) - + // 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") @@ -73,7 +74,7 @@ html(lang="de") // M4_LAB script(src="/js/security.js") script(src="/js/generalFunction.js") - script(src="/js/headfoot.js") + script(src="https://m4lab.hft-stuttgart.de/js/headfoot.js") script. // check input fields 'use strict'; diff --git a/views/DE/account/services.pug b/views/DE/account/services.pug index 8b99f630e68a19498f6f833937b1296b580c962e..a2015cd9d0140148031bdfb8b22d954176f63413 100644 --- a/views/DE/account/services.pug +++ b/views/DE/account/services.pug @@ -4,32 +4,34 @@ html(lang="de") title= "User Profile" 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="/css/m4lab.css") link(rel="stylesheet", href="https://use.fontawesome.com/releases/v5.8.2/css/all.css", integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay", crossorigin="anonymous") body - div(class="container-fluid") + div(class="container") div(class="row min-vh-100 flex-column flex-md-row") - aside(class="col-12 col-md-2 p-0 flex-shrink-1") + aside(class="col-12 col-md-3 p-0 flex-shrink-1") nav(class="navbar navbar-expand flex-md-column flex-row align-items-start py-2") div(class="collapse navbar-collapse") ul(class="flex-md-column flex-row navbar-nav w-100 justify-content-between") li(class="nav-item") - a(class="nav-link pl-0 text-nowrap" href="#") + a(class="nav-link pl-0 text-nowrap" href="/") span(class="font-weight-bold" style="color:black;") #{user.firstname} #{user.lastname} li(class="nav-item") a(class="nav-link pl-0" href="/account/profile") i(class="fa fa-user fa-fw") span(class="d-none d-md-inline") Benutzerprofil - li(class="nav-item") - a(class="nav-link pl-0" href="/account/security") - i(class="fa fa-lock fa-fw") - span(class="d-none d-md-inline") Sicherheitseinstellungen + if user.m4lab_idp == 1 + li(class="nav-item") + a(class="nav-link pl-0" href="/account/security") + i(class="fa fa-lock fa-fw") + span(class="d-none d-md-inline") Sicherheitseinstellungen li(class="nav-item") a(class="nav-link pl-0" href="/account/services") i(class="fa fa-tasks fa-fw" style="color:black;") span(class="d-none d-md-inline" style="color:black;") Projekte und Dienste li(class="nav-item") - a(class="nav-link pl-0" href="/logout") + a(class="nav-link pl-0" href="/logout" style="color:red;") i(class="fa fa-sign-out-alt fa-fw") span(class="d-none d-md-inline") Logout main(class="col bg-faded py-3 flex-grow-1") @@ -41,4 +43,4 @@ html(lang="de") // 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") \ No newline at end of file + script(src="https://m4lab.hft-stuttgart.de/js/headfoot.js") \ No newline at end of file diff --git a/views/DE/account/verification.pug b/views/DE/account/verification.pug new file mode 100644 index 0000000000000000000000000000000000000000..10cdea0812ca6fe472167f50d21809057929ad3c --- /dev/null +++ b/views/DE/account/verification.pug @@ -0,0 +1,36 @@ +doctype html +html(lang="de") + head + title= "User Verification" + 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="/css/bootstrap.min.css") + link(rel="stylesheet", type="text/css", href="/css/m4lab.css") + style. + .container { + height: 400px; + position: relative; + } + .center { + margin: 0; + position: absolute; + top: 50%; + left: 50%; + -ms-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + } + body + div(class="container") + div(class="center", align="center") + a(href="https://m4lab.hft-stuttgart.de") + img(src="https://transfer.hft-stuttgart.de/images/demo/m4lab_logo.jpg", class="img-responsive center-block", width="185", height="192") + br + br + if status == true + p(class="h5") Ihr Benutzerkonto wurde bestätigt. Bitte melden Sie sich an. + else if status == false + p(class="h5") Ihr Benutzerkonto konnte nicht bestätigt werden, bitte versuchen Sie es erneut. + else + p(class="h5") Ihr Benutzerkonto wude nicht gefunden. + // Bootstrap + script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous") \ No newline at end of file diff --git a/views/DE/project/addProjectOverview.pug b/views/DE/project/addProjectOverview.pug deleted file mode 100644 index f6517d29faccb116a9e7345b04084ca0a86e53d5..0000000000000000000000000000000000000000 --- a/views/DE/project/addProjectOverview.pug +++ /dev/null @@ -1,143 +0,0 @@ -doctype html -html(lang="de") - head - title= "Add Project Overview" - 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", href="https://use.fontawesome.com/releases/v5.8.2/css/all.css", integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay", crossorigin="anonymous") - // jQuery UI - Datepicker - link(rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css") - 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; - } - .warning { - color: red; - font-size: 11px; - } - body - div(class="container-fluid") - div(class="row") - div(class="col-md-6 offset-md-2") - h4(class="mb-3 font-weight-bold") Neues Projekt - div(class="col-md-6 offset-md-3") - 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") × - form(method="POST" encType="multipart/form-data") - div(class='form-row') - div(class='form-group col-md-12') - input#inputPname(name="title" class="form-control" type="text" placeholder="Projekttitel*" required) - div(class="form-group col-md-12") - input#inputTitle(name="pname" class="form-control" type="text" placeholder="Akronym*" required) - div(class="form-group col-md-12") - input#inputSummary(name="summary" class="form-control" type="text" placeholder="Kurzbeschreibung") - div(class='form-group col-md-12') - select#inputCategory(name="category", class="form-control") - option(value="") - Projektkategorie - - option(value="Experten-Gruppe") Experten-Gruppe - option(value="Student-Projekt") Student-Projekt - option(value="Lehr Projekt") Lehr Projekt - option(value="Transfer-projekt") Transfer-projekt - div(class="form-group col-md-12") - div(class='form-group row') - label(for="projectLogo" class="col-sm-3 col-form-label") Projektlogo (max. 1 MB) - div(class="col-md-9") - input#inputLogo(name="logo" class="form-control" type="file") - div(class="form-group col-md-12") - div(class="input-group mb-3") - input#inputGitlabURL(name="gitlabURL" type="text" class="form-control" placeholder="M4_LAB GitLab Project URL, z.B. https://transfer.hft-stuttgart.de/gitlab/username/projectname") - div(class="input-group-prepend") - div(class="input-group-text") - input#inputWiki(name="wiki" type="checkbox") - |   Wiki - - h5(class="mb-3 font-weight-bold") Inhalte - div(class='form-row') - div(class='form-group col-md-12') - textarea#inputOverview(name="overview" class="form-control" type="text" rows="5" placeholder="Projektüberblick") - div(class="form-group col-md-12") - textarea#inputQuestion(name="question" class="form-control" type="text" rows="5" placeholder="Fragestellung") - div(class='form-group col-md-12') - textarea#inputApproach(name="approach" class="form-control" type="text" rows="5" placeholder="Vorgehensweise") - div(class="form-group col-md-12") - textarea#inputResult(name="result" class="form-control" type="text" rows="5" placeholder="Ergebnis und Nutzung") - div(class="form-group col-md-12") - input#inputKeywords(name="keywords" class="form-control" type="text" placeholder="keywords") - h5(class="mb-3 font-weight-bold") Projektinformationen - div(class='form-row') - div(class='form-group col-md-12') - input#inputAnnouncement(name="announcement" class="form-control" type="text" rows="5" placeholder="Ausschreibung") - div(class="form-group col-md-12") - div(class='form-group row') - label(for="projectLogo" class="col-sm-2 col-form-label") Laufzeit - div(class="col-md-5") - input#inputTermFrom(name="termForm" class="form-control" type="text" placeholder="von (dd.mm.yyyy)") - div(class="col-md-5") - input#inputTermTo(name="termTo" class="form-control" type="text" placeholder="bis (dd.mm.yyyy)") - div(class='form-group col-md-12') - textarea#inputFurtherDetails(name="furtherDetails" class="form-control" type="text" rows="5" placeholder="Weitere Informationen (bspw. Links zu Berichten)") - div(class="form-group col-md-12") - input#inputWebsite(name="website" class="form-control" type="text" placeholder="Projekt-Website") - h5(class="mb-3 font-weight-bold") Bilder - div(class='form-row') - div(class="form-group col-md-12") - div(class='form-group row') - label(for="projectPicture" class="col-sm-3 col-form-label") Projektbild (max. 1 MB) - div(class="col-md-9") - input#inputSrc(name="src" class="form-control" type="file") - div(class="form-group col-md-12") - input#inputCaption(name="caption" class="form-control" type="text" placeholder="Bildunterschrift/Bildquelle") - h5(class="mb-3 font-weight-bold") Kontakt - div(class='form-row') - div(class="form-group col-md-2") -

Ansprechperson

- div(class="form-group col-md-5") - input#inputContactName(name="contactName" class="form-control" type="text" placeholder="Anrede, Titel, Vorname, Nachname") - div(class="form-group col-md-5") - input#inputContactEmail(name="contactEmail" class="form-control" type="email" placeholder="E-Mail-Adresse") - div(class="form-group col-md-2") -

Projektleitung

- div(class="form-group col-md-5") - input#inputLeaderName(name="leaderName" class="form-control" type="text" placeholder="Anrede, Titel, Vorname, Nachname") - div(class="form-group col-md-5") - input#inputLeaderEmail(name="leaderEmail" class="form-control" type="email" placeholder="E-Mail-Adresse") - p * Pflichtfeld - input#submitBtn(type="submit", class="btn btn-outline-dark btn-block", value="Projekt Anlegen") - - // 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") - // jQuery UI - Datepicker - script(src="https://code.jquery.com/ui/1.12.1/jquery-ui.js") - script(src="/js/jquery-ui/i18n/datepicker-de.js") - //script(src="i18n/datepicker-de.js") - // Bootstrap - script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous") - // Header - script(src="/js/headfoot.js") - script. - $( function() { - $.datepicker.setDefaults( $.datepicker.regional["de"] ); - $("#inputTermFrom").datepicker(); - $("#inputTermTo").datepicker(); - }); \ No newline at end of file diff --git a/views/DE/project/landingpage.html b/views/DE/project/landingpage.html deleted file mode 100644 index d9c19d49a9b7381e7a43cd7d7d6842e22663945f..0000000000000000000000000000000000000000 --- a/views/DE/project/landingpage.html +++ /dev/null @@ -1,68 +0,0 @@ - - -
- -
-
-

-

Als innovative Hochschule wollen wir den Wandel in der Gesellschaft zukunftsfähig und verantwortungsvoll mitgestalten.

-
-

Unser Ziel ist die Beantwortung gesellschaftlich relevanter Zukunftsfragen.

- - Diese bearbeiten wir durch Forschungs-, Innovations- und Transferprojekte und entwickeln dabei anwendungsbezogene Lösungen. - Als Impulsgeber ermöglichen wir den Transfer innovativer Ideen, indem wir Kooperationen fördern und Räume für kreativen Austausch schaffen. -
- Dabei verknüpfen wir unsere Expertise mit Partnern innerhalb und außerhalb der Region Stuttgart. Wir informieren und involvieren Interessierte und Beteiligte durch die unterschiedlichsten Events und Formate. -
-

Willst du dabei sein?

- - Dann findest du unter Informationen mehr über unsere Expertise, Projekte, Publikationen und Lösungen. -
- Erfahre mehr über unsere Events und über die Möglichkeiten zur Zusammenarbeit. -

-
-
- - - - -
\ No newline at end of file diff --git a/views/DE/project/landingpage.pug b/views/DE/project/landingpage.pug deleted file mode 100644 index a835ec04d9823d0f847956b9bf6012eaf92b083f..0000000000000000000000000000000000000000 --- a/views/DE/project/landingpage.pug +++ /dev/null @@ -1,47 +0,0 @@ -doctype html -html(lang="de") - head - title= "Project List" - 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", 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; - } - .warning { - color: red; - font-size: 11px; - } - body - include landingpage.html - - - // 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") - // Header - if isUserAuthenticated - script(src="/js/headfootLogout.js") - else - script(src="/js/headfoot.js") \ No newline at end of file diff --git a/views/DE/project/mailinglists.pug b/views/DE/project/mailinglists.pug deleted file mode 100644 index c38c8042e3dead88fbbf9febf47439d6258e1eab..0000000000000000000000000000000000000000 --- a/views/DE/project/mailinglists.pug +++ /dev/null @@ -1,99 +0,0 @@ -html(lang="de") - head - title= "Mailinglisten" - meta(charset="UTF-8") - meta(name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no") - link(rel="stylesheet", type="text/css", href="https://transfer.hft-stuttgart.de/css/bootstrap/bootstrap.css") - link(rel="stylesheet", href="https://use.fontawesome.com/releases/v5.8.2/css/all.css", integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay", crossorigin="anonymous") - link(rel="stylesheet" href="/fonts/ionicons.min.css") - link(rel="stylesheet" href="assets/css/Testimonials.css") - 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/Mailinglisten.jpg" width="100%") - div(class="container") - div(class="row") - div(class="col-md-12" style="margin-bottom: 30px;") - h4(class="text-center") Durch Mailinglisten können Sie interessierten Personen
regelmäßig Informationen zu Ihrem Projekt oder Thema zukommen lassen.
Ebenso können Sie über ein Abonnement in einer Mailingliste Mitglied des Verteilers
werden und so im Austausch bleiben.
- div(class="col-md-12" style="margin-bottom: 30px;") - h2(class="text-center" style="color: #708090;") Aktive Mailinglisten - div(class="table-responsive table-borderless") - table(class="table table-striped table-bordered table-hover") - thead() - tr() - th Name - th Zum Abonnement der Mailingliste - th Zum zugehörigen Projekt - th Keywords - tbody() - for item in mailinglists - if item.projectstatus == '1' - tr - td #{item.name} - td #{item.src} - td #{item.project_title} - td #{item.keywords} - div(id="aboText" style="background-color: #dadada;margin-top: 40px;") - div(class="container") - div(class="row" style="margin-bottom: 0;padding-top: 20px;padding-bottom: 20px;") - div(class="col-lg-12" style="background-color: #ffffff;") - h2(class="text-center" style="color: #708090;margin-top: 15px;") Mailingliste abonnieren - div(class="col-md-4 col-lg-6" style="background-color: #ffffff;") - p() Das Deutsche Forschungsnetz (DFN) bietet Mailinglisten für Wissenschaft und Forschung an. Mailinglisten sind E-Mail-Verteilerlisten, d.h. Personen, die sich für Ihr Forschungsthema interessieren, können sich über das DFN registrieren und erhalten im Anschluss daran regelmäßig die über die Mailinglisten geteilten Informationen. - p() Sie als Verteiler senden die zu versendende Mail folglich nur noch an die festgelegte Mailinglistenadresse und das Programm leitet die Nachricht an alle registrierten Personen weiter. - div(class="col-md-4 col-lg-6 justify-content-between flex-wrap" style="background-color: #ffffff;") - div(class="justify-content-between order-2" style="background-color: rgba(255,255,255,0);") - p(class="text-left d-flex d-md-flex flex-row flex-grow-1 flex-shrink-1 flex-fill justify-content-between align-items-start align-content-start align-self-start flex-wrap order-1 justify-content-md-center align-items-md-start justify-content-lg-start") Oben finden Sie eine Übersicht über die aktiven Mailinglisten. Wenn Sie sich in eine Mailingliste eintragen wollen, dann klicken Sie auf den entsprechend hinterlegten Link. - p() Es öffnet sich daraufhin die Hauptseite der Liste. Nach der Auswahl des Buttons "Abonnieren", können Sie Ihre Mailadresse hinterlegen und sich in die Liste eintragen. - a(class="btn btn-primary text-center d-inline-flex d-lg-flex flex-column flex-grow-1 flex-shrink-1 flex-fill justify-content-between align-items-baseline align-content-center align-self-baseline flex-wrap order-3 justify-content-md-center align-items-md-end align-items-lg-center justify-content-xl-center mx-auto" role="button" style="background-color: #E0001B; margin-top:10px; margin-bottom:10px;" href="/downloads/Handout_Mailinglisten_Abonnieren.pdf") Erste Schritte (Anleitung als PDF) - a(class="btn btn-primary text-center d-inline-flex d-lg-flex flex-column flex-grow-1 flex-shrink-1 flex-fill justify-content-between align-items-baseline align-content-center align-self-baseline flex-wrap mb-auto justify-content-md-center align-items-md-end align-items-lg-center justify-content-xl-center mx-auto" role="button" style="background-color: #E0001B;" href="https://www.listserv.dfn.de/sympa/help") Weitergehende Dokumentation bei DFN (externer Link) - - div(id="newListText" style="background-color: #dadada;margin-top: 0px;") - div(class="container") - div(class="row" style="margin-bottom: 0;padding-top: 20px;padding-bottom: 20px;") - div(class="col-lg-12" style="background-color: #ffffff;") - h2(class="text-center" style="color: #708090;margin-top: 15px;") Neue Mailingliste erstellen - div(class="col-md-4 col-lg-6" style="background-color: #ffffff;") - p() Über das Transferportal können Sie selbst eine Liste zu Ihrem Projekt anlegen, um mit Ihren Partnern in Verbindung zu bleiben. - p() Folgen Sie hierzu der Anleitung des DFN. - - div(class="col-md-4 col-lg-6" style="background-color: #ffffff;") - a(class="btn btn-primary text-center d-inline-flex d-lg-flex flex-column flex-grow-1 flex-shrink-1 flex-fill justify-content-between align-items-baseline align-content-center align-self-baseline flex-wrap justify-content-md-center align-items-md-end align-items-lg-center justify-content-xl-center mx-auto" role="button" style="background-color: #E0001B; margin-top:10px; margin-top:10px;" href="/downloads/Handout_Mailinglisten_Erstellen.pdf") Erste Schritte (Anleitung als PDF) - a(class="btn btn-primary text-center d-lg-flex justify-content-center align-items-center align-content-center align-self-center align-items-lg-end mx-auto" role="button" style="background-color: #E0001B;" href="https://www.listserv.dfn.de/sympa/help/admin") Gesamtes Tutorial bei DFN (externer Link) - - div(id="addListText" style="background-color: #dadada;margin-top: 0px;") - div(class="container") - div(class="row" style="margin-bottom: 0;padding-top: 20px;padding-bottom: 20px;") - div(class="col-lg-12" style="background-color: #ffffff;") - h2(class="text-center" style="color: #708090;margin-top: 15px;") Neue Mailingliste eintragen - div(class="col-xl" style="background-color: #ffffff;") - p() Um Ihre beim DFN angelegte Mailingliste hier aufzunehmen, schicken Sie uns bitte eine Email an support-transfer@hft-stuttgart.de - // 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") - // Header - script(src="/js/headfoot.js") \ No newline at end of file diff --git a/views/DE/project/project-simplified.pug b/views/DE/project/project-simplified.pug deleted file mode 100644 index cb868f9ab04683fb3d9c4d4cd5c514c91083f284..0000000000000000000000000000000000000000 --- a/views/DE/project/project-simplified.pug +++ /dev/null @@ -1,51 +0,0 @@ -doctype html -html(lang="de") - head - title= "Project List" - 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", href="https://use.fontawesome.com/releases/v5.8.2/css/all.css", integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay", crossorigin="anonymous") - style. - .help .card-title > a:before { - float: right !important; - content: "-"; - padding-right: 5px; - } - .help .card-title > a.collapsed:before { - float: right !important; - content: "+"; - } - .help h3 > a { - color: #708090; - text-decoration: none; - display: block; - } - .help a { - display: inline; - } - .help .card > .card-header { - color: #fff; - } - .card-title { - margin-bottom: 0.5rem; - margin-top: 0.5rem; - } - #infoicon { - color: #708090; - } - .heading { - color: #708090; - } - body - include project.html - - - // 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") - // Header - script(src="/js/headfoot.js") diff --git a/views/DE/project/project.html b/views/DE/project/project.html deleted file mode 100644 index 505ba83a5326fd3c1ac7a9972a2a1af5b7a1374a..0000000000000000000000000000000000000000 --- a/views/DE/project/project.html +++ /dev/null @@ -1,220 +0,0 @@ -
-
-
-
-
-
-
-
-
-
-
-

Diese Seite bietet den Einstieg zu den Inhalten der unterschiedlichen Projekte, - die über das Portal zur Verfügung gestellt werden.

-
-
-
-
-
-
-
-
-
- -
-

Open-Source-/ Open-Data-Projekte

-

Für die Veröffentlichung von Open-Source-Projekten steht Ihnen eine von der HFT - Stuttgart selbstverwaltete Gitlab-Instanz bereit. -

- Eine Übersicht der aktuellen Open-Source-/Open-Data-Projekte erreichen Sie über diesen - Link zu den Gitlab-Projekten.
-

-
-
-
- -
-

Andere Projekte

-

Aktuell unterstützt das Transferportal Projekte, die einer Open-Source bzw. - Open-Data-Lizenz - unterliegen. Die Gründe hierfür liegen in den Lizenzbedingungen unserer Gitlab-Instanz als - Plattform. -

- Künftig möchten wir auch andere Projekttypen unterstützen. Es soll dann beispielsweise möglich sein, - Projektergebnisse zu veröffentlichen ohne die dazugehörigen Quellcodes oder Rohdaten offenzulegen. -

- Wir entwickeln das Portal kontinuierlich weiter und prüfen dabei auch andere Plattformen zur - Nutzung. -

-
-
-
-
- -
-

Falls Sie mehr über die - Weiterentwicklung des Portals - erfahren wollen oder sich mit Anregungen auch aktiv einbringen - wollen, regen wir an, unsere Mailingliste - transferportalhft zu abonnieren. Sie können uns aber auch - jederzeit - direkt unter Kontakt anschreiben. -

-
-
-
- - - - - - -
- -
- -

Hilfestellung zu GitLab

- -
- -
-
- -
-

- Dann klicken Sie auf diesen - Link zu den Gitlab-Projekten - um die Liste aller im Gitlab erfassten Projekte zu sehen. Vor dort können Sie dann auf die einzelnen - Projekte zugreifen. - Ein Anmelden am Portal ist dazu nicht nötig. -

-
-
- -
- -
- -
-

- Sie können mittels Issues dem Projekteigentümer eine Rückmeldung geben bzw. einen Fehler melden. - Darüberhinaus können Sie sich auch aktiv beteiligen. Dazu müssen Sie im Portal als Nutzer - registriert sein. -

-

- Wenn Sie noch kein Benutzerkonto haben, klicken Sie bitte oben auf den Link Benutzerkonto und folgen - Sie dem System durch die Registrierungsprozedur. -

-

- Haben Sie ein Benutzerkonto, befolgen Sie bitte folgende Schritte: -

-
    -
  1. - Folgen Sie dem - Link zu den Gitlab-Projekten, um zum Gitlab zu - gelangen. -
  2. -
  3. - Melden Sie sich bei Gitlab an, indem Sie im Gitlab auf den Link Sign-In klicken. -
  4. -
  5. - Sie werden dann auf eine Anmeldeseite von unserem Portal geführt. Geben Sie dort bitte ihre - Benutzerdaten vom Portal ein. -
  6. -
  7. - Nach erfolgreichem Anmelden werden Sie zum Gitlab zurückgeführt. -
  8. -
  9. - Navigieren Sie dann zum Projekt Ihrer Wahl. -
  10. -
  11. - Abhängig davon wie der Projekteigentümer das Projekt konfiguriert hat, können Sie entweder - direkt loslegen, oder Sie müssen zunächst noch beim Projekteigentümer Zugang zum Projekt - anfragen, indem Sie im Gitlab bei der entsprechende Projektseite auf den Link Request Access - klicken. -
  12. -
-
-
- -
- -
- -
-

- Vorraussetzung dazu ist, dass Sie aktives oder ehemaliges Mitglied der Hochschule für Technik sind, - d.h. eine (noch) gültige HFT-Emailadresse haben, und zudem im Portal als Nutzer registriert sein. -

-

- Wenn Sie noch kein Benutzerkonto haben, klicken Sie bitte oben auf den Link Benutzerkonto und folgen - Sie dem System durch die Registrierungsprozedur. -

-

- Haben Sie ein Benutzerkonto, befolgen Sie bitte folgende Schritte: -

-
    -
  1. - Folgen Sie dem - Link zu den Gitlab-Projekten, um zum Gitlab zu - gelangen. -
  2. -
  3. - Melden Sie sich bei Gitlab an, indem Sie im Gitlab auf den Link Sign-In klicken. -
  4. -
  5. - Sie werden dann auf eine Anmeldeseite von unserem Portal geführt. Geben Sie dort bitte ihre - Benutzerdaten vom Portal ein. -
  6. -
  7. - Nach erfolgreichem Anmelden werden Sie zum Gitlab zurückgeführt. -
  8. -
  9. - Erstellen Sie dann in Gitlab ein neues Projekt durch Klicken auf den grünen New Project-Knopf - und anschließendem Befolgen der Eingabemaske von Gitlab. -
  10. -
-

- Weitere Hilfestellung zum Anlegen von Projekten in Gitlab finden Sie in der Gitlab-Dokumentation. -

-

- Hinweis: Um Inhalte zum Gitlab "pushen" zu können, verwendet die Gitlab-Instanz unseres Portals die - s.g. "SSH Keys". - Weitere Informationen dazu finden Sie in der - Gitlab-Dokumentation zu SSH Keys. -

-
-
-
- -
- -
\ No newline at end of file diff --git a/views/DE/project/projectOverview.pug b/views/DE/project/projectOverview.pug deleted file mode 100644 index e015d1e650c22ff70c32feda6ebff7d2edd7b3b2..0000000000000000000000000000000000000000 --- a/views/DE/project/projectOverview.pug +++ /dev/null @@ -1,162 +0,0 @@ -doctype html -html(lang="de") - head - title= "Project List" - 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", 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; - } - .warning { - color: red; - font-size: 11px; - } - body - div - for project in projectOV - div(class="flex-container") - div(class="main") - h1 #{project.title} - div(style="float:right; margin-left:30px; margin-bottom:0px; width:50%;") - img(src=project.src, width="100%") - p(style="text-align:right") #{project.caption} - - h2 Projektüberblick - p !{project.overview} - br - b keywords: - span #{project.keywords} - br - h2 Fragestellung - p !{project.question} - p - h2 Vorgehensweise - p !{project.approach} - br - br - h2 Ergebnis und Nutzung - p !{project.result} - div(class="side") - for image in projectImgs - if image.pos == '2' || image.pos == '3' - div(class="projectimg") - - if image.caption - span #{image.caption} - - - div(class="fakeimg") - if project.leader_lastname - p - b Projektleitung HfT:   - #{project.leader_lastname} - div(class="fakeimg") - if project.contact_lastname - p - b Ansprechperson:   - #{project.contact_lastname} - div(class="fakeimg") - if project.announcement - p - b Ausschreibung:   - span !{project.announcement} - - div(class="fakeimg") - if project.partner_name - p - b Projektpartner: - br - for website, i in partnerWS - if website - #{partnerN[i]} - br - else - #{partnerN[i]} - br - - div(class="fakeimg") - if project.term - p - b Projektlaufzeit:   - span #{project.term} - - div(class="fakeimg") - if project.award_name - p - b Preise: - br - for awardsite, i in awardWS - if awardsite - #{awardN[i]} - br - else - #{awardN[i]} - br - - div(class="fakeimg") - if project.administrator - p - b Projektträger:   - span #{project.administrator} - - div(class="fakeimg") - if project.sponsor_name - p - b Geldgeber: - br - for website, i in sponsorWS - if website - #{sponsorN[i]} - br - else - #{sponsorN[i]} - br - - div(class="fakeimg") - if project.website || project.further_details - p - b Mehr Informationen:   - if project.website - #{project.website} - br - span !{project.further_details} - - if project.pname == 'M4LAB' - div(class="Downloads" style="height:200px;") - h5 Downloads - - div(class="Projektlogos") - img(src="./images/M4_LAB_Projekt/WRS_Logo.jpg" width="32%") - img(src="./images/M4_LAB_Projekt/IBA2027_Logo.jpg" width="32%") - img(src="./images/M4_LAB_Projekt/GWK_Logo.jpg" width="32%") - br - br - img(src="./images/M4_LAB_Projekt/Innovative_Hochschule_Initiative_BMBF_GWK_RGB.png" width="100%") - - //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") - // Header - script(src="/js/headfoot.js") \ No newline at end of file diff --git a/views/DE/project/projects.pug b/views/DE/project/projects.pug deleted file mode 100644 index c2730b807aa30e4e7446275dc791777989f1c30b..0000000000000000000000000000000000000000 --- a/views/DE/project/projects.pug +++ /dev/null @@ -1,114 +0,0 @@ -doctype html -html(lang="de") - head - title= "Project List" - 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", 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; - } - .warning { - color: red; - font-size: 11px; - } - body - div(class="container-fluid") - if isUserAuthenticated - p Auf dieser Seite sehen Sie die Liste der über dieses Portal veröffentlichten Projekte. - a(href="/addprojectoverview" class="btn btn-primary" role="button" aria-pressed="true") Projekt anlegen - else - p Auf dieser Seite sehen Sie die Liste der über dieses Portal veröffentlichten Projekte. - p Möchten Sie ein neues Projekt anlegen, dann klicken Sie bitte auf #[a(href="/addprojectoverview") Anmelden und Projekt anlegen] - if successes - for success in successes - div.alert.alert-success.alert-dismissible #{ success } - a(class="close", href="#", data-dismiss="alert", aria-label="close") × - // Active projects - h3(class="mb-3 font-weight-bold") Aktive Projekte - table(class="table table-striped") - thead - tr - th Logo - th Akronym - th Title - th Kernziel - th Kategorie - th Ansprechpartner - th Projektinhalte - tbody - for item in active - tr - //td #{item.status} - td - img(src=item.logo, width="40", height="40") - td #{item.akronym} - td #{item.title} - td #{item.summary} - td #{item.category} - td #[a(class="nav-link", href="mailto:"+ item.cp) #{item.cp}] - td #[a(class="nav-link", href="https://m4lab.hft-stuttgart.de/projectoverview?projectID="+item.id) Zur Projektübersicht] - if item.gitlab - a(class="nav-link", href="https://transfer.hft-stuttgart.de/gitlab/"+item.gitlab+"/tree/master") Projektdateien - a(class="nav-link", href="https://transfer.hft-stuttgart.de/gitlab/"+item.gitlab+"/wikis/home") Projektwiki - else - a(class="nav-link", href="#") Projektdateien - a(class="nav-link", href="#") Projektwiki - br - // Non-active projects - h3(class="mb-3 font-weight-bold") Abgeschlossene Projekte - table(class="table table-striped") - thead - tr - th Logo - th Akronym - th Title - th Kernziel - th Kategorie - th Ansprechpartner - th Projektinhalte - tbody - for item in nonActive - tr - //td #{item.status} - td - img(src=item.logo, width="40", height="40") - td #{item.akronym} - td #{item.title} - td #{item.summary} - td #{item.category} - td #[a(class="nav-link", href="mailto:"+ item.cp) #{item.cp}] - td #[a(class="nav-link", href="https://m4lab.hft-stuttgart.de/projectoverview?projectID="+item.id) Zur Projektübersicht] - if item.gitlab - a(class="nav-link", href="https://transfer.hft-stuttgart.de/gitlab/"+item.gitlab+"/tree/master") Projektdateien - a(class="nav-link", href="https://transfer.hft-stuttgart.de/gitlab/"+item.gitlab+"/wikis/home") Projektwiki - else - a(class="nav-link", href="#") Projektdateien - a(class="nav-link", href="#") Projektwiki - - // 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") - // Header - script(src="/js/headfoot.js") \ No newline at end of file diff --git a/views/DE/project/videoconferences.pug b/views/DE/project/videoconferences.pug deleted file mode 100644 index e6ee7b6907023ec96a97b4e4345c72d94587491e..0000000000000000000000000000000000000000 --- a/views/DE/project/videoconferences.pug +++ /dev/null @@ -1,67 +0,0 @@ -doctype html -html(lang="de") - head - title= "Project List" - 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", 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; - } - .warning { - color: red; - font-size: 11px; - } - body - div(class="flex-container") - div(class="main") - h1 Videokonferenzen - - p Wir bieten grundsätzlich zwei Möglichkeiten an, Viodeokonferenzen abzuhalten: - - h2 Jitsi - - p - Jitsi ist ein Opensource Videokonferenz-System, welches es ermöglicht, direkt über den Browser Videokonferenzen abzuhalten. - br - span Da die Hauptlast bei diesem System Clientseitig getragen wird, raten wir zu einer Nutzung auf Desktopsystemen bzw. Laptops. - - p Um eine Videokonferenz starten zu können, muss sich zunächst ein Organisator am Portal anmelden und die Videokonferenz eröffnen. Weitere Teilnehmer können dann ohne Anmeldung einfach über einen Link hinzugefügt werden. - - p Der Zugang zu Jitsi findet sich hier - - h2 GoToMeeting - - p Eine weitere Option, die wir anbieten werden, ist die Organisation von Videokonferenzen via GoToMeeting - - p Mehr Informationen darüber erhalten Sie zu gegebener Zeit an dieser Stelle - - - - - //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") - // Header - script(src="/js/headfoot.js") \ No newline at end of file diff --git a/views/EN/account/forgotPwd.pug b/views/EN/account/forgotPwd.pug index 1cde0888090e2046496e472178d2d296a6f8c647..985793b02c8551de670b8d7e05851d81ce6f648f 100644 --- a/views/EN/account/forgotPwd.pug +++ b/views/EN/account/forgotPwd.pug @@ -4,8 +4,8 @@ html(lang="en") title= "Forgot Password" 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", type="text/css", href="/css/bootstrap.css") + link(rel="stylesheet", type="text/css", href="/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 { diff --git a/views/EN/account/home.pug b/views/EN/account/home.pug index d2f3875a5a831fde499fae7baddb5acfbd47e34d..df71fe1840f6c5bd6be7cf0ba88e320669129905 100644 --- a/views/EN/account/home.pug +++ b/views/EN/account/home.pug @@ -4,7 +4,7 @@ html(lang="en") title= "User Account" 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.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 { diff --git a/views/EN/account/profile.pug b/views/EN/account/profile.pug index 47c1f7e8683e370e2fb368337c4fca5d419230fe..60788795491df06cca87c2faa1c76465c6f6f47c 100644 --- a/views/EN/account/profile.pug +++ b/views/EN/account/profile.pug @@ -4,7 +4,7 @@ html(lang="en") title= "User Profile" 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.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 { diff --git a/views/EN/account/registration.pug b/views/EN/account/registration.pug index 88ef5a932c510753f110253fec986dd426f6896f..2e1aba4c72ce4001e89aad36138ac9218b4e4c93 100644 --- a/views/EN/account/registration.pug +++ b/views/EN/account/registration.pug @@ -4,7 +4,7 @@ html(lang="en") title= "Create New Account" 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.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 { diff --git a/views/EN/account/reset.pug b/views/EN/account/reset.pug index b8939ea2200d627786fa64a8feae03da02d5b346..606b304f69f9a56a5ac414cb2869179c2a311f8e 100644 --- a/views/EN/account/reset.pug +++ b/views/EN/account/reset.pug @@ -4,8 +4,8 @@ html(lang="en") title= "Reset Password" 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", type="text/css", href="/css/bootstrap.css") + link(rel="stylesheet", type="text/css", href="/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 { diff --git a/views/EN/account/security.pug b/views/EN/account/security.pug index 2a5c248ce1f9e98b429b52eb9261f322cd38fcf9..c2c997b0ececb95abc04617a40ce0fd373b88ea1 100644 --- a/views/EN/account/security.pug +++ b/views/EN/account/security.pug @@ -4,7 +4,7 @@ html(lang="en") title= "User Profile" 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.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 { diff --git a/views/EN/account/services.pug b/views/EN/account/services.pug index f095144beb05de603a741230ae857d11b543b3f9..c70d729fa83da0e81bf5d82058008a5b14b9d3d5 100644 --- a/views/EN/account/services.pug +++ b/views/EN/account/services.pug @@ -4,7 +4,7 @@ html(lang="en") title= "User Profile" 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.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 { diff --git a/views/EN/error.pug b/views/EN/error.pug deleted file mode 100644 index bf750c0087880c06604b3d1bc9bb1bfe8e522372..0000000000000000000000000000000000000000 --- a/views/EN/error.pug +++ /dev/null @@ -1,6 +0,0 @@ -html - head - title Error - body - h1 An error occurred! - block content \ No newline at end of file diff --git a/views/EN/layout.pug b/views/EN/layout.pug deleted file mode 100644 index 32d27e01d25d57838d7c44edf1de5f54b7568fdf..0000000000000000000000000000000000000000 --- a/views/EN/layout.pug +++ /dev/null @@ -1,12 +0,0 @@ -doctype html -html - head - title PassportJS SAML example - block links - link(rel='stylesheet', href='bower_components/bootstrap/dist/css/bootstrap.css') - body - div.container - block content - script(src='bower_components/jquery/dist/jquery.min.js') - script(src='bower_components/bootstrap/dist/js/bootstrap.min.js') - block scripts diff --git a/views/EN/project/addProjectOverview.pug b/views/EN/project/addProjectOverview.pug deleted file mode 100644 index 7b40b54fc63b3d774caf8d0b8af272f4e3a554ce..0000000000000000000000000000000000000000 --- a/views/EN/project/addProjectOverview.pug +++ /dev/null @@ -1,115 +0,0 @@ -doctype html -html(lang="de") - head - title= "Add Project Overview" - 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", 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; - } - .warning { - color: red; - font-size: 11px; - } - body - div(class="container-fluid") - div(class="row") - div(class="col-md-6 offset-md-2") - h4(class="mb-3 font-weight-bold") Neues Projekt - div(class="col-md-6 offset-md-3") - 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") × - form(method="POST") - div(class='form-row') - div(class='form-group col-md-12') - input#inputPname(name="pname" class="form-control" type="text" placeholder="human-readable short project name*" required) - div(class="form-group col-md-12") - input#inputTitle(name="title" class="form-control" type="text" placeholder="official title of the project*" required) - div(class="form-group col-md-12") - input#inputSummary(name="summary" class="form-control" type="text" placeholder="one line summary of the project") - div(class="form-group col-md-12") - input#inputCategory(name="category" class="form-control" type="text" placeholder="category of the project") - div(class="form-group col-md-12") - input#inputLogo(name="logo" class="form-control" type="text" placeholder="official logo of the project") - div(class="form-group col-md-12") - div(class="input-group mb-3") - input#inputGitlabURL(name="gitlabURL" type="text" class="form-control" placeholder="M4_LAB GitLab Project URL, z.B. https://transfer.hft-stuttgart.de/gitlab/username/projectname") - div(class="input-group-prepend") - div(class="input-group-text") - input#inputWiki(name="wiki" type="checkbox") - |   Wiki - - h5(class="mb-3 font-weight-bold") Content - div(class='form-row') - div(class='form-group col-md-12') - textarea#inputOverview(name="overview" class="form-control" type="text" rows="5" placeholder="overview") - div(class="form-group col-md-12") - textarea#inputQuestion(name="question" class="form-control" type="text" rows="5" placeholder="question") - div(class='form-group col-md-12') - textarea#inputApproach(name="approach" class="form-control" type="text" rows="5" placeholder="approach") - div(class="form-group col-md-12") - textarea#inputResult(name="result" class="form-control" type="text" rows="5" placeholder="result") - div(class="form-group col-md-12") - input#inputKeywords(name="keywords" class="form-control" type="text" placeholder="keywords") - h5(class="mb-3 font-weight-bold") Info - div(class='form-row') - div(class='form-group col-md-12') - textarea#inputAnnouncement(name="announcement" class="form-control" type="text" rows="5" placeholder="Ausschreibung") - div(class="form-group col-md-12") - input#inputTerm(name="term" class="form-control" type="text" placeholder="Laufzeit") - div(class='form-group col-md-12') - textarea#inputFurtherDetails(name="furtherDetails" class="form-control" type="text" rows="5" placeholder="Mehr informationen") - div(class="form-group col-md-12") - input#inputWebsite(name="website" class="form-control" type="text" placeholder="website") - h5(class="mb-3 font-weight-bold") Images - div(class='form-row') - div(class="form-group col-md-12") - input#inputSrc(name="src" class="form-control" type="text" placeholder="link to the image source") - div(class="form-group col-md-12") - input#inputCaption(name="caption" class="form-control" type="text" placeholder="caption of the image") - h5(class="mb-3 font-weight-bold") Contact - div(class='form-row') - div(class="form-group col-md-4") - input#inputContactFirstname(name="contactFirstname" class="form-control" type="text" placeholder="contact firstname") - div(class="form-group col-md-4") - input#inputContactLastname(name="contactLastname" class="form-control" type="text" placeholder="contact lastname") - div(class="form-group col-md-4") - input#inputContactEmail(name="contactEmail" class="form-control" type="email" placeholder="contact email") - div(class="form-group col-md-4") - input#inputLeaderFirstname(name="leaderFirstname" class="form-control" type="text" placeholder="leader firstname") - div(class="form-group col-md-4") - input#inputLeaderLastname(name="leaderLastname" class="form-control" type="text" placeholder="leader lastname") - div(class="form-group col-md-4") - input#inputLeaderEmail(name="leaderEmail" class="form-control" type="email" placeholder="leader email") - p * Pflichtfeld - input#submitBtn(type="submit", class="btn btn-outline-dark btn-block", value="Projekt Anlegen") - - // 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") - // Header - script(src="/js/headfootLogout.js") \ No newline at end of file diff --git a/views/EN/project/mailinglists.pug b/views/EN/project/mailinglists.pug deleted file mode 100644 index f2ddbd8b8e7eb89a85e4dc16310b96acf74e06e3..0000000000000000000000000000000000000000 --- a/views/EN/project/mailinglists.pug +++ /dev/null @@ -1,61 +0,0 @@ -html(lang="en") - 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", 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() - h5(align="left") Aktive Mailinglisten - div(class="flex-container" style="align-items:flex-start") - div(class="table") - table(border="0" id="listtable" class="table table-striped") - thead - tr - th Name - th Link - th zugeh. Projekt - tbody - for item in mailinglists - if item.projectstatus == '1' - tr - td #{item.name} - td #{item.src} - td #{item.project_title} -
- 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") - // 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 diff --git a/views/EN/project/projects.pug b/views/EN/project/projects.pug deleted file mode 100644 index 56f65c10de4655b786ec93a865b6e57adc5f5e10..0000000000000000000000000000000000000000 --- a/views/EN/project/projects.pug +++ /dev/null @@ -1,117 +0,0 @@ -doctype html -html(lang="de") - head - title= "Project List" - 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", 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; - } - .warning { - color: red; - font-size: 11px; - } - body - div(class="container-fluid") - if isUserAuthenticated - p Auf dieser Seite sehen Sie die Liste der über dieses Portal veröffentlichten Projekte. - a(href="/addprojectoverview" class="btn btn-primary" role="button" aria-pressed="true") Projekt anlegen - else - p Auf dieser Seite sehen Sie die Liste der über dieses Portal veröffentlichten Projekte. - p Möchten Sie ein neues Projekt anlegen, dann klicken Sie bitte auf #[a(href="/addprojectoverview") Anmelden und Projekt anlegen] - if successes - for success in successes - div.alert.alert-success.alert-dismissible #{ success } - a(class="close", href="#", data-dismiss="alert", aria-label="close") × - // Active projects - h3(class="mb-3 font-weight-bold") Aktive Projekte - table(class="table table-striped") - thead - tr - th Logo - th Akronym - th Title - th Kernziel - th Kategorie - th Ansprechpartner - th Projektinhalte - tbody - for item in active - tr - //td #{item.status} - td - img(src=item.logo, width="40", height="40") - td #{item.akronym} - td #{item.title} - td #{item.summary} - td #{item.category} - td #[a(class="nav-link", href="mailto:"+ item.cp) #{item.cp}] - td #[a(class="nav-link", href="https://m4lab.hft-stuttgart.de/projectoverview?projectID="+item.id) Zur Projektübersicht] - if item.gitlab - a(class="nav-link", href=item.gitlab+"/tree/master") Projektdateien - a(class="nav-link", href=item.gitlab+"/wikis/home") Projektwiki - else - a(class="nav-link", href="#") Projektdateien - a(class="nav-link", href="#") Projektwiki - br - // Non-active projects - h3(class="mb-3 font-weight-bold") Abgeschlossene Projekte - table(class="table table-striped") - thead - tr - th Logo - th Akronym - th Title - th Kernziel - th Kategorie - th Ansprechpartner - th Projektinhalte - tbody - for item in nonActive - tr - //td #{item.status} - td - img(src=item.logo, width="40", height="40") - td #{item.akronym} - td #{item.title} - td #{item.summary} - td #{item.category} - td #[a(class="nav-link", href="mailto:"+ item.cp) #{item.cp}] - td #[a(class="nav-link", href="https://m4lab.hft-stuttgart.de/projectoverview?projectID="+item.id) Zur Projektübersicht] - if item.gitlab - a(class="nav-link", href="https://transfer.hft-stuttgart.de/gitlab/"+item.gitlab+"/tree/master") Projektdateien - a(class="nav-link", href="https://transfer.hft-stuttgart.de/gitlab/"+item.gitlab+"/wikis/home") Projektwiki - else - a(class="nav-link", href="#") Projektdateien - a(class="nav-link", href="#") Projektwiki - - // 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") - // 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