Info Button redircets to VRE Public page (if a public page exists for the VRE)
git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/join-vre@141296 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
1be03d5f66
commit
e911cf8c0e
|
@ -2,6 +2,7 @@
|
|||
<Changeset component="org.gcube.portlets-user.join-vre.3.2.0" date="2016-11-17">
|
||||
<Change>Removed ASL Session</Change>
|
||||
<Change>Implemented Feature #4877 remove VRE association to single Category constraint</Change>
|
||||
<Change>Info Button redircets to VRE Public page (if a public page exists for the VRE)</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.join-vre.3.1.0"
|
||||
date="2016-10-03">
|
||||
|
|
|
@ -93,8 +93,12 @@ public class VreThumbnail extends Composite {
|
|||
|
||||
@UiHandler("vreInfoButton")
|
||||
void infoClick(ClickEvent e) {
|
||||
if (myVre.getPublicURL() == null) {
|
||||
InfoPanel modal = new InfoPanel(myVre);
|
||||
modal.show();
|
||||
} else {
|
||||
Window.open(myVre.getPublicURL(),"_blank","");
|
||||
}
|
||||
}
|
||||
|
||||
public void setPending() {
|
||||
|
|
|
@ -25,17 +25,14 @@ import org.gcube.vomanagement.usermanagement.UserManager;
|
|||
import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault;
|
||||
import org.gcube.vomanagement.usermanagement.exception.UserManagementSystemException;
|
||||
import org.gcube.vomanagement.usermanagement.exception.UserRetrievalFault;
|
||||
import org.gcube.vomanagement.usermanagement.exception.VirtualGroupNotExistingException;
|
||||
import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
|
||||
import org.gcube.vomanagement.usermanagement.impl.LiferayUserManager;
|
||||
import org.gcube.vomanagement.usermanagement.model.CustomAttributeKeys;
|
||||
import org.gcube.vomanagement.usermanagement.model.GCubeGroup;
|
||||
import org.gcube.vomanagement.usermanagement.model.GCubeMembershipRequest;
|
||||
import org.gcube.vomanagement.usermanagement.model.GCubeUser;
|
||||
import org.gcube.vomanagement.usermanagement.model.GroupMembershipType;
|
||||
import org.gcube.vomanagement.usermanagement.model.MembershipRequestStatus;
|
||||
import org.gcube.vomanagement.usermanagement.model.VirtualGroup;
|
||||
import org.gcube.vomanagement.usermanagement.util.ManagementUtils;
|
||||
|
||||
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
||||
import com.liferay.portal.kernel.cache.CacheRegistryUtil;
|
||||
|
@ -45,10 +42,6 @@ import com.liferay.portal.kernel.log.Log;
|
|||
import com.liferay.portal.kernel.log.LogFactoryUtil;
|
||||
import com.liferay.portal.model.Group;
|
||||
import com.liferay.portal.model.VirtualHost;
|
||||
import com.liferay.portal.security.auth.PrincipalThreadLocal;
|
||||
import com.liferay.portal.security.permission.PermissionChecker;
|
||||
import com.liferay.portal.security.permission.PermissionCheckerFactoryUtil;
|
||||
import com.liferay.portal.security.permission.PermissionThreadLocal;
|
||||
import com.liferay.portal.service.GroupLocalServiceUtil;
|
||||
import com.liferay.portal.service.LayoutSetLocalServiceUtil;
|
||||
import com.liferay.portal.service.UserLocalServiceUtil;
|
||||
|
@ -62,7 +55,7 @@ import com.liferay.portal.util.PortalUtil;
|
|||
public class JoinServiceImpl extends RemoteServiceServlet implements JoinService {
|
||||
private static Log _log = LogFactoryUtil.getLog(JoinServiceImpl.class);
|
||||
private static DatabookStore store;
|
||||
|
||||
public static final String PREFIX_PUBLIC_URL = "/web";
|
||||
/**
|
||||
*
|
||||
* @return true if you're running into the portal, false if in development
|
||||
|
@ -161,6 +154,10 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
|
|||
ArrayList<VRE> toUpdate = toReturn.get(vre);
|
||||
UserBelonging belongs = UserBelonging.NOT_BELONGING;
|
||||
VRE toAdd = new VRE(vreID,vreName, vreDescription, vreLogoURL, groupName, friendlyURL, belongs, getVREMembershipType(vreSite.getMembershipType()));
|
||||
if (GroupLocalServiceUtil.getGroup(vreID).getPublicLayoutsPageCount() > 0) {
|
||||
String publicURL = PREFIX_PUBLIC_URL+vreSite.getFriendlyURL();
|
||||
toAdd.setPublicURL(publicURL);
|
||||
}
|
||||
if (currUser != null) {
|
||||
//check if the user belongs to it
|
||||
if (currUserGroups.contains(vreSite)) {
|
||||
|
|
|
@ -11,7 +11,7 @@ public class VRE extends ResearchEnvironment implements Serializable, Comparable
|
|||
|
||||
protected VreMembershipType membershipType;
|
||||
protected long id;
|
||||
|
||||
protected String publicURL;
|
||||
|
||||
public VRE() {
|
||||
super();
|
||||
|
@ -42,6 +42,15 @@ public class VRE extends ResearchEnvironment implements Serializable, Comparable
|
|||
}
|
||||
|
||||
|
||||
|
||||
public String getPublicURL() {
|
||||
return publicURL;
|
||||
}
|
||||
|
||||
public void setPublicURL(String publicURL) {
|
||||
this.publicURL = publicURL;
|
||||
}
|
||||
|
||||
public VreMembershipType getMembershipType() {
|
||||
return membershipType;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue