[HepData-svn] r1738 - 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 15:00:14 GMT 2014


Author: whalley
Date: Wed Jan 29 15:00:14 2014
New Revision: 1738

Log:
adding the view plots to the search page

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

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/Search.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/Search.java	Wed Jan 29 14:26:33 2014	(r1737)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/Search.java	Wed Jan 29 15:00:14 2014	(r1738)
@@ -48,6 +48,9 @@
     @InjectPage
     private Search _search;
 
+    @InjectPage
+    private SavePlot saveplot;
+
     public String getQueryParam(String param) {
         String temp =  _reqGlobals.getRequest().getParameter(param);
         return _reqGlobals.getRequest().getParameter(param);
@@ -466,4 +469,8 @@
          if(firstnextlast.equals("no")) { _counter = 0; }
     }
 
+    public boolean getHaveCurrentPlot(){
+        return saveplot.getHaveSaved();
+    } 
+
 }

Modified: trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/Search.tml
==============================================================================
--- trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/Search.tml	Wed Jan 29 14:26:33 2014	(r1737)
+++ trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/Search.tml	Wed Jan 29 15:00:14 2014	(r1738)
@@ -31,15 +31,26 @@
 
   </p>
   <t:form t:id="searchagain" t:context="query" action="search">
-    Enter query:
-    <input t:type="textfield" t:value="query" name="q" size="50"/> 
-    <input type="submit" value="Search again"/>
+    <table><tr>
+    <td>Enter query:</td>
+    <td><input t:type="textfield" t:value="query" name="q" size="50"/> </td>
+    <td><input type="submit" value="Search again"/></td>
+    </tr><tr>
+    <td></td>
+    <td><a href="#" t:type="pagelink" t:page="displaytip" onClick="return popitup(this)">...need help with searching?</a></td>
+    <td></td>
+    </tr>
+    </table>
   </t:form>
-<p/>
-    <a href="#" t:type="pagelink" t:page="displaytip" onClick="return popitup(this)">...need help with searching?</a>
 
+    <t:if test="haveCurrentPlot">
+    <br/>
+       <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>
 
- <p/>
+
+<br/>
 
   <div class="searchresultsbox">
     <t:loop source="papers" value="paper">


More information about the HepData-svn mailing list