Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
civitas-digitalis
platform
Commits
a0a0ed66
Commit
a0a0ed66
authored
Jan 23, 2018
by
Elias Englmeier
Browse files
fixed a map bug
parent
9cf3ddc6
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/MapModule/bin/MapModule/portlet/MapModulePortlet.class
View file @
a0a0ed66
No preview for this file type
modules/MapModule/src/main/java/MapModule/portlet/MapModulePortlet.java
View file @
a0a0ed66
...
...
@@ -49,8 +49,6 @@ public class MapModulePortlet extends MVCPortlet {
String
result
=
null
;
User
user
;
if
(
ProjectLocalServiceUtil
.
getProjectByLayoutIdRef
(
themeDisplay
.
getLayout
().
getPrimaryKey
())
!=
null
){
System
.
out
.
println
(
"MM: 1"
);
System
.
out
.
println
(
ProjectLocalServiceUtil
.
getProjectByLayoutIdRef
(
themeDisplay
.
getLayout
().
getPrimaryKey
()));
long
projectId
=
ProjectLocalServiceUtil
.
getProjectByLayoutIdRef
(
themeDisplay
.
getLayout
().
getPrimaryKey
()).
getPrimaryKey
();
try
{
user
=
PortalUtil
.
getUser
(
renderRequest
);
...
...
@@ -71,11 +69,15 @@ public class MapModulePortlet extends MVCPortlet {
result
=
JSONFactoryUtil
.
looseSerializeDeep
(
IdeasLocalServiceUtil
.
getIdeasByUserRoleProjectId
(
RoleConstants
.
GUEST
,
-
1
,
projectId
));
}
if
(
result
.
isEmpty
()){
//at least return all accepted ideas in any case
result
=
JSONFactoryUtil
.
looseSerializeDeep
(
IdeasLocalServiceUtil
.
getAllAccpetedIdeas
());
}
renderRequest
.
setAttribute
(
"allIdeas"
,
result
);
}
else
if
(
IdeasLocalServiceUtil
.
getIdeasByLayoutIdRef
(
themeDisplay
.
getLayout
().
getPrimaryKey
())
!=
null
){
System
.
out
.
println
(
"MM: 2"
);
ArrayList
<
Ideas
>
tmp
=
new
ArrayList
<
Ideas
>();
Ideas
i
=
IdeasLocalServiceUtil
.
getIdeasByLayoutIdRef
(
themeDisplay
.
getLayout
().
getPrimaryKey
());
tmp
.
add
(
i
);
...
...
@@ -83,7 +85,6 @@ public class MapModulePortlet extends MVCPortlet {
JSONFactoryUtil
.
looseSerializeDeep
(
tmp
));
}
else
{
System
.
out
.
println
(
"MM: 3"
);
renderRequest
.
setAttribute
(
"allIdeas"
,
JSONFactoryUtil
.
looseSerializeDeep
(
IdeasLocalServiceUtil
.
getAllAccpetedIdeas
()));
}
...
...
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