Commit f0ff5a3babbf4c648afe3ff8640e20a28afa29be

Authored by Fernando Ribeiro
Exists in DSpace52++

Merge branch 'newtablink' into 'DSpace52++'

Open DOIs in new tab

DOIs são links externos

See merge request !15
dspace-jspui/src/main/java/org/dspace/app/webui/jsptag/ItemTag.java
... ... @@ -543,7 +543,8 @@ public class ItemTag extends TagSupport
543 543  
544 544 if (isLink)
545 545 {
546   - out.print("<a href=\"" + values[j].value + "\">"
  546 + out.print("<a " + (qualifier.equals("doi")?"target=\"_blank\"":"")
  547 + + " href=\"" + values[j].value + "\">"
547 548 + Utils.addEntities(values[j].value) + "</a>");
548 549 }
549 550 else if (isDate)
... ... @@ -562,7 +563,8 @@ public class ItemTag extends TagSupport
562 563 || value.startsWith("ftps://"))
563 564 {
564 565 // Already a URL, print as if it was a regular link
565   - out.print("<a href=\"" + value + "\">"
  566 + out.print("<a" + (qualifier.equals("doi")?"target=\"_blank\"":"")
  567 + + " href=\"" + value + "\">"
566 568 + Utils.addEntities(value) + "</a>");
567 569 }
568 570 else
... ... @@ -592,7 +594,8 @@ public class ItemTag extends TagSupport
592 594 }
593 595  
594 596 String url = urn2baseurl.get(foundUrn);
595   - out.print("<a href=\"" + url
  597 + out.print("<a " + (qualifier.equals("doi")?"target=\"_blank\"":"")
  598 + + " href=\"" + url
596 599 + value + "\">"
597 600 + Utils.addEntities(values[j].value)
598 601 + "</a>");
... ...