mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -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
|
;; push it
|
||||||
(gnc:html-document-push-style doc (gnc:html-document-style doc))
|
(gnc:html-document-push-style doc (gnc:html-document-style doc))
|
||||||
(gnc:report-render-starting (gnc:html-document-title doc))
|
(gnc:report-render-starting (gnc:html-document-title doc))
|
||||||
(if headers?
|
(when headers?
|
||||||
(begin
|
;;This is the only place where <html> appears
|
||||||
;;This is the only place where <html> appears
|
;;with the exception of 2 reports:
|
||||||
;;with the exception of 2 reports:
|
;;./share/gnucash/scm/gnucash/report/taxinvoice.eguile.scm:<html>
|
||||||
;;./share/gnucash/scm/gnucash/report/taxinvoice.eguile.scm:<html>
|
;;./share/gnucash/scm/gnucash/report/balsheet-eg.eguile.scm:<html>
|
||||||
;;./share/gnucash/scm/gnucash/report/balsheet-eg.eguile.scm:<html>
|
|
||||||
|
|
||||||
(push "<html>\n")
|
(push "<html>\n")
|
||||||
(push "<head>\n")
|
(push "<head>\n")
|
||||||
(push "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n")
|
(push "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n")
|
||||||
(if style-text
|
(if style-text
|
||||||
(push (list "</style>" style-text "<style type=\"text/css\">\n")))
|
(push (list "</style>" style-text "<style type=\"text/css\">\n")))
|
||||||
(if (not (string-null? title))
|
(if (not (string-null? title))
|
||||||
(push (list "</title>" title "<title>\n")))
|
(push (list "</title>" title "<title>\n")))
|
||||||
(push "</head>")))
|
(push "</head>")
|
||||||
|
|
||||||
;; this lovely little number just makes sure that <body>
|
;; this lovely little number just makes sure that <body>
|
||||||
;; attributes like bgcolor get included
|
;; attributes like bgcolor get included
|
||||||
(push ((gnc:html-markup/open-tag-only "body") doc))
|
(push ((gnc:html-markup/open-tag-only "body") doc)))
|
||||||
|
|
||||||
;; now render the children
|
;; now render the children
|
||||||
(for-each
|
(for-each
|
||||||
@ -174,10 +173,9 @@
|
|||||||
(gnc:report-percent-done (* 100 (/ work-done work-to-do))))
|
(gnc:report-percent-done (* 100 (/ work-done work-to-do))))
|
||||||
objs)
|
objs)
|
||||||
|
|
||||||
(push "</body>\n")
|
(when headers?
|
||||||
|
(push "</body>\n")
|
||||||
(if headers?
|
(push "</html>\n"))
|
||||||
(push "</html>\n"))
|
|
||||||
|
|
||||||
(gnc:report-finished)
|
(gnc:report-finished)
|
||||||
(gnc:html-document-pop-style doc)
|
(gnc:html-document-pop-style doc)
|
||||||
|
@ -26,8 +26,7 @@
|
|||||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n\
|
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n\
|
||||||
</head><body>")
|
</head><body>")
|
||||||
|
|
||||||
(define html-doc-no-header-empty-body
|
(define html-doc-no-header-empty-body "")
|
||||||
"<body></body>\n")
|
|
||||||
|
|
||||||
(define html-doc-tail
|
(define html-doc-tail
|
||||||
"</body>\n\
|
"</body>\n\
|
||||||
|
Loading…
Reference in New Issue
Block a user