|
[HepData-svn] r1627 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/componentsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgWed May 15 11:20:21 BST 2013
Author: whalley Date: Wed May 15 11:20:21 2013 New Revision: 1627 Log: add red directories to the extra info for tables section Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java ============================================================================== --- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java Mon May 13 15:34:22 2013 (r1626) +++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java Wed May 15 11:20:21 2013 (r1627) @@ -118,8 +118,16 @@ location = comment.substring(10).replaceAll(" ","_"); } } - String descname="/home/whalley/resource/"+_dataset.getPaper().getSpiresId()+"/description."+location; - String linkname="/home/whalley/resource/"+_dataset.getPaper().getSpiresId()+"/link."+location; + + Long paperid = _dataset.getPaper().getSpiresId(); + if(paperid==null){ + paperid = _dataset.getPaper().getRedId(); + if(paperid==null){ + paperid = _dataset.getPaper().getInspireId(); + } + } + String descname="/home/whalley/resource/"+paperid+"/description."+location; + String linkname="/home/whalley/resource/"+paperid+"/link."+location; File descfile = new File(descname); if(descfile.exists()) { try{ @@ -129,8 +137,8 @@ String link = inlink.readLine(); writer.write(desc); writer.element("a"); - writer.attributes("href","/resource/"+_dataset.getPaper().getSpiresId()+"/"+link); - writer.write("here"); + writer.attributes("href","/resource/"+paperid+"/"+link); + writer.write(" table:"+location); writer.end(); } catch (IOException e){} }
More information about the HepData-svn mailing list |