Commit 3060f542a595da613715ef8184abf346312efda0

Authored by Fernando Ribeiro
1 parent 694c32226c

Missing correction Tiago to add images to dc rights in BrowseListTag in dspace/modules...

dspace/modules/jspui/src/main/java/org/dspace/app/webui/jsptag/BrowseListTag.java
... ... @@ -97,6 +97,8 @@ public class BrowseListTag extends TagSupport
97 97  
98 98 private static String authorField = "dc.contributor.*";
99 99  
  100 + private static String rightsField = "dc.rights";
  101 +
100 102 private int authorLimit = -1;
101 103  
102 104 private transient BrowseInfo browseInfo;
... ... @@ -517,6 +519,21 @@ public class BrowseListTag extends TagSupport
517 519 + Utils.addEntities(metadataArray[0].value)
518 520 + "</a>";
519 521 }
  522 + //image for dc.rights
  523 + else if (field.equals(rightsField)) {
  524 + String mImage = "/image/custom/undefined.png";
  525 + String mdv = metadataArray[0].value;
  526 + if (mdv.equals("openAccess"))
  527 + mImage = "/image/custom/openAccess.png";
  528 + else if (mdv.startsWith("embargoedAccess"))
  529 + mImage = "/image/custom/embargoedAccess.png";
  530 + else if (mdv.equals("closedAccess"))
  531 + mImage = "/image/custom/closedAccess.png";
  532 + else if (mdv.equals("restrictedAccess"))
  533 + mImage = "/image/custom/restrictedAccess.png";
  534 + metadata = "<img src=\"" + mImage + "\" title=\"" + mdv +"\" alt=\""
  535 + + mdv + "\" height=\"20px\" border=\"0\">";
  536 + }
520 537 // format all other fields
521 538 else
522 539 {
... ...