Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Porting document type-based submission to JSPUI #117

Merged
merged 1 commit into from

3 participants

@zuki
Owner

https://jira.duraspace.org/browse/DS-1361

This is a porting the document type-based submission (DS-1127) to JSPUI. When using this function, you have to edit DSPACE/config/input-forms.xml to place the dc.type field only in page 1 and move other fields into page 2 and 3.

@lyncodev
Owner

[Code review] +1 minor code change
[Feature review] +1 very interesting feature

@helix84 helix84 merged commit 945b028 into DSpace:master
@zuki zuki deleted the zuki:submission branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 30, 2012
  1. @zuki
This page is out of date. Refresh to see the latest.
Showing with 14 additions and 0 deletions.
  1. +14 −0 dspace-jspui/src/main/webapp/submit/edit-metadata.jsp
View
14 dspace-jspui/src/main/webapp/submit/edit-metadata.jsp
@@ -1208,6 +1208,13 @@
// owning Collection ID for choice authority calls
int collectionID = si.getSubmissionItem().getCollection().getID();
+
+ // Fetch the document type (dc.type)
+ String documentType = "";
+ if( (item.getMetadata("dc.type") != null) && (item.getMetadata("dc.type").length >0) )
+ {
+ documentType = item.getMetadata("dc.type")[0].value;
+ }
%>
<dspace:layout locbar="off" navbar="off" titlekey="jsp.submit.edit-metadata.title">
@@ -1254,6 +1261,13 @@
for (int z = 0; z < inputs.length; z++)
{
boolean readonly = false;
+
+ // Omit fields not allowed for this document type
+ if(!inputs[z].isAllowedFor(documentType))
+ {
+ continue;
+ }
+
// ignore inputs invisible in this scope
if (!inputs[z].isVisible(scope))
{
Something went wrong with that request. Please try again.