sbd-uploadshare-portlet/src/main/webapp/html/uploaddataset/view.jsp

118 lines
4.3 KiB
Plaintext

<%@ 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 />
<liferay-theme:defineObjects />
<portlet:resourceURL var="uploadFileURL" id="uploadFiles" />
<%
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="addExperimentActionURL" windowState="maximized"
name="addExperiment">
</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()%>" />
<div id="ciccio"></div>
<c:set var="maximised" scope="session"
value="${renderRequest.getWindowState().toString().equalsIgnoreCase('maximized')}" />
<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-cloud-upload icon-3x"></i></a>
</div>
</c:when>
<c:otherwise>
<script
src="<%=request.getContextPath()%>/js/jquery.uploadfile.min.js"></script>
<script>
$(document).ready(function(){
$("#multipleupload").uploadFile({
url:"<%=uploadFileURL.toString()%>",
multiple : true,
dragDrop : true,
sequential : true,
sequentialCount : 1,
maxFileCount : 3,
maxFileSize: 10*1024*1024,
showStatusAfterSuccess: false,
fileName : "myfile",
onSuccess : function(files, data, xhr, pd) {
var content = JSON.parse(data);
appendChip(content.fileName, content.itemId);
}
});
});
</script>
<a class="btn btn-link btn-large" href="${normalState}"><i
class="icon icon-angle-left"></i>&nbsp;Back (Cancel)</a>
<p style="font-size: 15px; padding: 15px;">
Please give us a description about the dataset/method you want to
insert in the catalogue. The SoBigData research, technical and
ethical boards will evaluate your application before the actual
upload. In particular, in case of datasets, please visit also our <a
href="http://146.48.83.51/moodle" target="_blank"> First aid for
Responsible data Scientists</a>: we provide resources and information to
understand and check possible ethical issues for your dataset.
</p>
<div
style="width: 100%; text-align: left; padding: 10px; color: #3B5998;">
<aui:form action="<%=addExperimentActionURL%>" method="post"
name="fm">
<aui:input name="method_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="demo_tutorial"
label="Description + Demo/Tutorial, 2 pages max" value=""
required="true" style="width:90%;" />
<span> Additional Material (max 3 files, allowed max size per file: 10 MB):</span>
<div id="multipleupload">Select file to attach</div>
<div id="attachedFiles"></div>
<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>
<p>Please note: depending on the number of attachments it could
take some time (seconds) to submit the request.</p>
</aui:form>
</div>
</c:otherwise>
</c:choose>