implemented when user already has account, missin when she does not yet
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/accept-invite-portlet@158998 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
991a6ac013
commit
6bbbdeca59
|
@ -15,7 +15,6 @@
|
|||
package org.gcube.portlets.user.acceptinvite;
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.portlet.PortalContext;
|
||||
import javax.portlet.RenderRequest;
|
||||
import javax.portlet.RenderResponse;
|
||||
import javax.portlet.ResourceRequest;
|
||||
|
@ -23,6 +22,7 @@ import javax.portlet.ResourceResponse;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.gcube.common.portal.PortalContext;
|
||||
import org.gcube.portal.databook.server.DBCassandraAstyanaxImpl;
|
||||
import org.gcube.portal.databook.server.DatabookStore;
|
||||
import org.gcube.portal.databook.shared.Invite;
|
||||
|
@ -130,6 +130,7 @@ public class PortletViewController {
|
|||
model.addAttribute("vreName", site.getName());
|
||||
model.addAttribute("vreFriendlyURL", site.getFriendlyURL());
|
||||
model.addAttribute("groupId", site.getGroupId());
|
||||
model.addAttribute("landingPage", PortalContext.getConfiguration().getSiteLandingPagePath(httpReq));
|
||||
|
||||
return PAGE_INVITE_PROCESS;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<%@ page contentType="text/html" pageEncoding="UTF-8"%>
|
||||
<%@ page import="javax.portlet.*"%>
|
||||
<%@ page import="org.gcube.common.portal.*"%>
|
||||
<%@ page import=" org.gcube.portal.invites.InvitesManager"%>
|
||||
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>
|
||||
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui"%>
|
||||
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui"%>
|
||||
|
@ -32,28 +33,35 @@ $( "#country" ).change(function() {
|
|||
});
|
||||
});
|
||||
</script>
|
||||
<h1>Hello!<br></h1>
|
||||
<h1>
|
||||
Hello
|
||||
<c:out escapeXml="true" value="${invitedUser.firstName}" />!<br>
|
||||
</h1>
|
||||
|
||||
<p class="lead">
|
||||
You have recently received an invitation from
|
||||
<c:out escapeXml="true" value="${inviteInstance.senderFullName}" />
|
||||
to join the
|
||||
<a href="/web<c:out escapeXml="true" value="${vreFriendlyURL}" />" target="_blank"><c:out escapeXml="true" value="${vreName}" /></a> Virtual Research Environment.
|
||||
This invite is valid for the email address:
|
||||
<a href="mailto:<c:out escapeXml="true" value="${inviteInstance.invitedEmail}" />">
|
||||
<c:out escapeXml="true" value="${inviteInstance.invitedEmail}" /></a> only.
|
||||
|
||||
<c:choose>
|
||||
<c:when test="${empty invitedUser}">
|
||||
var1 is empty or null.
|
||||
to join the <a
|
||||
href="/web<c:out escapeXml="true" value="${vreFriendlyURL}" />"
|
||||
target="_blank"><c:out escapeXml="true" value="${vreName}" /></a>
|
||||
Virtual Research Environment.
|
||||
<c:choose>
|
||||
<c:when test="${empty invitedUser}">
|
||||
var1 is empty or null.landingPage
|
||||
<br />
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
This invite is valid for your email <a
|
||||
href="mailto:<c:out escapeXml="true" value="${inviteInstance.invitedEmail}" />">
|
||||
<c:out escapeXml="true" value="${inviteInstance.invitedEmail}" />
|
||||
</a> only, you will be asked to enter your password associated to it on this portal.
|
||||
|
||||
<% String exploreURL = request.getAttribute("landingPage") + "/explore?" + InvitesManager.SITEID_ATTR+"="+request.getAttribute("groupId");%>
|
||||
<p class="lead">
|
||||
If you already have a <a href="http://www.d4science.org" target="_blank">D4Science</a> account click here: <button class="btn btn-large btn-primary" type="button">Accept invite</button>
|
||||
</p>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<button class="btn btn-large btn-primary" onclick="window.location.href='<%= exploreURL %>'" type="button">Go to <c:out escapeXml="true" value="${vreName}" /></button>
|
||||
</p>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 6.2.0//EN" "http://www.liferay.com/dtd/liferay-display_6_2_0.dtd">
|
||||
|
||||
<display>
|
||||
<category name="category.sample">
|
||||
<category name="gCube Applications">
|
||||
<portlet id="accept-invite-portlet" />
|
||||
</category>
|
||||
</display>
|
|
@ -4,6 +4,6 @@ module-incremental-version=1
|
|||
tags=
|
||||
short-description=
|
||||
change-log=
|
||||
page-url=http://www.liferay.com
|
||||
author=Liferay, Inc.
|
||||
licenses=LGPL
|
||||
page-url=http://www.gcube-system.org
|
||||
author=M. Assante
|
||||
licenses=EUPL
|
|
@ -7,7 +7,6 @@
|
|||
<icon>/icon.png</icon>
|
||||
<requires-namespaced-parameters> false </requires-namespaced-parameters>
|
||||
<header-portlet-css>/css/main.css</header-portlet-css>
|
||||
<header-portlet-javascript>https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js</header-portlet-javascript>
|
||||
<footer-portlet-javascript>/js/main.js</footer-portlet-javascript>
|
||||
</portlet>
|
||||
<role-mapper>
|
||||
|
|
Loading…
Reference in New Issue