mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-30 20:54:08 -06:00
[html-document] if headers? is #f, do not add <body> tag
This is a step towards creating valid html in multiple-charts reports.
This commit is contained in:
parent
25f2abb011
commit
b334366f63
@ -146,25 +146,24 @@
|
||||
;; push it
|
||||
(gnc:html-document-push-style doc (gnc:html-document-style doc))
|
||||
(gnc:report-render-starting (gnc:html-document-title doc))
|
||||
(if headers?
|
||||
(begin
|
||||
;;This is the only place where <html> appears
|
||||
;;with the exception of 2 reports:
|
||||
;;./share/gnucash/scm/gnucash/report/taxinvoice.eguile.scm:<html>
|
||||
;;./share/gnucash/scm/gnucash/report/balsheet-eg.eguile.scm:<html>
|
||||
(when headers?
|
||||
;;This is the only place where <html> appears
|
||||
;;with the exception of 2 reports:
|
||||
;;./share/gnucash/scm/gnucash/report/taxinvoice.eguile.scm:<html>
|
||||
;;./share/gnucash/scm/gnucash/report/balsheet-eg.eguile.scm:<html>
|
||||
|
||||
(push "<html>\n")
|
||||
(push "<head>\n")
|
||||
(push "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n")
|
||||
(if style-text
|
||||
(push (list "</style>" style-text "<style type=\"text/css\">\n")))
|
||||
(if (not (string-null? title))
|
||||
(push (list "</title>" title "<title>\n")))
|
||||
(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))
|
||||
(push "<html>\n")
|
||||
(push "<head>\n")
|
||||
(push "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n")
|
||||
(if style-text
|
||||
(push (list "</style>" style-text "<style type=\"text/css\">\n")))
|
||||
(if (not (string-null? title))
|
||||
(push (list "</title>" title "<title>\n")))
|
||||
(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)))
|
||||
|
||||
;; now render the children
|
||||
(for-each
|
||||
@ -174,10 +173,9 @@
|
||||
(gnc:report-percent-done (* 100 (/ work-done work-to-do))))
|
||||
objs)
|
||||
|
||||
(push "</body>\n")
|
||||
|
||||
(if headers?
|
||||
(push "</html>\n"))
|
||||
(when headers?
|
||||
(push "</body>\n")
|
||||
(push "</html>\n"))
|
||||
|
||||
(gnc:report-finished)
|
||||
(gnc:html-document-pop-style doc)
|
||||
|
@ -26,8 +26,7 @@
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n\
|
||||
</head><body>")
|
||||
|
||||
(define html-doc-no-header-empty-body
|
||||
"<body></body>\n")
|
||||
(define html-doc-no-header-empty-body "")
|
||||
|
||||
(define html-doc-tail
|
||||
"</body>\n\
|
||||
|
Loading…
Reference in New Issue
Block a user