[HepData-svn] r1737 - in trunk/hepdata-webapp/src/main: java/cedar/hepdata/webapp/pages resources/cedar/hepdata/webapp/pages

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed Jan 29 14:26:33 GMT 2014


Author: whalley
Date: Wed Jan 29 14:26:33 2014
New Revision: 1737

Log:
removing View current plot message if there are no plots

Modified:
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/View.java
   trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/View.tml

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/View.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/View.java	Wed Jan 29 12:05:39 2014	(r1736)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/View.java	Wed Jan 29 14:26:33 2014	(r1737)
@@ -29,6 +29,8 @@
     // @Inject
     // private org.hibernate.Session _session;
 
+    @InjectPage
+    private SavePlot saveplot;
 
     // Decode URL context into the params map
     public StreamResponse onActivate(EventContext context) {
@@ -538,5 +540,8 @@
         }
         return line;
     }
-
+    
+    public boolean getHaveCurrentPlot(){
+        return saveplot.getHaveSaved();
+    } 
 }

Modified: trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/View.tml
==============================================================================
--- trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/View.tml	Wed Jan 29 12:05:39 2014	(r1736)
+++ trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/View.tml	Wed Jan 29 14:26:33 2014	(r1737)
@@ -218,11 +218,13 @@
       <t:displayHtmlInsert p="paper" />
 
       <p>
+      <t:if test="haveCurrentPlot">
           <a href="/saveplot?list=all"
            title="Show the datasets which have been selected for combined plotting">View list of currently selected plots</a>
         <!-- <t:if test="searchquery"> -->
         <!--   | <a href="search?q=${searchquery}">Back to search...</a> -->
         <!-- </t:if> -->
+     </t:if>
      </p>
 
       <t:if test="showSys">


More information about the HepData-svn mailing list