Bug796826 - Report HTML - not possible to suppress the document header

This commit is contained in:
Carsten Rinke 2018-09-03 06:59:55 +02:00 committed by Geert Janssens
parent 412d797eae
commit 7e86037418

View File

@ -128,7 +128,7 @@
;; returns the html document as a string, I think.
(define (gnc:html-document-render doc . rest)
(let ((stylesheet (gnc:html-document-style-sheet doc))
(headers? (if (null? rest) #f (if (car rest) #t #f)))
(headers? (if (null? rest) #t (if (car rest) #t #f)))
(style-text (gnc:html-document-style-text doc))
)
(if stylesheet
@ -149,7 +149,7 @@
(gnc:html-document-push-style doc (gnc:html-document-style doc))
(if (not (string-null? title))
(gnc:report-render-starting (gnc:html-document-title doc)))
(if (not (null? headers?))
(if headers?
(begin
;;This is the only place where <html> appears
;;with the exception of 2 reports:
@ -164,11 +164,11 @@
(let ((title (gnc:html-document-title doc)))
(if title
(push (list "</title>" title "<title>\n"))))
(push "</head>")
(push "</head>")))
;; this lovely little number just makes sure that <body>
;; attributes like bgcolor get included
(push ((gnc:html-markup/open-tag-only "body") doc))))
;; this lovely little number just makes sure that <body>
;; attributes like bgcolor get included
(push ((gnc:html-markup/open-tag-only "body") doc))
;; now render the children
(for-each
@ -179,9 +179,10 @@
(gnc:report-percent-done (* 100 (/ work-done work-to-do)))))
objs)
(if (not (null? headers?))
(push "</body>\n")
(if headers?
(begin
(push "</body>\n")
(push "</html>\n")))
(gnc:report-finished)