<%-- The contents of this file are subject to the license and copyright detailed in the LICENSE and NOTICE files at the root of the source tree and available online at http://www.dspace.org/license/ --%> <%-- - List of uploaded files - - Attributes to pass in to this page: - just.uploaded - Boolean indicating if a file has just been uploaded - so a nice thank you can be displayed. - show.checksums - Boolean indicating whether to show checksums - - FIXME: Assumes each bitstream in a separate bundle. - Shouldn't be a problem for early adopters. --%> <%@ page contentType="text/html;charset=UTF-8" %> <%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %> <%@ page import="java.util.List" %> <%@ page import="org.apache.commons.lang.time.DateFormatUtils" %> <%@ page import="org.dspace.core.Context" %> <%@ page import="org.dspace.app.webui.servlet.SubmissionController" %> <%@ page import="org.dspace.submit.AbstractProcessingStep" %> <%@ page import="org.dspace.app.util.SubmissionInfo" %> <%@ page import="org.dspace.app.webui.util.UIUtil" %> <%@ page import="org.dspace.authorize.ResourcePolicy" %> <%@ page import="org.dspace.content.Bitstream" %> <%@ page import="org.dspace.content.BitstreamFormat" %> <%@ page import="org.dspace.content.Bundle" %> <%@ page import="org.dspace.core.ConfigurationManager" %> <%@ page import="org.dspace.authorize.factory.AuthorizeServiceFactory" %> <%@ page import="org.dspace.content.factory.ContentServiceFactory" %> <%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <% // Obtain DSpace context Context context = UIUtil.obtainContext(request); //get submission information object SubmissionInfo subInfo = SubmissionController.getSubmissionInfo(context, request); boolean justUploaded = ((Boolean) request.getAttribute("just.uploaded")).booleanValue(); boolean showChecksums = ((Boolean) request.getAttribute("show.checksums")).booleanValue(); request.setAttribute("LanguageSwitch", "hide"); boolean allowFileEditing = !subInfo.isInWorkflow() || ConfigurationManager.getBooleanProperty("workflow", "reviewer.file-edit"); boolean withEmbargo = ((Boolean)request.getAttribute("with_embargo")).booleanValue(); List policies = null; String startDate = ""; String globalReason = ""; if (withEmbargo) { // Policies List policies = AuthorizeServiceFactory.getInstance().getAuthorizeService().findPoliciesByDSOAndType(context, subInfo.getSubmissionItem().getItem(), ResourcePolicy.TYPE_CUSTOM); startDate = ""; globalReason = ""; if (policies.size() > 0) { startDate = (policies.get(0).getStartDate() != null ? DateFormatUtils.format(policies.get(0).getStartDate(), "yyyy-MM-dd") : ""); globalReason = policies.get(0).getRpDescription(); } } boolean isAdvancedForm = ConfigurationManager.getBooleanProperty("webui.submission.restrictstep.enableAdvancedForm", false); %>
<%--

Submit: <%= (justUploaded ? "File Uploaded Successfully" : "Uploaded Files") %>

--%> <% if (justUploaded) { %>

">

<% } else { %>

">

<% } %>
<% String headerClass = "oddRowEvenCol"; if (showChecksums) { headerClass = (headerClass == "oddRowEvenCol" ? "oddRowOddCol" : "oddRowEvenCol"); %> <% } if (withEmbargo) { // Access Setting headerClass = (headerClass == "oddRowEvenCol" ? "oddRowOddCol" : "oddRowEvenCol"); %> <% } %> <% String row = "even"; List bitstreams = ContentServiceFactory.getInstance().getItemService().getNonInternalBitstreams(context, subInfo.getSubmissionItem().getItem()); List bundles = null; if (bitstreams.get(0) != null) { bundles = bitstreams.get(0).getBundles(); } for (int i = 0; i < bitstreams.size(); i++) { BitstreamFormat format = bitstreams.get(i).getFormat(context); String description = bitstreams.get(i).getFormatDescription(context); String supportLevel = LocaleSupport.getLocalizedMessage(pageContext, "jsp.submit.upload-file-list.supportlevel1"); if(format.getSupportLevel() == 1) { supportLevel = LocaleSupport.getLocalizedMessage(pageContext, "jsp.submit.upload-file-list.supportlevel2"); } if(format.getSupportLevel() == 0) { supportLevel = LocaleSupport.getLocalizedMessage(pageContext, "jsp.submit.upload-file-list.supportlevel3"); } // Full param to dspace:popup must be single variable String supportLevelLink = LocaleSupport.getLocalizedMessage(pageContext, "help.formats") +"#" + supportLevel; %> <% // Checksum if (showChecksums) { %> <% } String column = ""; if (withEmbargo) { column = (showChecksums ? "Even" : "Odd"); %> <% } %> <% row = (row.equals("even") ? "odd" : "even"); } %>
<%="checked='checked'" %> <% } } %> /> <%= bitstreams.get(i).getName() %> <% // Don't display "remove" button in workflow mode if (allowFileEditing) { %> <% } %> <%= bitstreams.get(i).getSize() %> bytes <%= (bitstreams.get(i).getDescription() == null || bitstreams.get(i).getDescription().equals("") ? LocaleSupport.getLocalizedMessage(pageContext, "jsp.submit.upload-file-list.empty1") : bitstreams.get(i).getDescription()) %> <%= description %> (<%= supportLevel %>) <%= bitstreams.get(i).getChecksum() %> (<%= bitstreams.get(i).getChecksumAlgorithm() %>)
<% // Don't allow files to be added in workflow mode if (allowFileEditing) { %>
" />
<% } %>
<%-- Show information about how to verify correct upload, but not in workflow mode! --%> <% if (allowFileEditing) { %>

  • <% if (showChecksums) { %>
  • ">
  • <% } else { %>
  • "> " />
  • <% } %>

<% } %> <%-- Hidden fields needed for SubmissionController servlet to know which step is next--%> <%= SubmissionController.getSubmissionParameters(context, request) %> <% //if not first step, show "Previous" button if(!SubmissionController.isFirstStep(request, subInfo)) { %>
" /> " /> " /> <% } else { %>
" /> " /> <% } %>