Commit cd83235a authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

update service page

parent 8ef77955
...@@ -204,9 +204,9 @@ module.exports = function (app, config, passport) { ...@@ -204,9 +204,9 @@ module.exports = function (app, config, passport) {
for (var i = 0; i < projectsOverview.length; i++) { for (var i = 0; i < projectsOverview.length; i++) {
// check if projectId is exist in userProjectId[] // check if projectId is exist in userProjectId[]
var status = "You cannot access this service" var status = false
if (userProjectId.indexOf(projectsOverview[i].id) > -1) { if (userProjectId.indexOf(projectsOverview[i].id) > -1) {
status = "You can access this service" status = true
} }
// add data to JSON object // add data to JSON object
allProjects.push({ allProjects.push({
......
...@@ -46,13 +46,20 @@ html(lang="en") ...@@ -46,13 +46,20 @@ html(lang="en")
for error, i in errors for error, i in errors
div.alert.alert-danger.alert-dismissible.fade.show #{ error } div.alert.alert-danger.alert-dismissible.fade.show #{ error }
a(class="close", href="#", data-dismiss="alert", aria-label="close") &times; a(class="close", href="#", data-dismiss="alert", aria-label="close") &times;
ul table
for item in project for item in project
li= item.title tr
ul td <strong>#{item.title}</strong>
li= item.summary if item.userStatus
li= item.cp td
li= item.userStatus button(type="button", class="btn btn-secondary", onclick="unsubscribe()") Unsubscribe
else
td
button(type="button", class="btn btn-success", onclick="subscribe()") Subscribe
tr
td(colspan="2") #{item.summary}
tr
td(colspan="2") <i>Contact Person: #{item.cp}</i>
// jQuery // jQuery
script(src="https://code.jquery.com/jquery-3.3.1.min.js") script(src="https://code.jquery.com/jquery-3.3.1.min.js")
...@@ -61,3 +68,10 @@ html(lang="en") ...@@ -61,3 +68,10 @@ html(lang="en")
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous") script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
// M4_LAB // M4_LAB
script(src="https://transfer.hft-stuttgart.de/js/headfoot.js") script(src="https://transfer.hft-stuttgart.de/js/headfoot.js")
script.
function subscribe() {
alert("To be implemented: Send a request to join/participate/have access to the page of the requested service")
}
function unsubscribe() {
alert("To be implemented: Send a request to withdraw access")
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment