Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
User Account
Commits
4dc1bc60
Commit
4dc1bc60
authored
5 years ago
by
Rosanny Sihombing
Browse files
Options
Download
Email Patches
Plain Diff
add gitlab link to project list table
parent
d625f1f8
master
MLAB-677
devel
devel_wolfgang
patch-1
reset-jul13
reset-merge
test_logoutbutton
testing
2 merge requests
!2
Mlab 56
,
!1
Devel
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
routes/routes.js
+12
-36
routes/routes.js
views/DE/project/projects.pug
+16
-2
views/DE/project/projects.pug
with
28 additions
and
38 deletions
+28
-38
routes/routes.js
+
12
-
36
View file @
4dc1bc60
...
...
@@ -556,7 +556,7 @@ module.exports = function (app, config, passport, i18n) {
})
})
// ======== APP ROUTES - PROJECT
LIST
====================
// ======== APP ROUTES - PROJECT ====================
app
.
get
(
'
/project
'
,
function
(
req
,
res
)
{
async
.
waterfall
([
// get all projects from projectdb
...
...
@@ -567,71 +567,47 @@ module.exports = function (app, config, passport, i18n) {
}
})
},
// create JSON object
of projects and user status
for front-end
// create JSON object for front-end
function
(
projectsOverview
,
done
)
{
// var allProjects = []
var
activeProjects
=
[]
var
nonActiveProjects
=
[]
/*
for
(
var
i
=
0
;
i
<
projectsOverview
.
length
;
i
++
)
{
allP
roject
s.push(
{
var
p
roject
=
{
id
:
projectsOverview
[
i
].
id
,
status: projectsOverview[i].projectstatus,
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
})
}
*/
for
(
var
i
=
0
;
i
<
projectsOverview
.
length
;
i
++
)
{
cp
:
projectsOverview
[
i
].
contact_email
,
gitlab
:
projectsOverview
[
i
].
gitlab
}
if
(
projectsOverview
[
i
].
projectstatus
==
0
)
{
nonActiveProjects
.
push
({
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
})
nonActiveProjects
.
push
(
project
)
}
else
if
(
projectsOverview
[
i
].
projectstatus
==
1
)
{
activeProjects
.
push
({
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
})
activeProjects
.
push
(
project
)
}
}
// render the page
if
(
req
.
isAuthenticated
())
{
res
.
render
(
lang
+
'
/project
List
/projects
'
,
{
res
.
render
(
lang
+
'
/project/projects
'
,
{
isUserAuthenticated
:
true
,
//project: allProjects
nonActive
:
nonActiveProjects
,
active
:
activeProjects
});
}
else
{
res
.
render
(
lang
+
'
/project
List
/projects
'
,
{
res
.
render
(
lang
+
'
/project/projects
'
,
{
isUserAuthenticated
:
false
,
//project: allProjects
nonActive
:
nonActiveProjects
,
active
:
activeProjects
});
}
}
])
})
};
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
views/DE/project
List
/projects.pug
→
views/DE/project/projects.pug
+
16
-
2
View file @
4dc1bc60
...
...
@@ -33,6 +33,7 @@ html(lang="de")
}
body
div(class="container-fluid")
// Active projects
h3(class="mb-3 font-weight-bold") Aktive Projekte
table(class="table table-striped")
thead
...
...
@@ -57,8 +58,15 @@ html(lang="de")
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
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
...
...
@@ -83,7 +91,13 @@ html(lang="de")
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
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")
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets