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) {
for (var i = 0; i < projectsOverview.length; i++) {
// check if projectId is exist in userProjectId[]
var status = "You cannot access this service"
var status = false
if (userProjectId.indexOf(projectsOverview[i].id) > -1) {
status = "You can access this service"
status = true
}
// add data to JSON object
allProjects.push({
......
......@@ -46,13 +46,20 @@ html(lang="en")
for error, i in errors
div.alert.alert-danger.alert-dismissible.fade.show #{ error }
a(class="close", href="#", data-dismiss="alert", aria-label="close") &times;
ul
table
for item in project
li= item.title
ul
li= item.summary
li= item.cp
li= item.userStatus
tr
td <strong>#{item.title}</strong>
if item.userStatus
td
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
script(src="https://code.jquery.com/jquery-3.3.1.min.js")
......@@ -60,4 +67,11 @@ html(lang="en")
// Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
// M4_LAB
script(src="https://transfer.hft-stuttgart.de/js/headfoot.js")
\ No newline at end of file
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
Markdown is supported
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