Mercurial > hg > LGServices
diff src/main/webapp/methods/getDataverseForm.jsp @ 0:3e62083dbcbf
First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
author | "jurzua <jurzua@mpiwg-berlin.mpg.de>" |
---|---|
date | Thu, 23 Apr 2015 15:46:01 +0200 |
parents | |
children | 3b3e2963c8f7 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/webapp/methods/getDataverseForm.jsp Thu Apr 23 15:46:01 2015 +0200 @@ -0,0 +1,73 @@ +<%@page import="de.mpiwg.gazetteer.dataverse.DataverseUtils"%> +<%@page import="de.mpiwg.gazetteer.dataverse.bo.Study"%> +<%@page import="java.util.List"%> +<jsp:useBean id="sessionBean" class="de.mpiwg.web.jsp.SessionBean" scope="session" /> +<% + + + List<Study> studies = DataverseUtils.getStudies(sessionBean.getUser().getUserName(), sessionBean.getUser().getPassword()); + System.out.println("%%%%% Studies: " + studies.size()); + + if(studies.isEmpty()){ +%> + + <label>The system does not find studies for the user <%= sessionBean.getUser().getUserName()%>.</label> + +<% + } else { +%> + +<form name="dataverseForm" + action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp" + method="post"> + <input name="bean" type="hidden" value="branchBean" /> + <input name="fileId" type="hidden" value="<%=request.getParameter("fileId") %>" /> + + + <table class="pageTable"> + <tbody> + <tr> + <th><label class="tableTitle">Study Global ID</label></th> + <th><label class="tableTitle">Title</label></th> + <th><label class="tableTitle">Creator</label></th> + <th><label class="tableTitle">Created</label></th> + <th><label class="tableTitle">Status</label></th> + <th><label class="tableTitle">Dataverse</label></th> + <th><label class="tableTitle">Publish</label></th> + <!-- + <th><label class="tableTitle">Release Date</label></th> + <th><label class="tableTitle">Version</label></th> + <th><label class="tableTitle">Last Updated</label></th> + --> + + <!-- + <th><label class="tableTitle">Number of Files </label></th> + --> + </tr> + </tbody> + <% + for(Study study : studies){ + %> + + <tr> + <td><%= study.getGlobalId()%></td> + <td><%= study.getTitle() %></td> + <td><%= study.getCreator() %></td> + <td><%= study.getCreateTime() %></td> + <td><%= study.getStatus() %></td> + <td><%= study.getDataverse().getName() %></td> + <td> + <input type="image" + onclick="<%=sessionBean.getApplicationBean().getJSConfirmationPublish() %> setAction0('publishFile', 'dataverseForm', 'studyGlobalId', '<%=study.getGlobalId() %>');" + src="<%=sessionBean.getApplicationBean().getPublishImage()%>"/> + </td> + </tr> + + <% + } + %> + </table> +</form> +<% + } +%> \ No newline at end of file