(define (att-delete:details)
  (let* ((id (ui:hex->bytes (ui:form-datum "id")))
	 (msg (ui:form-datum "msg"))
	 (att (identity:get-attestation id msg)))
    (cond (att
	   (let ((rows (list (attestations:generate-one-attestation-row att id))))
	     (attestations:generate-details-table-skeleton rows))
	   (format nil "<h2>Message</h2>~2&~A~2&~A~&~
	                <form method = \"post\" action = \"delete.html\">~&~
                          <input type = \"hidden\" name = \"msg\" value = \"~A\">~&~
                          <input type=\"submit\" value = \"Delete this attestation\">~&~
                        </form>"
		   msg
		   (attestations:generate-details-table att id)
		   msg))		; %%% WTF are we using the MSG as the key?  I guess 'cause ID is the ID of the signatory?  Hmm....
	  (t
	   "<b>[No such attestation.]</b><p>")))) ; Can we get here?

;;;; Dead code.

; (define (att-delete:details)
;   (let* ((msg (ui:form-datum "msg"))
; 	 (att (identity:get-attestation *local-yenta-id* msg)))
;     (list
;      (cond (att
; 	    (list
; 	     "<h2> Message </h2>\n"
; 	     msg
; 	     "<h2> Signatures </h2>\n"
; 	     "<table border=\"1\"><tr><th>Signator</th><th>Date</th><th>Status</th></tr>\n"
; 	     (map (lambda (sig)
; 		    (let* ((t (cadr sig))
; 			   (i (car sig))
; 			   (v (test-signature msg id sig))
; 			   (p (identity:description-link i)))
; 		      (list "<tr><td>"
; 			    p
; 			    "</td><td>"
; 			    (ctime t)
; 			    "</td><td>"
; 			    v
; 			    "</td></tr>")))
; 		  (cadr att))
; 	     "</table>"
; 	     "<form method = \"post\" action = \"delete.html\">"
; 	     "<input type = \"hidden\" name = \"msg\" value = \""
; 	     msg
; 	     "\">"
; 	     "<input type=\"submit\" value = \"Delete this attestation\"></form>"))
; 	   (t
; 	    "I do not recognize the attestation you gave me."))
;      "<p><a href=\"attestations.html\">Return to your attestations</a>\n")))

;;; End of file.
