share idea completed, upload dataset ongoing with workspace integration
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/sbd-uploadshare-portlet@162897 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
0295bb20cb
commit
61b2a2b0e5
|
@ -8,6 +8,6 @@ import com.liferay.util.bridges.mvc.MVCPortlet;
|
|||
* Portlet implementation class UploadDataset
|
||||
*/
|
||||
public class UploadDataset extends MVCPortlet {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,15 +2,10 @@
|
|||
<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 6.2.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_6_2_0.dtd">
|
||||
|
||||
<liferay-portlet-app>
|
||||
<portlet>
|
||||
<portlet-name>SBD-UploadAndSharePortlets</portlet-name>
|
||||
<icon>/icon.png</icon>
|
||||
<header-portlet-css>/css/main.css</header-portlet-css>
|
||||
<footer-portlet-javascript>/js/main.js</footer-portlet-javascript>
|
||||
</portlet>
|
||||
<portlet>
|
||||
<portlet-name>upload-dataset</portlet-name>
|
||||
<icon>/icon.png</icon>
|
||||
<requires-namespaced-parameters>false</requires-namespaced-parameters>
|
||||
<header-portlet-css>/css/main.css</header-portlet-css>
|
||||
<footer-portlet-javascript>
|
||||
/js/main.js
|
||||
|
@ -20,6 +15,7 @@
|
|||
<portlet>
|
||||
<portlet-name>collaborate-with-us</portlet-name>
|
||||
<icon>/icon.png</icon>
|
||||
<requires-namespaced-parameters>false</requires-namespaced-parameters>
|
||||
<header-portlet-css>/css/main.css</header-portlet-css>
|
||||
<footer-portlet-javascript>
|
||||
/js/main.js
|
||||
|
|
|
@ -1,7 +1,77 @@
|
|||
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui"%>
|
||||
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui"%>
|
||||
<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme"%>
|
||||
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%>
|
||||
<%@page import="com.liferay.portal.kernel.servlet.SessionErrors"%>
|
||||
<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %>
|
||||
|
||||
<portlet:defineObjects />
|
||||
<div style="width: 100%; text-align: center; color: #3B5998;">
|
||||
<a class="btn btn-link" href="#"><i
|
||||
class="icon-cloud-upload icon-3x"></i></a>
|
||||
</div>
|
||||
<liferay-theme:defineObjects />
|
||||
<% String wpExplorerId = "workspaceexplorerportlet_WAR_workspaceexplorerportlet"; %>
|
||||
|
||||
<% if(SessionErrors.contains(renderRequest.getPortletSession(),"dataset-form-error")){%>
|
||||
<liferay-ui:error key="dataset-form-error" message="Dataset experiment form submit had an issue, Please try again." />
|
||||
<%} %>
|
||||
|
||||
<portlet:actionURL var="addIdeaActionURL" windowState="maximized" name="addIdea">
|
||||
</portlet:actionURL>
|
||||
|
||||
<liferay-portlet:renderURL var="wpExplorerPopupURL"
|
||||
portletName="workspaceexplorerportlet_WAR_workspaceexplorerportlet"
|
||||
windowState="<%=LiferayWindowState.POP_UP.toString() %>">
|
||||
</liferay-portlet:renderURL>
|
||||
|
||||
<portlet:renderURL var="maximizedState"
|
||||
windowState="<%=LiferayWindowState.MAXIMIZED.toString()%>" />
|
||||
<portlet:renderURL var="normalState"
|
||||
windowState="<%=LiferayWindowState.NORMAL.toString()%>" />
|
||||
|
||||
<script>
|
||||
Liferay.on('getUserData',function(event) {
|
||||
$("#ciccio").text(event.name);
|
||||
});
|
||||
</script>
|
||||
<div id="ciccio"></div>
|
||||
<c:set var="maximised" scope="session"
|
||||
value="${renderRequest.getWindowState().toString().equalsIgnoreCase('maximized')}" />
|
||||
|
||||
<a href="javascript:showWPPopup('<%=wpExplorerPopupURL%>');">Open Workspace</a>
|
||||
|
||||
<c:choose>
|
||||
<c:when test="${not maximised}">
|
||||
<div style="width: 100%; text-align: center; color: #3B5998;">
|
||||
<a class="btn btn-link" href="${maximizedState}"><i
|
||||
class="icon icon-share icon-3x"></i></a>
|
||||
</div>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<a class="btn btn-link btn-large" href="${normalState}"><i
|
||||
class="icon icon-angle-left"></i> Back (Cancel)</a>
|
||||
<div
|
||||
style="width: 100%; text-align: left; padding: 10px; color: #3B5998;">
|
||||
<aui:form action="<%=addIdeaActionURL%>" method="post" name="fm">
|
||||
<aui:input name="dataset_name" label="Dataset/Method name" value=""
|
||||
required="true" style="width:90%;" />
|
||||
<aui:input type="textarea" rows="3" name="people_institutions"
|
||||
label="Involved people and or institutions" value=""
|
||||
required="true" style="width:90%;" />
|
||||
|
||||
<aui:input type="textarea" rows="10" name="abstract"
|
||||
label="Description + Demo/Tutorial, 2 pages max" value="" required="true"
|
||||
style="width:90%;" />
|
||||
<aui:input name="experiment_tags" label="Keywords (Comma separated)"
|
||||
value="" required="false" style="width:90%;" />
|
||||
<aui:button-row>
|
||||
<a class="btn" href="${normalState}"><i class="icon-remove"></i> Cancel</a>
|
||||
<aui:button type="submit" value="Submit" />
|
||||
</aui:button-row>
|
||||
</aui:form>
|
||||
</div>
|
||||
</c:otherwise>
|
||||
|
||||
</c:choose>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
//open the url in a liferay popup
|
||||
function showWPPopup(url) {
|
||||
var url = url;
|
||||
// this is one way of calling a pop-up in liferay
|
||||
// this way is specific to liferay
|
||||
Liferay.Util.openWindow(
|
||||
{
|
||||
dialog: {
|
||||
cache: false,
|
||||
width:600,
|
||||
height: 450,
|
||||
modal: true
|
||||
},
|
||||
id: 'testPopupIdUnique',
|
||||
uri: url
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function closeWPPopup() {
|
||||
var dialog = Liferay.Util.getWindow('testPopupIdUnique');
|
||||
dialog.destroy(); // You can try toggle/hide whatever You want
|
||||
}
|
||||
|
||||
function fireEvent(eventName, eventValue) {
|
||||
Liferay.Util.getOpener().Liferay.fire('getUserData',{
|
||||
name: eventValue
|
||||
});
|
||||
console.log('fireEvent:done');
|
||||
closeWPPopup();
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
<%--
|
||||
/**
|
||||
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
--%>
|
||||
|
||||
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
|
||||
|
||||
<portlet:defineObjects />
|
||||
|
||||
This is the <b>SBD-UploadAndSharePortlets</b>.
|
Loading…
Reference in New Issue