Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProjectView
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Coscine
frontend
apps
ProjectView
Commits
b98b5f74
Commit
b98b5f74
authored
5 years ago
by
Marcel Nellesen
Browse files
Options
Downloads
Patches
Plain Diff
New: Included Functionality for Slugs (coscine/issues#804)
parent
5bd56903
No related branches found
No related tags found
2 merge requests
!34
Product/510-niceProjectUrl
,
!32
Topic/804-niceProjectUrl
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ProjectViewApp.vue
+11
-15
11 additions, 15 deletions
src/ProjectViewApp.vue
with
11 additions
and
15 deletions
src/ProjectViewApp.vue
+
11
−
15
View file @
b98b5f74
...
@@ -34,44 +34,40 @@
...
@@ -34,44 +34,40 @@
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
{
LanguageUtil
,
GuidUtil
}
from
'
@coscine/app-util
'
;
import
{
LanguageUtil
,
GuidUtil
,
LinkUtil
}
from
'
@coscine/app-util
'
;
import
{
SubProjectApi
,
redirectToProject
}
from
'
@coscine/api-connection
'
;
import
{
SubProjectApi
}
from
'
@coscine/api-connection
'
;
import
projectImagePath
from
'
./assets/RWTH_Piktogramm_Projekte.png
'
;
import
projectImagePath
from
'
./assets/RWTH_Piktogramm_Projekte.png
'
;
import
zusatzImagePath
from
'
./assets/RWTH_Piktogramm_Zusatzangebot.png
'
;
import
zusatzImagePath
from
'
./assets/RWTH_Piktogramm_Zusatzangebot.png
'
;
let
scriptPath
=
''
;
let
pathToAppJs
=
''
;
if
(
document
.
currentScript
!==
undefined
)
{
if
(
document
.
currentScript
!==
undefined
)
{
scriptPath
=
(
document
.
currentScript
as
any
).
src
as
string
;
pathToAppJs
=
(
document
.
currentScript
as
any
).
src
as
string
;
}
}
const
scriptUrl
=
scriptPath
===
''
?
'
/
'
:
scriptPath
.
substring
(
0
,
scriptPath
.
indexOf
(
'
app.js
'
));
const
rootUrl
=
scriptPath
.
indexOf
(
'
/js
'
)
!==
-
1
?
scriptUrl
.
replace
(
'
/js
'
,
''
)
:
scriptUrl
;
export
default
Vue
.
extend
({
export
default
Vue
.
extend
({
name
:
'
project
'
,
name
:
'
project
'
,
data
()
{
data
()
{
return
{
return
{
projectId
:
''
,
selectedProjectId
:
''
,
language
:
LanguageUtil
.
getLanguage
(),
subProjects
:
[]
as
object
[],
subProjects
:
[]
as
object
[],
projectImage
:
rootUrl
+
projectImagePath
,
projectImage
:
''
,
zusatzImage
:
rootUrl
+
zusatzImagePath
,
zusatzImage
:
''
,
};
};
},
},
methods
:
{
methods
:
{
openCreate
()
{
openCreate
()
{
w
in
dow
.
location
.
href
=
window
.
location
.
origin
+
'
/p/
'
+
this
.
projectId
+
'
/SitePages/
CreateProject
.aspx
'
;
L
in
kUtil
.
redirectToProject
(
'
CreateProject
'
)
;
},
},
redirect
(
project
:
any
)
{
redirect
(
project
:
any
)
{
redirectToProject
(
project
);
LinkUtil
.
redirectTo
External
Project
(
project
.
slug
.
toLowerCase
()
);
},
},
},
},
created
()
{
created
()
{
this
.
projectId
=
GuidUtil
.
getProjectId
();
this
.
projectImage
=
LinkUtil
.
getScriptPath
(
pathToAppJs
)
+
projectImagePath
;
this
.
zusatzImage
=
LinkUtil
.
getScriptPath
(
pathToAppJs
)
+
zusatzImagePath
;
SubProjectApi
.
getSubProjects
(
SubProjectApi
.
getSubProjects
(
this
.
p
rojectId
,
GuidUtil
.
getP
rojectId
()
,
(
response
:
any
)
=>
{
for
(
const
datum
of
response
.
data
)
{
this
.
subProjects
.
push
(
datum
);
}
});
(
response
:
any
)
=>
{
for
(
const
datum
of
response
.
data
)
{
this
.
subProjects
.
push
(
datum
);
}
});
},
},
});
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment