X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=www%2Fz39util.tcl;h=bd6a7b52d8685779a95c8dde5f605a184ff613fa;hb=e2ba1ab3d7b2152c1fd81e84e542f18703f182b5;hp=9efda0b3fc2c7011e13cf6958e2bb39c291bd288;hpb=02d3e042a063e539acce998f74b00a09df000cd0;p=egate.git
diff --git a/www/z39util.tcl b/www/z39util.tcl
index 9efda0b..bd6a7b5 100644
--- a/www/z39util.tcl
+++ b/www/z39util.tcl
@@ -1,5 +1,5 @@
#
-# $Id: z39util.tcl,v 1.38 1996/03/11 17:40:49 adam Exp $
+# $Id: z39util.tcl,v 1.45 1996/05/24 11:16:02 adam Exp $
#
proc saveState {} {
uplevel #0 {
@@ -120,6 +120,7 @@ proc display-medium {zset no setNo targetNo} {
set location [$zset getMarc $no field 260 * a]
set publisher [$zset getMarc $no field 260 * b]
set year [$zset getMarc $no field 260 * c]
+ set score [$zset getMarc $no field 999 * r]
} dispError ] } {
html { }
@@ -161,6 +162,9 @@ proc display-medium {zset no setNo targetNo} {
html "No Title"
}
html { }
+ if {[scan $score %d nscore] == 1} {
+ html "; Score " $nscore
+ }
} else {
html { }
@@ -175,6 +179,7 @@ proc display-brief {zset no setNo targetNo} {
global env
global sessionId
+ html { \n"
- button-europagate
+ button-main
if {$setMax > 0 && $setMax < [$zz.$setNo resultCount]} {
+ if {!$useIcons} {
+ html "\n | "
+ }
html {}
+ html {">
\n"
dl-marc-field $zset $no 538 * "System details" {} "
\n"
dl-marc-field $zset $no 787 {[rstw6]} "Related information" {} "
\n"
+ dl-marc-field $zset $no 999 r "Score" {} ", "
dl-marc-field $zset $no 001 * "Local control number" {} ", "
html "\n"
}
@@ -581,41 +587,47 @@ proc display-full-wais {zset no setNo targetNo} {
} else {
set nwi 1
}
+ html "\n"
+ html {
\n"
- html {URL: } $data(linkage) "
\n"
+ html {
\n"
} else {
- html {Title: } [join [$zset getWAIS $no headline]] "
\n"
+ html {
\n"
+ html {
\n"
+ html {
\n"
}
if {!$nwi} {
- html "\n" [join [$zset getWAIS $no text]] "\n
\n"
+ html "\n" [join [$zset getWAIS $no text]] "\n
\n"
return
}
if {[info exists data(bytes)]} {
- html {Bytes: } $data(bytes) "
\n"
+ html {
\n"
+ html {
\n"
+ html {
\n"
}
if {[info exists data(ip)]} {
- html {
\n"
+ html {
\n"
+ }
+ if {0} {
+ html {}
+ html {Similar WAIS record
}
+ }
+ if {[info exists data($i,linkage)]} {
+ html "
}
- html "
\n"
}
@@ -1353,35 +1398,48 @@ proc display-result-set-m-score {setNo} {
if {$zstatus($i) != 2} continue
set status [z39$i.$setNo responseStatus]
if {[lindex $status 0] != "DBOSD"} continue
- if {$hist($setNo,$i,offset) > $hist($setNo,maxPresent)} {
- set nor $hist($setNo,maxPresent)
- } else {
- set nor $hist($setNo,$i,offset)
- }
+ set nor $hist($setNo,$i,offset)
for {set j 1} {$j <= $nor} {incr j} {
if {![string compare [z39$i.$setNo recordType $j] WAIS]} {
set score [z39$i.$setNo getWAIS $j score]
- if {$score > 0} {
- lappend scoreArray [list $score $i $j]
+ } elseif {![string compare [z39$i.$setNo recordType $j] USmarc]} {
+ set score [z39$i.$setNo getMarc $j field 999 * r]
+ if {[scan $score %d score] != 1} {
+ set score 10
}
} else {
- lappend scoreArray [list 10 $i $j]
+ set score 10
+ }
+ if {$score > 0} {
+ lappend scoreArray [list $score $i $j]
}
}
}
if {![info exists scoreArray]} {
html "
\n" } -proc button-europagate {} { +proc button-main {} { global useIcons html {} if {$useIcons} { html {} } else { - html {Europagate | } + html {Europagate} } } -proc button-define-target {more} { +proc button-feedback {} { + global useIcons + + html {} + if {$useIcons} { + html {} + } else { + html {User Feedback} + } +} + +proc button-define-target {} { global useIcons global env global sessionId + if {!$useIcons} { + html "\n | " + } html {} } else { html {">Define Target} - if {$more} { - html " | \n" - } else { - html "\n" - } } } -proc button-new-target {more} { +proc button-new-target {} { global useIcons global env global sessionId - global mMode + global scriptTarget - html {} } else { html {">New Target} - if {$more} { - html " | \n" - } else { - html "\n" - } } } -proc button-view-history {more} { +proc button-view-history {} { global useIcons global env global sessionId global nextSetNo + if {!$useIcons} { + html "\n | " + } html {} } else { html {">View History} - if {$more} { - html " | \n" - } else { - html "\n" - } } } -proc button-new-query {more setNo} { +proc button-new-query {setNo} { global useIcons global env global sessionId global hist - global mMode + global scriptQuery - html {} + html {} + if {$useIcons} { html {} } else { html {New Query} - if {$more} { - html " | \n" - } else { - html "\n" - } } } -proc button-scan-window {more setNo} { +proc button-result-set {setNo tno} { + global useIcons + global env + global sessionId + global hist + + if {!$useIcons} { + html "\n | " + } + html {} + } else { + html {">Result Set} + } +} + +proc button-scan-window {setNo} { global useIcons global env global sessionId global hist + if {!$useIcons} { + html "\n | " + } set targetNo 0 html {} @@ -1722,20 +1822,13 @@ proc button-scan-window {more setNo} { html {alt="Scan" border=0>} } else { html {Scan} - if {$more} { - html " | \n" - } else { - html "\n" - } } } proc maintenance {} { html {