Bug fix: the search.egw didn't always obtain the right host.
[egate.git] / www / showfull.egw
index c2d11ce..0ec8051 100644 (file)
@@ -1,8 +1,8 @@
 <html>
 {
-# $Id: showfull.egw,v 1.6 1995/11/08 16:14:34 adam Exp $
+# $Id: showfull.egw,v 1.8 1995/11/10 10:20:25 adam Exp $
 
-proc buttons {setNo no} {
+proc buttons {setNo no format} {
     global sessionId
     global env
     global hist
@@ -10,24 +10,34 @@ proc buttons {setNo no} {
     html "<p>\n"
     if {$no < [z39.$setNo resultCount]} {
         html {<a href="http:} $env(SCRIPT_NAME)
-        html / $sessionId {/showfull.egw/} $setNo + [expr $no + 1]
-        html {"> Next </a>} "| \n"
+        html / $sessionId {/showfull.egw/} $setNo + [expr $no + 1] + $format
+        html {">Next record</a>} " | \n"
     }
     if {$no > 1} {
         html {<a href="http:} $env(SCRIPT_NAME)
-        html / $sessionId {/showfull.egw/} $setNo + [expr $no - 1]
-        html {"> Prev </a>} "| \n"
+        html / $sessionId {/showfull.egw/} $setNo + [expr $no - 1] + $format
+        html {">Previous record</a>} " | \n"
     }
+
+    html {<a href="http:} $env(SCRIPT_NAME)
+    html / $sessionId {/showfull.egw/} $setNo + $no +
+    if {$format == "full"} {
+       html raw {">Raw format</a>} " | \n"
+    } else {
+       html full {">Full format</a>} " | \n"
+    }
+
     html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/search.egw/} $setNo + 1
-    html + [expr $hist($setNo,maxPresent) - 1]
-    html {"> Result </a>} "| \n"
+    html + $hist($setNo,maxPresent)
+    html {">Result</a>} " | \n"
        
     html {<a href="http:} $env(SCRIPT_NAME)
-    html / $sessionId {/targets.egw"> New target </a>} " | \n"
+    html / $sessionId {/targets.egw">New target</a>} " | \n"
     html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/query.egw/} $hist($setNo,host) + $setNo 
-    html {"> New query </a>} "<p>\n"
+    html {">New query</a>} "<p>\n"
+
 }
 
     if {[info commands saveState] == ""} {
@@ -42,6 +52,7 @@ proc buttons {setNo no} {
 
     set sno [lindex $sessionParms 0]
     set no [lindex $sessionParms 1]
+    set format [lindex $sessionParms 2]
 
     set setNo $sno
     
@@ -51,11 +62,10 @@ proc buttons {setNo no} {
     set total [z39.$setNo resultCount]
     html "<h2>Record \#$no out of $total </h2><br>\n"
 
-    buttons $setNo $no
-
-    z39present $setNo $no $no display-full
+    buttons $setNo $no $format
 
-    buttons $setNo $no
+    eval {z39present $setNo $no $no display-$format}
+    buttons $setNo $no $format
 }
 </body>
 </html>