* Removed bogus doc.txt entry from mrlib/info.ss

* Made Help Desk show a clear error message if a specified doc.txt
  file is missing

svn: r3992
This commit is contained in:
Eli Barzilay 2006-08-09 01:10:11 +00:00
parent 8584be4570
commit 22b6119e74
2 changed files with 40 additions and 42 deletions

View File

@ -124,65 +124,64 @@
"<html>" "<html>"
(xexpr->string `(HEAD ,hd-css ,@hd-links (TITLE "PLT Manuals"))) (xexpr->string `(HEAD ,hd-css ,@hd-links (TITLE "PLT Manuals")))
"<body>" "<body>"
(append (append
(list "<H1>Installed Manuals</H1>") (list "<H1>Installed Manuals</H1>")
(if (repos-or-nightly-build?) (if (repos-or-nightly-build?)
(list (list
"<b>Subversion:</b> <a mzscheme=\"" "<b>Subversion:</b> <a mzscheme=\""
(to-string/escape-quotes (to-string/escape-quotes
`((dynamic-require '(lib "refresh-manuals.ss" "help") 'refresh-manuals))) `((dynamic-require '(lib "refresh-manuals.ss" "help") 'refresh-manuals)))
"\">" "\">"
(string-constant plt:hd:refresh-all-manuals) (string-constant plt:hd:refresh-all-manuals)
"</a> &nbsp; &nbsp;" "</a> &nbsp; &nbsp;"
(format "<a href=\"~a\">flush index and keyword cache</a><br>" flush-manuals-url)) (format "<a href=\"~a\">flush index and keyword cache</a><br>" flush-manuals-url))
'()) '())
(build-known-manuals names+paths) (build-known-manuals names+paths)
(list "<h3>Doc.txt</h3><ul>") (list "<h3>Doc.txt</h3><ul>")
(map (map
(lambda (collection-doc-file name) (lambda (collection-doc-file name)
(format "<LI> <A HREF=\"/servlets/doc-anchor.ss?file=~a&name=~a&caption=Documentation for the ~a collection\">~a collection</A>" (let ([path (build-path (car collection-doc-file)
; escape colons and other junk (cadr collection-doc-file))])
(uri-encode (format "<LI> ~a"
(path->string (if (file-exists? path)
(build-path (car collection-doc-file) (format "<A HREF=\"/servlets/doc-anchor.ss?file=~a&name=~a&caption=Documentation for the ~a collection\">~a collection</A>"
(cadr collection-doc-file)))) ;; escape colons and other junk
name name name)) (uri-encode (path->string path))
name name name)
(format "<FONT COLOR=\"RED\">~a collection: specified doc.txt file (~a) not found</FONT>"
name path)))))
collections-doc-files collections-doc-files
collection-names) collection-names)
(list "</UL>") (list "</UL>")
(let ([uninstalled (get-uninstalled docs)]) (let ([uninstalled (get-uninstalled docs)])
(cond (if (null? uninstalled)
[(null? uninstalled) `("")
(list "")] `("<H3>Uninstalled Manuals</H3>"
[else
(list*
"<H3>Uninstalled Manuals</H3>"
"<UL>" "<UL>"
(append ,@(map
(map (lambda (doc-pair)
(lambda (doc-pair) (let* ([manual (car doc-pair)]
(let* ([manual (car doc-pair)] [name (cdr doc-pair)]
[name (cdr doc-pair)] [manual-path (find-doc-directory manual)])
[manual-path (find-doc-directory manual)]) (string-append
(string-append "<LI> Download and install <A mzscheme=\""
"<LI> Download and install <A mzscheme=\"" (to-string/escape-quotes
(to-string/escape-quotes `((dynamic-require '(lib "refresh-manuals.ss" "help") 'refresh-manuals)
`((dynamic-require '(lib "refresh-manuals.ss" "help") 'refresh-manuals) (list (cons (bytes->path ,(path->bytes manual))
(list (cons (bytes->path ,(path->bytes manual)) ,name))))
,name)))) (format "\">~a</A>~a"
(format "\">~a</A>~a" name
name (if (and manual-path
(if (and manual-path (or (file-exists? (build-path manual-path "hdindex"))
(or (file-exists? (build-path manual-path "hdindex")) (file-exists? (build-path manual-path "keywords"))))
(file-exists? (build-path manual-path "keywords")))) " (index installed)"
" (index installed)" "")))))
""))))) uninstalled)
uninstalled) "</UL>")))
(list "</UL>")))]))
(list "</body></html>")))))) (list "</body></html>"))))))
;; break-between : regexp ;; break-between : regexp

View File

@ -1,4 +1,3 @@
(module info (lib "infotab.ss" "setup") (module info (lib "infotab.ss" "setup")
(define name "MrLib") (define name "MrLib"))
(define doc.txt "doc.txt"))