<html>
{
-# $Id: search.egw,v 1.9 1995/11/07 14:56:59 adam Exp $
+# $Id: search.egw,v 1.10 1995/11/08 12:42:17 adam Exp $
+
+proc buttons {setNo setMax startPos} {
+ global sessionId
+ global env
+ global hist
+
+ html "<p>\n"
+ if {$setMax < [z39.$setNo resultCount]} {
+ html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
+ html / $sessionId {/search.egw/} $setNo + [expr $setMax + 1]
+ html + [expr $setMax + $hist($setNo,maxPresent)] {"> Next </a>} "| \n"
+ }
+ if {$startPos != "" && $startPos != "1"} {
+ html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
+ html / $sessionId {/search.egw/} $setNo
+ if {[expr $startPos - $hist($setNo,maxPresent)] > 1} {
+ html + [expr $startPos - $hist($setNo,maxPresent)]
+ html + [expr $startPos - 1]
+ }
+ html {"> Prev </a>} "| \n"
+ }
+ html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
+ html / $sessionId {/targets.egw"> New target </a>} " | \n"
+ html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
+ html / $sessionId {/query.egw/} $hist($setNo,host) + $setNo
+ html {"> New query </a>} "<p>\n"
+}
if {[info commands saveState] == ""} {
source z39util.tcl
if {$setMax > $endPos} {
set setMax $endPos
}
+ if {$setMax > 0} {
+ buttons $setNo $setMax $startPos
+ }
}
if {$setMax > 0} {
z39present $setNo $setOffset $setMax display-brief
}
-}
-
-<hr>
-{
- if {$setMax < [z39.$setNo resultCount]} {
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/search.egw/} $setNo + [expr $setMax + 1]
- html + [expr $setMax + $hist($setNo,maxPresent)] {"> Next </a>} "| \n"
- }
- if {$startPos != "" && $startPos != "1"} {
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/search.egw/} $setNo
- if {[expr $startPos - $hist($setNo,maxPresent)] > 1} {
- html + [expr $startPos - $hist($setNo,maxPresent)]
- html + [expr $startPos - 1]
- }
- html {"> Prev </a>} "| \n"
- }
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/targets.egw"> New target </a>} " | \n"
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/query.egw/} $host + $setNo {"> New query </a>}
+ buttons $setNo $setMax $startPos
}
{