forked from DSpace/DSpace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
select-collection.jsp
94 lines (75 loc) · 3.47 KB
/
select-collection.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<%--
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/
--%>
<%--
- UI page for selection of collection.
-
- Required attributes:
- collections - Array of collection objects to show in the drop-down.
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
<%@ 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.webui.util.UIUtil" %>
<%@ page import="org.dspace.content.Collection" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
prefix="fmt" %>
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
<%
request.setAttribute("LanguageSwitch", "hide");
//get collections to choose from
Collection[] collections =
(Collection[]) request.getAttribute("collections");
//check if we need to display the "no collection selected" error
Boolean noCollection = (Boolean) request.getAttribute("no.collection");
// Obtain DSpace context
Context context = UIUtil.obtainContext(request);
%>
<dspace:layout style="submission" locbar="off"
navbar="off"
titlekey="jsp.submit.select-collection.title"
nocache="true">
<h1><fmt:message key="jsp.submit.select-collection.heading"/>
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#choosecollection\"%>"><fmt:message key="jsp.morehelp"/> </dspace:popup></h1>
<% if (collections.length > 0)
{
%>
<p><fmt:message key="jsp.submit.select-collection.info1"/></p>
<form action="<%= request.getContextPath() %>/submit" method="post" onkeydown="return disableEnterKey(event);">
<%
//if no collection was selected, display an error
if((noCollection != null) && (noCollection.booleanValue()==true))
{
%>
<div class="alert alert-warning"><fmt:message key="jsp.submit.select-collection.no-collection"/></div>
<%
}
%>
<div class="input-group">
<label for="tcollection" class="input-group-addon">
<fmt:message key="jsp.submit.select-collection.collection"/>
</label>
<dspace:selectcollection klass="form-control" id="tcollection" collection="-1"/>
</div><br/>
<%-- Hidden fields needed for SubmissionController servlet to know which step is next--%>
<%= SubmissionController.getSubmissionParameters(context, request) %>
<div class="row">
<div class="col-md-4 pull-right btn-group">
<input class="btn btn-default col-md-6" type="submit" name="<%=AbstractProcessingStep.CANCEL_BUTTON%>" value="<fmt:message key="jsp.submit.select-collection.cancel"/>" />
<input class="btn btn-primary col-md-6" type="submit" name="<%=AbstractProcessingStep.NEXT_BUTTON%>" value="<fmt:message key="jsp.submit.general.next"/>" />
</div>
</div>
</form>
<% } else { %>
<p class="alert alert-warning"><fmt:message key="jsp.submit.select-collection.none-authorized"/></p>
<% } %>
<p><fmt:message key="jsp.general.goto"/><br />
<a href="<%= request.getContextPath() %>"><fmt:message key="jsp.general.home"/></a><br />
<a href="<%= request.getContextPath() %>/mydspace"><fmt:message key="jsp.general.mydspace" /></a>
</p>
</dspace:layout>