Added new targets.
[egate.git] / www / z39util.tcl
index 1d78f64..59131ff 100644 (file)
@@ -1,5 +1,5 @@
 #
-# $Id: z39util.tcl,v 1.28 1996/01/29 17:31:48 adam Exp $
+# $Id: z39util.tcl,v 1.30 1996/02/12 13:39:41 adam Exp $
 #
 proc saveState {} {
     uplevel #0 {
@@ -104,7 +104,7 @@ proc display-brief {zset no tno} {
        set location [$zset getMarc $no field 260 * a] 
        set publisher [$zset getMarc $no field 260 * b]
         set year [$zset getMarc $no field 260 * c]
-    } ] } {
+    } dispError ] } {
         html { <a href="http:} $env(SCRIPT_NAME) /
         html $sessionId {/showfull.egw/} $setNo + $tno + $no + full {">}
         set p 0
@@ -140,12 +140,22 @@ proc display-brief {zset no tno} {
         if {$nope} {
             set v [join $cover ""]
             if {[string length $v] > 40} {
+                set nope 0
                 html [string range $v 0 38] "..."
-            } else {
+            } elseif {[string length $v] > 0} {
+                set nope 0
                 html $v
+            } else {
+                html "No Title"
             }
        }
         html {</a> }
+    } else {
+        html { <a href="http:} $env(SCRIPT_NAME) /
+        html $sessionId {/showfull.egw/} $setNo + $tno + $no + full {">}
+        html {No Title}
+        html {</a> }
+        html "Error: " $dispError "\n"
     }
     html "<br>\n"
 }
@@ -601,7 +611,7 @@ proc display-scan {setNo scanNo tno} {
             set hist($setNo,[expr $scanNo + 1],scanTerm) $t
         }
     }
-    html {<table border=0><tr>}
+    html {<table width=500 border=0><tr>}
     html {<td align=left><b>Scan term</b>}
     html {<td align=right><b>Hits</b>}
     html {<tr>} \n
@@ -1029,10 +1039,10 @@ proc z39history {} {
     html "<h2>History</h2><br>\n"
     if {$html3} {
         html {<table width=500 border=1><tr>}
-        html {<td align=left><b>Target</b>}
-        html {<td align=left><b>Database</b>}
-        html {<td align=right><b>Hits</b>}
-        html {<td><b>Query</b>}
+        html {<td align=center><b>Target</b>}
+        html {<td align=center><b>Database</b>}
+        html {<td align=center><b>Hits</b>}
+        html {<td align=center><b>Query</b>}
         html {<tr>} "\n"
     } else {
         html {<dl>} "\n"