Hi Bill,

The patches you listed below were not fully accepted into DSpace at the time they were created (2005-2006). Since then they were all closed & marked obsolete, as they became so old over the years (most of these patches look to have been for DSpace 1.4, and likely would not work on current versions of DSpace).

However, the DSpace Committers still do have a "closed access" archive of each of these patches (in scenarios where people need a copy of them)

That all being said...here's what I've found for each patch:

On 12/6/2011 4:22 PM, Bill Page wrote:
Checkbox/Radio buttons in Submission screens
http://sourceforge.net/tracker/index.php?func=detail&aid=1557325&group_id=
19984&atid=319984

This patch is 100% obsolete. I created this patch before the Configurable Submission system was created. The Configurable Submission System that was released in DSpace 1.5 actually included the functionality described in this patch. So, this functionality already exists in current versions of DSpace.

new elements in input-forms.xml
http://sourceforge.net/tracker/index.php?func=detail&aid=1440925&group_id=
19984&atid=319984

This patch allowed someone to insert a link to the right of a hint in a submission form. It was never accepted into DSpace. The patch itself will likely not work on current versions of DSpace, as it was created before the Configurable Submission system was accepted.

I've attached the patch from 2006, named: new-elements-patch.tar.gz

Input-Type + Language attribute
http://sourceforge.net/tracker/index.php?func=detail&aid=1426556&group_id=
19984&atid=319984

Same as previous. Never was accepted into DSpace. The patch itself will likely not work on current versions of DSpace, as it was created before the Configurable Submission system was accepted.

I've attached the patch from 2006, named: input-type-lang.patch


Items with no files
http://sourceforge.net/tracker/index.php?func=detail&aid=1370187&group_id=
19984&atid=319984

The functionality described by this patch now exists in DSpace. Please see the following setting in your dspace.cfg file:

# Whether or not we REQUIRE that a file be uploaded
# during the 'Upload' step in the submission process
# Defaults to true; If set to 'false', submitter has option to skip upload
#webui.submit.upload.required = true


I hope this helps!

- Tim

Attachment: new-elements-patch.tar.gz
Description: GNU Zip compressed data

diff -rN -u old-dspace-source/config/dspace.cfg 
new-dspace-source/config/dspace.cfg
--- old-dspace-source/config/dspace.cfg 2006-02-07 14:10:17.579084800 -0500
+++ new-dspace-source/config/dspace.cfg 2006-02-07 14:10:18.622506800 -0500
@@ -288,7 +296,14 @@
 #                             (any or no qualifier)
 #    dc.identifier.uri(link) = DC identifier.uri, render as a link
 #    dc.date.issued(date)   = DC date.issued, render as a date
-#
+#    dc.contributor.author(append) = DC contributor.author render
+#                                    multiple authors as a semicolon delimited 
list
+#    dc.element.qualifier(search) = DC qualifier rendered as a simple search
+#                                    when qualifier is an indexed field, e.g.
+#                                    dc.contributor.author. See search.index 
list below
+#    dc.contributor.author(append+search) = Render all authors in a 
+#                                    semicolon delimited list as links to all 
their other
+#                                    items in the database
 # If an item has no value for a particular field, it won't be displayed.
 # The name of the field for display will be drawn from the current UI
 # dictionary, using the key:
@@ -299,13 +314,17 @@
 #        "metadata.dc.contributor.*" 
 #        "metadata.dc.date.issued"
 #
-#webui.itemdisplay.default = dc.title, dc.title.alternative, dc.contributor.*, 
\
+#webui.itemdisplay.default = dc.title(prefix+lang), dc.title.alternative, 
dc.contributor.*, \
 #                            dc.subject, dc.date.issued(date), dc.publisher, \
 #                            dc.identifier.citation, 
dc.relation.ispartofseries, \
 #                            dc.description.abstract, dc.description, \
 #                            dc.identifier.govdoc, dc.identifier.uri(link), \
 #                            dc.identifier.isbn, dc.identifier.issn, \
 #                            dc.identifier.ismn, dc.identifier
+webui.itemdisplay.default = dc.identifier.other(append), dc.title, \
+                            dc.contributor, 
dc.contributor.author(append+search), \
+                           dc.description.abstract, dc.subject(append)
+
 
 # Specify which collections use which views by Handle.
 #
diff -rN -u old-dspace-source/jsp/submit/edit-metadata.jsp 
new-dspace-source/jsp/submit/edit-metadata.jsp
--- old-dspace-source/jsp/submit/edit-metadata.jsp      2006-02-07 
14:10:17.764913200 -0500
+++ new-dspace-source/jsp/submit/edit-metadata.jsp      2006-02-07 
14:10:18.825116400 -0500
@@ -99,16 +99,16 @@
          fieldCount = 1;
 
       //Width hints used here to affect whole table 
-      headers.append("<tr><td width=\"40%\">&nbsp;</td>")
-             .append("<td class=\"submitFormDateLabel\" width=\"5%\">")
+      headers.append("<tr><td width=\"20%\">&nbsp;</td>")
+             .append("<td class=\"submitFormDateLabel\" width=\"25%\">")
 //             .append("Last name<br>e.g. <strong>Smith</strong></td>")
                         .append(LocaleSupport.getLocalizedMessage(pageContext, 
"jsp.submit.edit-metadata.lastname"))
                         .append("</td>")
-             .append("<td class=\"submitFormDateLabel\" width=\"5%\">")
+             .append("<td class=\"submitFormDateLabel\" width=\"25%\">")
 //             .append("First name(s) + \"Jr\"<br> e.g. <strong>Donald 
Jr</strong></td>")
                         .append(LocaleSupport.getLocalizedMessage(pageContext, 
"jsp.submit.edit-metadata.firstname"))
                         .append("</td>")
-             .append("<td width=\"40%\">&nbsp;</td>")
+             .append("<td width=\"30%\">&nbsp;</td>")
              .append("</tr>");
       out.write(headers.toString());
 
@@ -146,6 +146,7 @@
            .append("\" size=\"23\" value=\"")
            .append(dpn.getFirstNames()).append("\"/></td>\n");
 
+
         if (repeatable && i < defaults.length) 
         {
            name.setLength(0);
@@ -178,7 +179,6 @@
            sb.append("<td>&nbsp;</td></tr>");
         }
       }
-
       out.write(sb.toString());
     }
 
@@ -258,7 +258,7 @@
             .append((dateIssued.getYear() > 0 ? 
                 String.valueOf(dateIssued.getYear()) : "" ))
            .append("\"/></td>\n");
-    
+  
         if (repeatable && i < defaults.length) 
         {
            // put a remove button next to filled in values
@@ -286,8 +286,7 @@
            // put a blank if nothing else
            sb.append("<td>&nbsp;</td></tr>");
         }
-      }
-
+        }
       out.write(sb.toString());
     }
 
@@ -364,7 +363,6 @@
            sb.append("<td>&nbsp;</td></tr>");
         }
       }
-
       out.write(sb.toString());
     }
 
@@ -432,10 +430,85 @@
            sb.append("<td>&nbsp;</td></tr>");
         }
       }
-
       out.write(sb.toString());
-    }
+    }
 
+     void doTextAreaLang(javax.servlet.jsp.JspWriter out, Item item,
+      String fieldName, String element, String qualifier, boolean repeatable,
+      int fieldCountIncr, String label, PageContext pageContext) 
+      throws java.io.IOException 
+    {
+
+      DCValue[] defaults = item.getDC(element, qualifier, Item.ANY);
+      int fieldCount = defaults.length + fieldCountIncr;
+      StringBuffer sb = new StringBuffer();
+      String val;
+      String lang;
+
+      if (fieldCount == 0)
+         fieldCount = 1;
+
+      for (int i = 0; i < fieldCount; i++) 
+      {
+        if (i == 0) 
+           sb.append("<tr><td class=\"submitFormLabel\">")
+             .append(label)
+             .append("</td>");
+        else
+           sb.append("<tr><td>&nbsp;</td>");
+
+        if (i < defaults.length) {
+           val = defaults[i].value.replaceAll("\"", "&quot;");
+           lang =defaults[i].language;
+        } else {
+          val = "";
+          lang ="";
+         };
+         sb.append("<td colspan=\"2\"><textarea name=\"value_")
+           .append(fieldName);
+         if (repeatable)
+           sb.append("_").append(i);
+         sb.append("\" rows=\"4\" cols=\"45\" >")
+           .append(val)
+          .append("</textarea>(<input type=\"text\" name=\"language_")
+           .append(fieldName);
+         if (repeatable)
+           sb.append("_").append(i);
+         sb.append("\" size=\"5\" value=\"")
+           .append(lang)
+          .append("\"/>)</td>\n");
+
+        if (repeatable && i < defaults.length) 
+        {
+           // put a remove button next to filled in values
+           sb.append("<td><input type=\"submit\" name=\"submit_")
+             .append(fieldName)
+             .append("_remove_")
+             .append(i)
+//           .append("\" value=\"Remove This Entry\"/> </td></tr>");
+             .append("\" value=\"")
+             .append(LocaleSupport.getLocalizedMessage(pageContext, 
"jsp.submit.edit-metadata.button.remove"))
+             .append("\"/> </td></tr>");
+        } 
+        else if (repeatable && i == fieldCount - 1) 
+        {
+           // put a 'more' button next to the last space
+           sb.append("<td><input type=\"submit\" name=\"submit_")
+             .append(fieldName)
+//           .append("_more\" value=\"Add More\"/> </td></tr>");
+             .append("_more\" value=\"")
+             .append(LocaleSupport.getLocalizedMessage(pageContext, 
"jsp.submit.edit-metadata.button.add"))
+             .append("\"/> </td></tr>");
+        } 
+        else 
+        {
+           // put a blank if nothing else
+           sb.append("<td>&nbsp;</td></tr>");
+        }
+      }
+      out.write(sb.toString());
+    }
+
     void doOneBox(javax.servlet.jsp.JspWriter out, Item item,
       String fieldName, String schema, String element, String qualifier, 
boolean repeatable,
       int fieldCountIncr, String label, PageContext pageContext) 
@@ -494,6 +567,83 @@
              .append(LocaleSupport.getLocalizedMessage(pageContext, 
"jsp.submit.edit-metadata.button.add"))
              .append("\"/> </td></tr>");
         } 
+        else 
+        {
+           // put a blank if nothing else
+           sb.append("<td>&nbsp;</td></tr>");
+        } 
+      }
+      out.write(sb.toString());
+    }
+
+    void doOneBoxLang(javax.servlet.jsp.JspWriter out, Item item,
+      String fieldName, String element, String qualifier, boolean repeatable,
+      int fieldCountIncr, String label, PageContext pageContext) 
+      throws java.io.IOException 
+    {
+
+      DCValue[] defaults = item.getDC(element, qualifier, Item.ANY);
+      int fieldCount = defaults.length + fieldCountIncr;
+      StringBuffer sb = new StringBuffer();
+      String val;
+      String lang;
+
+      if (fieldCount == 0)
+         fieldCount = 1;
+
+      for (int i = 0; i < fieldCount; i++) 
+      {
+        if (i == 0) 
+           sb.append("<tr><td class=\"submitFormLabel\">")
+             .append(label)
+             .append("</td>");
+        else
+           sb.append("<tr><td>&nbsp;</td>");
+
+         if (i < defaults.length) {
+           val = defaults[i].value.replaceAll("\"", "&quot;");
+           lang =defaults[i].language;
+         } else {
+           val = "";
+           lang ="";
+         };
+         sb.append("<td colspan=\"2\">");
+         sb.append("<input type=\"text\" name=\"value_")
+           .append(fieldName);
+         if (repeatable)
+           sb.append("_").append(i);
+         sb.append("\" size=\"50\" value=\"")
+           .append(val)
+          .append("\"/>(<input type=\"text\" name=\"language_")
+           .append(fieldName);
+         if (repeatable)
+           sb.append("_").append(i);
+         sb.append("\" size=\"5\" value=\"")
+           .append(lang)
+          .append("\"/>)</td>\n");
+
+        if (repeatable && i < defaults.length) 
+        {
+           // put a remove button next to filled in values
+           sb.append("<td><input type=\"submit\" name=\"submit_")
+             .append(fieldName)
+             .append("_remove_")
+             .append(i)
+//           .append("\" value=\"Remove This Entry\"/> </td></tr>");
+             .append("\" value=\"")
+             .append(LocaleSupport.getLocalizedMessage(pageContext, 
"jsp.submit.edit-metadata.button.remove"))
+             .append("\"/> </td></tr>");
+        } 
+        else if (repeatable && i == fieldCount - 1) 
+        {
+           // put a 'more' button next to the last space
+           sb.append("<td><input type=\"submit\" name=\"submit_")
+             .append(fieldName)
+//           .append("_more\" value=\"Add More\"/> </td></tr>");
+             .append("_more\" value=\"")
+             .append(LocaleSupport.getLocalizedMessage(pageContext, 
"jsp.submit.edit-metadata.button.add"))
+             .append("\"/> </td></tr>");
+        } 
         else 
         {
            // put a blank if nothing else
@@ -578,14 +728,14 @@
 //          .append("\" value=\"Remove\"/></td></tr>\n");
             .append("\" value=\"")
             .append(LocaleSupport.getLocalizedMessage(pageContext, 
"jsp.submit.edit-metadata.button.remove2"))
-            .append("\"/></td></tr>\n");
+            .append("\"/></td>\n");
         else 
         {
            sb.append("<td align=\"left\"><input type=\"text\" name=\"")
              .append(fieldName)
              .append("_").append(i)
              .append("\" size=\"15\"/></td>");
-
+       }
           if (i+1 >= fieldCount) 
           {
             sb.append("<td><input type=\"submit\" name=\"submit_")
@@ -597,11 +747,10 @@
           } 
           else 
           {
-            sb.append("</td>");
+            sb.append("<td>&nbsp;</td>");
           }
-          sb.append("<td>&nbsp;</td></tr>");
+          sb.append("</tr>");
         }
-      }
 
       out.write(sb.toString());
     }
@@ -710,7 +859,6 @@
            sb.append("<td>&nbsp;</td></tr>");
         }
       }
-
       out.write(sb.toString());
     }
 
@@ -814,7 +962,7 @@
      <%-- HACK: a <center> tag seems to be the only way to convince certain 
--%>
      <%--       browsers to center the table. --%>
      <center>
-     <table>
+     <table border="0">
 <%
         int pageIdx = pageNum - SubmitServlet.EDIT_METADATA_1; 
      DCInput[] inputs = inputSet.getPageRows(pageIdx, 
si.submission.hasMultipleTitles(),
@@ -897,7 +1045,12 @@
                   doTextArea(out, item, fieldName, dcSchema, dcElement, 
dcQualifier, 
                                  repeatable, fieldCountIncr, label, 
pageContext);
 
-       } 
+       } 
+       else if (inputType.equals("textarea+lang")) 
+       {
+                       doTextAreaLang(out, item, fieldName, dcElement, 
dcQualifier, 
+                                repeatable, fieldCountIncr, label, 
pageContext);
+       } 
        else if (inputType.equals("dropdown")) 
        {
                        doDropDown(out, item, fieldName, dcSchema, dcElement, 
dcQualifier, 
@@ -907,6 +1060,11 @@
        {
                        doTwoBox(out, item, fieldName, dcSchema, dcElement, 
dcQualifier, 
                                 repeatable, fieldCountIncr, label, 
pageContext);
+       }
+       else if (inputType.equals("onebox+lang")) 
+       {
+                       doOneBoxLang(out, item, fieldName, dcElement, 
dcQualifier, 
+                                repeatable, fieldCountIncr, label, 
pageContext);
        } 
        else 
        {
@@ -917,9 +1075,9 @@
 
 <%-- HACK: Using this line to give the browser hints as to the widths of cells 
--%>
        <tr>
-         <td width="40%">&nbsp;</td>
-         <td colspan="2" width="5%">&nbsp;</td>
-         <td width="40%">&nbsp;</td>
+         <td width="20%">&nbsp;</td>
+         <td colspan="2" width="50%">&nbsp;</td>
+         <td width="30%">&nbsp;</td>
        </tr>
 
 <% 
diff -rN -u old-dspace-source/src/org/dspace/app/webui/jsptag/ItemTag.java 
new-dspace-source/src/org/dspace/app/webui/jsptag/ItemTag.java
--- old-dspace-source/src/org/dspace/app/webui/jsptag/ItemTag.java      
2006-02-07 14:10:18.470889600 -0500
+++ new-dspace-source/src/org/dspace/app/webui/jsptag/ItemTag.java      
2006-02-07 14:10:19.352437400 -0500
@@ -283,6 +283,9 @@
 
         String configLine = ConfigurationManager
                 .getProperty("webui.itemdisplay." + style);
+               
+       String configURL = ConfigurationManager
+                .getProperty("dspace.url");
 
         if (configLine == null)
             configLine = defaultFields;
@@ -303,7 +306,10 @@
                String field = st.nextToken().trim();
             boolean isDate = false;
             boolean isLink = false;
-
+            boolean isAppend = false;
+            boolean isPrefixLang = false;
+            boolean isAppendSearch = false;
+         
             // Find out if the field should rendered as a date or link
 
             if (field.indexOf("(date)") > 0)
@@ -317,6 +323,24 @@
                 field = field.replaceAll("\\(link\\)", "");
                 isLink = true;
             }
+           
+           if (field.indexOf("(append)") > 0)
+            {
+                field = field.replaceAll("\\(append\\)", "");
+                isAppend = true;
+            }
+           if (field.indexOf("(append+search)") > 0)
+            {
+                field = field.replaceAll("\\(append\\+search\\)", "");
+                isAppendSearch = true;
+            }
+
+           if (field.indexOf("(prefix+lang)") > 0)
+            {
+                field = field.replaceAll("\\(prefix\\+lang\\)", "");
+                isPrefixLang = true;
+            }
+
             // Get the separate element + qualifier
             // TODO: Support for non-DC
 
@@ -348,7 +372,10 @@
                 {
                     if (j > 0)
                     {
-                        out.print("<br />");
+                           if (isAppend || isAppendSearch)
+                                   out.print("; ");
+                           else
+                                   out.print("<br />");
                     }
 
                     if (isLink)
@@ -356,6 +383,13 @@
                         out.print("<a href=\"" + values[j].value + "\">"
                                 + Utils.addEntities(values[j].value) + "</a>");
                     }
+                    else if (isAppendSearch)
+                           // This assumes the qualifier is the index, i.e. 
search.index.1 = author:contributor.*
+                    {
+                        out.print("<a href=\""+ configURL + 
"/simple-search?query=(("+qualifier+":%22" + values[j].value + "%22))\">"
+                                + Utils.addEntities(values[j].value) + "</a>");
+                    }
+
                     else if (isDate)
                     {
                         DCDate dd = new DCDate(values[j].value);
@@ -363,6 +397,15 @@
                         // Parse the date
                         out.print(UIUtil.displayDate(dd, false, false));
                     }
+                    else if (isAppend)
+                    {
+                         out.print(Utils.addEntities(values[j].value));
+                   }
+                    else if (isPrefixLang)
+                    {
+                        out.print(Utils.addEntities("("+values[j].language)+") 
");
+                        out.print(Utils.addEntities(values[j].value));
+                   }
                     else
                     {
                         out.print(Utils.addEntities(values[j].value));
diff -rN -u 
old-dspace-source/src/org/dspace/app/webui/servlet/SubmitServlet.java 
new-dspace-source/src/org/dspace/app/webui/servlet/SubmitServlet.java
--- old-dspace-source/src/org/dspace/app/webui/servlet/SubmitServlet.java       
2006-02-07 14:10:18.487097600 -0500
+++ new-dspace-source/src/org/dspace/app/webui/servlet/SubmitServlet.java       
2006-02-07 14:10:19.378680600 -0500
@@ -877,15 +877,20 @@
              {
                for (int z = 0; z < vals.length; z++)
                {
-                       item.addMetadata(dcSchema, dcElement, dcQualifier, 
"en", vals[z]);
+                       item.addMetadata(dcSchema, dcElement, dcQualifier, 
"en_CA", vals[z]);
                }
              }
-          }
+          }
+          else if (inputType.equals("onebox+lang") || 
inputType.equals("textarea+lang"))
+          {
+                    readTextLang(request, item, dcSchema, dcElement, 
dcQualifier, 
+                                inputs[j].getRepeatable());
+          }
           else if ((inputType.equals("onebox")) || 
(inputType.equals("twobox")) || 
                                (inputType.equals("textarea")))
           {
                        readText(request, item, dcSchema, dcElement, 
dcQualifier, 
-                                        inputs[j].getRepeatable(), "en");
+                                        inputs[j].getRepeatable(), "en_CA");
           }
           else 
           {
@@ -2434,6 +2439,60 @@
             }
         }
     }
+
+    private void readTextLang(HttpServletRequest request, Item item, String 
schema,
+            String element, String qualifier, boolean repeated)
+    {
+        // WSP and DAG: Now language is part of form
+
+        String dcname = MetadataField.formKey(schema,element,qualifier);
+
+        // Values to add
+        List vals = new LinkedList();
+        List langs = new LinkedList();
+
+        if (repeated)
+        {
+            vals = getRepeatedParameter(request, "value_"+dcname);
+            langs = getRepeatedParameter(request, "language_"+dcname);
+
+            // Find out if the relevant "remove" button was pressed
+            String buttonPressed = UIUtil.getSubmitButton(request, "");
+            String removeButton = "submit_" + dcname + "_remove_";
+
+            if (buttonPressed.startsWith(removeButton))
+            {
+                int valToRemove = Integer.parseInt(buttonPressed
+                        .substring(removeButton.length()));
+
+                vals.remove(valToRemove);
+            }
+        }
+        else
+        {
+            // Just a single name
+            vals.add(request.getParameter("value_"+dcname).trim());
+            langs.add(request.getParameter("language_"+dcname).trim());
+            ;
+        }
+
+        // Remove existing values
+        item.clearMetadata(schema, element, qualifier, Item.ANY);
+
+        // Put the names in the correct form
+        for (int i = 0; i < vals.size(); i++)
+        {
+            // Add to the database if non-empty
+            String s = (String) vals.get(i);
+            String lang = (String) langs.get(i);
+
+            if ((s != null) && !s.equals(""))
+            {
+                item.addMetadata(schema, element, qualifier, lang, s);
+            }
+        }
+    }
+
 
     /**
      * Fill out a DC date field with the value from a form. The date is taken
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to