diff --git a/dspace-api/src/main/resources/Messages.properties b/dspace-api/src/main/resources/Messages.properties
index 5a5e970aba..649c4cd4fd 100644
--- a/dspace-api/src/main/resources/Messages.properties
+++ b/dspace-api/src/main/resources/Messages.properties
@@ -78,6 +78,8 @@ itemlist.dc.type.degree = Degree
itemlist.et-al = et al
itemlist.thumbnail = Preview
+itemlist.title.undefined = Undefined
+
jsp.adminhelp =
jsp.administer = Administer
jsp.admintools = Admin Tools
diff --git a/dspace-jspui/src/main/java/org/dspace/app/webui/jsptag/BrowseListTag.java b/dspace-jspui/src/main/java/org/dspace/app/webui/jsptag/BrowseListTag.java
index f510dbd53a..3de8495938 100644
--- a/dspace-jspui/src/main/java/org/dspace/app/webui/jsptag/BrowseListTag.java
+++ b/dspace-jspui/src/main/java/org/dspace/app/webui/jsptag/BrowseListTag.java
@@ -483,7 +483,7 @@ public class BrowseListTag extends TagSupport
metadata = UIUtil.displayDate(dd, false, false, hrq);
}
// format the title field correctly for withdrawn and private items (ie. don't link)
- else if (field.equals(titleField) && (items[i].isWithdrawn() || !isDiscoverable(hrq, items[i])))
+ else if (field.equals(titleField) && items[i].isWithdrawn())
{
metadata = Utils.addEntities(metadataArray[0].value);
}
@@ -570,7 +570,24 @@ public class BrowseListTag extends TagSupport
metadata = "" + sb.toString() + "";
}
}
-
+ //In case title has no value, replace it with "undefined" so as the user has something to
+ //click in order to access the item page
+ else if (field.equals(titleField)){
+ String undefined = LocaleSupport.getLocalizedMessage(pageContext, "itemlist.title.undefined");
+ if (items[i].isWithdrawn())
+ {
+ metadata = "("+undefined+")";
+ }
+ // format the title field correctly (as long as the item isn't withdrawn, link to it)
+ else
+ {
+ metadata = ""
+ + "("+undefined+")"
+ + "";
+ }
+ }
+
// prepare extra special layout requirements for dates
String extras = "";
if (isDate[colIdx])
@@ -887,21 +904,4 @@ public class BrowseListTag extends TagSupport
throw new JspException("Server does not support DSpace's default encoding. ", e);
}
}
-
- /* whether the embedded item of the bitem is discoverable or not? */
- private boolean isDiscoverable(HttpServletRequest hrq, BrowseItem bitem)
- throws JspException
- {
- try
- {
- Context c = UIUtil.obtainContext(hrq);
- Item item = Item.find(c, bitem.getID());
-
- return item.isDiscoverable();
- }
- catch (SQLException sqle)
- {
- throw new JspException(sqle.getMessage(), sqle);
- }
- }
}
diff --git a/dspace-jspui/src/main/java/org/dspace/app/webui/jsptag/ItemListTag.java b/dspace-jspui/src/main/java/org/dspace/app/webui/jsptag/ItemListTag.java
index 5bdb105d9d..8fa54b328a 100644
--- a/dspace-jspui/src/main/java/org/dspace/app/webui/jsptag/ItemListTag.java
+++ b/dspace-jspui/src/main/java/org/dspace/app/webui/jsptag/ItemListTag.java
@@ -535,6 +535,23 @@ public class ItemListTag extends TagSupport
metadata = "" + sb.toString() + "";
}
}
+ //In case title has no value, replace it with "undefined" so as the user has something to
+ //click in order to access the item page
+ else if (field.equals(titleField)){
+ String undefined = LocaleSupport.getLocalizedMessage(pageContext, "itemlist.title.undefined");
+ if (items[i].isWithdrawn())
+ {
+ metadata = "("+undefined+")";
+ }
+ // format the title field correctly (as long as the item isn't withdrawn, link to it)
+ else
+ {
+ metadata = ""
+ + "("+undefined+")"
+ + "";
+ }
+ }
// prepare extra special layout requirements for dates
String extras = "";