mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Merge CSS and plain stylesheets, leaving the plain and remove the CSS stylesheet. Plain now has font specifications.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19173 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
9833f70b32
commit
d027861d49
@ -254,7 +254,7 @@
|
|||||||
(gnc:make-multichoice-option
|
(gnc:make-multichoice-option
|
||||||
gnc:pagename-general gnc:optname-stylesheet "0b"
|
gnc:pagename-general gnc:optname-stylesheet "0b"
|
||||||
(N_ "Select a stylesheet for the report.")
|
(N_ "Select a stylesheet for the report.")
|
||||||
(string->symbol (N_ "Default CSS"))
|
(string->symbol (N_ "Default"))
|
||||||
(map
|
(map
|
||||||
(lambda (ss)
|
(lambda (ss)
|
||||||
(vector
|
(vector
|
||||||
|
@ -36,7 +36,6 @@ gncscmmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash/report/
|
|||||||
gncscmmod_DATA = \
|
gncscmmod_DATA = \
|
||||||
stylesheets.scm \
|
stylesheets.scm \
|
||||||
stylesheet-plain.scm \
|
stylesheet-plain.scm \
|
||||||
stylesheet-css.scm \
|
|
||||||
stylesheet-fancy.scm \
|
stylesheet-fancy.scm \
|
||||||
stylesheet-footer.scm \
|
stylesheet-footer.scm \
|
||||||
stylesheet-easy.scm
|
stylesheet-easy.scm
|
||||||
|
@ -1,215 +0,0 @@
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
;; stylesheet-css : the css-based stylesheet
|
|
||||||
;; Copyright 2009 Phil Longstaff <plongstaff@rogers.com>
|
|
||||||
;;
|
|
||||||
;; This program is free software; you can redistribute it and/or
|
|
||||||
;; modify it under the terms of the GNU General Public License as
|
|
||||||
;; published by the Free Software Foundation; either version 2 of
|
|
||||||
;; the License, or (at your option) any later version.
|
|
||||||
;;
|
|
||||||
;; This program is distributed in the hope that it will be useful,
|
|
||||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
;; GNU General Public License for more details.
|
|
||||||
;;
|
|
||||||
;; You should have received a copy of the GNU General Public License
|
|
||||||
;; along with this program; if not, contact:
|
|
||||||
;;
|
|
||||||
;; Free Software Foundation Voice: +1-617-542-5942
|
|
||||||
;; 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
|
|
||||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
|
|
||||||
(define-module (gnucash report stylesheet-css))
|
|
||||||
|
|
||||||
(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
|
|
||||||
(use-modules (gnucash gnc-module))
|
|
||||||
(use-modules (gnucash core-utils))
|
|
||||||
(use-modules (gnucash report report-system))
|
|
||||||
(use-modules (srfi srfi-13))
|
|
||||||
(use-modules (srfi srfi-14))
|
|
||||||
|
|
||||||
(gnc:module-load "gnucash/report/report-system" 0)
|
|
||||||
|
|
||||||
;; css style sheet
|
|
||||||
;; this should generally be the default style sheet for most reports.
|
|
||||||
;; it's supposed to be lightweight and unobtrusive.
|
|
||||||
(define (css-options)
|
|
||||||
(let* ((options (gnc:new-options))
|
|
||||||
(opt-register
|
|
||||||
(lambda (opt)
|
|
||||||
(gnc:register-option options opt))))
|
|
||||||
(opt-register
|
|
||||||
(gnc:make-color-option
|
|
||||||
(N_ "General")
|
|
||||||
(N_ "Background Color") "a" (N_ "Background color for reports.")
|
|
||||||
(list #xff #xff #xff 0)
|
|
||||||
255 #f))
|
|
||||||
(opt-register
|
|
||||||
(gnc:make-pixmap-option
|
|
||||||
(N_ "General")
|
|
||||||
(N_ "Background Pixmap") "b" (N_ "Background tile for reports.")
|
|
||||||
""))
|
|
||||||
(opt-register
|
|
||||||
(gnc:make-simple-boolean-option
|
|
||||||
(N_ "General")
|
|
||||||
(N_ "Enable Links") "c" (N_ "Enable hyperlinks in reports.")
|
|
||||||
#t))
|
|
||||||
(opt-register
|
|
||||||
(gnc:make-number-range-option
|
|
||||||
(N_ "Tables")
|
|
||||||
(N_ "Table cell spacing") "c" (N_ "Space between table cells")
|
|
||||||
4 0 20 0 1))
|
|
||||||
(opt-register
|
|
||||||
(gnc:make-number-range-option
|
|
||||||
(N_ "Tables")
|
|
||||||
(N_ "Table cell padding") "d" (N_ "Space between table cells")
|
|
||||||
0 0 20 0 1))
|
|
||||||
(opt-register
|
|
||||||
(gnc:make-number-range-option
|
|
||||||
(N_ "Tables")
|
|
||||||
(N_ "Table border width") "e" (N_ "Bevel depth on tables")
|
|
||||||
0 0 20 0 1))
|
|
||||||
(register-font-options options)
|
|
||||||
|
|
||||||
options))
|
|
||||||
|
|
||||||
(define (css-renderer options doc)
|
|
||||||
(let*
|
|
||||||
((ssdoc (gnc:make-html-document))
|
|
||||||
(opt-val
|
|
||||||
(lambda (section name)
|
|
||||||
(gnc:option-value
|
|
||||||
(gnc:lookup-option options section name))))
|
|
||||||
(bgcolor
|
|
||||||
(gnc:color-option->html
|
|
||||||
(gnc:lookup-option options
|
|
||||||
"General"
|
|
||||||
"Background Color")))
|
|
||||||
(bgpixmap (opt-val "General" "Background Pixmap"))
|
|
||||||
(links? (opt-val "General" "Enable Links"))
|
|
||||||
(spacing (opt-val "Tables" "Table cell spacing"))
|
|
||||||
(padding (opt-val "Tables" "Table cell padding"))
|
|
||||||
(border (opt-val "Tables" "Table border width"))
|
|
||||||
)
|
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "body"
|
|
||||||
'attribute (list "bgcolor" bgcolor))
|
|
||||||
|
|
||||||
(if (and bgpixmap
|
|
||||||
(not (string=? bgpixmap "")))
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "body"
|
|
||||||
'attribute (list "background" bgpixmap)))
|
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "table"
|
|
||||||
'attribute (list "border" border)
|
|
||||||
'attribute (list "cellspacing" spacing)
|
|
||||||
'attribute (list "cellpadding" padding))
|
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "date-cell"
|
|
||||||
'tag "td"
|
|
||||||
'attribute (list "class" "date-cell"))
|
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "anchor-cell"
|
|
||||||
'tag "td"
|
|
||||||
'attribute (list "class" "anchor-cell"))
|
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "number-cell"
|
|
||||||
'tag "td"
|
|
||||||
'attribute (list "class" "number-cell"))
|
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "number-cell-neg"
|
|
||||||
'tag "td"
|
|
||||||
'attribute (list "class" "number-cell neg"))
|
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "number-header"
|
|
||||||
'tag "th"
|
|
||||||
'attribute (list "class" "number-header"))
|
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "text-cell"
|
|
||||||
'tag "td"
|
|
||||||
'attribute (list "class" "text-cell"))
|
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "total-number-cell"
|
|
||||||
'tag "td"
|
|
||||||
'attribute (list "class" "total-number-cell"))
|
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "total-number-cell-neg"
|
|
||||||
'tag "td"
|
|
||||||
'attribute (list "class" "total-number-cell neg"))
|
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "total-label-cell"
|
|
||||||
'tag "td"
|
|
||||||
'attribute (list "class" "total-label-cell"))
|
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "centered-label-cell"
|
|
||||||
'tag "td"
|
|
||||||
'attribute (list "class" "centered-label-cell"))
|
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "normal-row"
|
|
||||||
'tag "tr")
|
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "alternate-row"
|
|
||||||
'attribute (list "bgcolor" bgcolor)
|
|
||||||
'tag "tr")
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "primary-subheading"
|
|
||||||
'attribute (list "bgcolor" bgcolor)
|
|
||||||
'tag "tr")
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "secondary-subheading"
|
|
||||||
'attribute (list "bgcolor" bgcolor)
|
|
||||||
'tag "tr")
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "grand-total"
|
|
||||||
'attribute (list "bgcolor" bgcolor)
|
|
||||||
'tag "tr")
|
|
||||||
|
|
||||||
;; don't surround marked-up links with <a> </a>
|
|
||||||
(if (not links?)
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "a"
|
|
||||||
'tag ""))
|
|
||||||
|
|
||||||
(add-css-information-to-doc options ssdoc)
|
|
||||||
|
|
||||||
(let* ((title (gnc:html-document-title doc))
|
|
||||||
(doc-headline (gnc:html-document-headline doc))
|
|
||||||
(headline (if (eq? doc-headline #f)
|
|
||||||
title doc-headline)))
|
|
||||||
(if headline
|
|
||||||
(gnc:html-document-add-object!
|
|
||||||
ssdoc
|
|
||||||
(gnc:make-html-text
|
|
||||||
(gnc:html-markup-p
|
|
||||||
(gnc:html-markup-h3 headline))))))
|
|
||||||
|
|
||||||
(gnc:html-document-append-objects! ssdoc
|
|
||||||
(gnc:html-document-objects doc))
|
|
||||||
|
|
||||||
ssdoc))
|
|
||||||
|
|
||||||
(gnc:define-html-style-sheet
|
|
||||||
'version 1
|
|
||||||
'name (N_ "CSS")
|
|
||||||
'renderer css-renderer
|
|
||||||
'options-generator css-options)
|
|
||||||
|
|
||||||
;; instantiate a default style sheet
|
|
||||||
(gnc:make-html-style-sheet "CSS" (N_ "Default CSS"))
|
|
@ -1,17 +1,18 @@
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; stylesheet-plain.scm : the default stylesheet, very simple.
|
;; stylesheet-plain.css : the default style sheet, very simple
|
||||||
|
;; Copyright 2009 Phil Longstaff <plongstaff@rogers.com>
|
||||||
;; Copyright 2000 Bill Gribble <grib@gnumatic.com>
|
;; Copyright 2000 Bill Gribble <grib@gnumatic.com>
|
||||||
;;
|
;;
|
||||||
;; This program is free software; you can redistribute it and/or
|
;; This program is free software; you can redistribute it and/or
|
||||||
;; modify it under the terms of the GNU General Public License as
|
;; modify it under the terms of the GNU General Public License as
|
||||||
;; published by the Free Software Foundation; either version 2 of
|
;; published by the Free Software Foundation; either version 2 of
|
||||||
;; the License, or (at your option) any later version.
|
;; the License, or (at your option) any later version.
|
||||||
;;
|
;;
|
||||||
;; This program is distributed in the hope that it will be useful,
|
;; This program is distributed in the hope that it will be useful,
|
||||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;; GNU General Public License for more details.
|
;; GNU General Public License for more details.
|
||||||
;;
|
;;
|
||||||
;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;; along with this program; if not, contact:
|
;; along with this program; if not, contact:
|
||||||
;;
|
;;
|
||||||
@ -25,179 +26,191 @@
|
|||||||
|
|
||||||
(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
|
(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
|
||||||
(use-modules (gnucash gnc-module))
|
(use-modules (gnucash gnc-module))
|
||||||
|
(use-modules (gnucash core-utils))
|
||||||
|
(use-modules (gnucash report report-system))
|
||||||
|
(use-modules (srfi srfi-13))
|
||||||
|
(use-modules (srfi srfi-14))
|
||||||
|
|
||||||
(gnc:module-load "gnucash/report/report-system" 0)
|
(gnc:module-load "gnucash/report/report-system" 0)
|
||||||
|
|
||||||
;; plain style sheet
|
;; plain style sheet
|
||||||
;; this should generally be the default style sheet for most reports.
|
;; this should generally be the default style sheet for most reports.
|
||||||
;; it's supposed to be lightweight and unobtrusive.
|
;; it's supposed to be lightweight and unobtrusive.
|
||||||
(define (plain-options)
|
(define (plain-options)
|
||||||
(let* ((options (gnc:new-options))
|
(let* ((options (gnc:new-options))
|
||||||
(opt-register
|
(opt-register
|
||||||
(lambda (opt)
|
(lambda (opt)
|
||||||
(gnc:register-option options opt))))
|
(gnc:register-option options opt))))
|
||||||
(opt-register
|
(opt-register
|
||||||
(gnc:make-color-option
|
(gnc:make-color-option
|
||||||
(N_ "General")
|
(N_ "General")
|
||||||
(N_ "Background Color") "a" (N_ "Background color for reports.")
|
(N_ "Background Color") "a" (N_ "Background color for reports.")
|
||||||
(list #xff #xff #xff 0)
|
(list #xff #xff #xff 0)
|
||||||
255 #f))
|
255 #f))
|
||||||
(opt-register
|
(opt-register
|
||||||
(gnc:make-pixmap-option
|
(gnc:make-pixmap-option
|
||||||
(N_ "General")
|
(N_ "General")
|
||||||
(N_ "Background Pixmap") "b" (N_ "Background tile for reports.")
|
(N_ "Background Pixmap") "b" (N_ "Background tile for reports.")
|
||||||
""))
|
""))
|
||||||
(opt-register
|
(opt-register
|
||||||
(gnc:make-simple-boolean-option
|
(gnc:make-simple-boolean-option
|
||||||
(N_ "General")
|
(N_ "General")
|
||||||
(N_ "Enable Links") "c" (N_ "Enable hyperlinks in reports.")
|
(N_ "Enable Links") "c" (N_ "Enable hyperlinks in reports.")
|
||||||
#t))
|
#t))
|
||||||
(opt-register
|
(opt-register
|
||||||
(gnc:make-number-range-option
|
(gnc:make-number-range-option
|
||||||
(N_ "Tables")
|
(N_ "Tables")
|
||||||
(N_ "Table cell spacing") "c" (N_ "Space between table cells")
|
(N_ "Table cell spacing") "c" (N_ "Space between table cells")
|
||||||
4 0 20 0 1))
|
4 0 20 0 1))
|
||||||
(opt-register
|
(opt-register
|
||||||
(gnc:make-number-range-option
|
(gnc:make-number-range-option
|
||||||
(N_ "Tables")
|
(N_ "Tables")
|
||||||
(N_ "Table cell padding") "d" (N_ "Space between table cells")
|
(N_ "Table cell padding") "d" (N_ "Space between table cells")
|
||||||
0 0 20 0 1))
|
0 0 20 0 1))
|
||||||
(opt-register
|
(opt-register
|
||||||
(gnc:make-number-range-option
|
(gnc:make-number-range-option
|
||||||
(N_ "Tables")
|
(N_ "Tables")
|
||||||
(N_ "Table border width") "e" (N_ "Bevel depth on tables")
|
(N_ "Table border width") "e" (N_ "Bevel depth on tables")
|
||||||
0 0 20 0 1))
|
0 0 20 0 1))
|
||||||
options))
|
(register-font-options options)
|
||||||
|
|
||||||
|
options))
|
||||||
|
|
||||||
(define (plain-renderer options doc)
|
(define (plain-renderer options doc)
|
||||||
(let* ((ssdoc (gnc:make-html-document))
|
(let*
|
||||||
(opt-val
|
((ssdoc (gnc:make-html-document))
|
||||||
(lambda (section name)
|
(opt-val
|
||||||
(gnc:option-value
|
(lambda (section name)
|
||||||
(gnc:lookup-option options section name))))
|
(gnc:option-value
|
||||||
(bgcolor
|
(gnc:lookup-option options section name))))
|
||||||
(gnc:color-option->html
|
(bgcolor
|
||||||
(gnc:lookup-option options
|
(gnc:color-option->html
|
||||||
"General"
|
(gnc:lookup-option options
|
||||||
"Background Color")))
|
"General"
|
||||||
(bgpixmap (opt-val "General" "Background Pixmap"))
|
"Background Color")))
|
||||||
(links? (opt-val "General" "Enable Links"))
|
(bgpixmap (opt-val "General" "Background Pixmap"))
|
||||||
(spacing (opt-val "Tables" "Table cell spacing"))
|
(links? (opt-val "General" "Enable Links"))
|
||||||
(padding (opt-val "Tables" "Table cell padding"))
|
(spacing (opt-val "Tables" "Table cell spacing"))
|
||||||
(border (opt-val "Tables" "Table border width")))
|
(padding (opt-val "Tables" "Table cell padding"))
|
||||||
|
(border (opt-val "Tables" "Table border width"))
|
||||||
|
)
|
||||||
|
|
||||||
|
(gnc:html-document-set-style!
|
||||||
|
ssdoc "body"
|
||||||
|
'attribute (list "bgcolor" bgcolor))
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
|
||||||
ssdoc "body"
|
|
||||||
'attribute (list "bgcolor" bgcolor))
|
|
||||||
|
|
||||||
(if (and bgpixmap
|
(if (and bgpixmap
|
||||||
(not (string=? bgpixmap "")))
|
(not (string=? bgpixmap "")))
|
||||||
(gnc:html-document-set-style!
|
(gnc:html-document-set-style!
|
||||||
ssdoc "body"
|
ssdoc "body"
|
||||||
'attribute (list "background" bgpixmap)))
|
'attribute (list "background" bgpixmap)))
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
(gnc:html-document-set-style!
|
||||||
ssdoc "table"
|
ssdoc "table"
|
||||||
'attribute (list "border" border)
|
'attribute (list "border" border)
|
||||||
'attribute (list "cellspacing" spacing)
|
'attribute (list "cellspacing" spacing)
|
||||||
'attribute (list "cellpadding" padding))
|
'attribute (list "cellpadding" padding))
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
(gnc:html-document-set-style!
|
||||||
ssdoc "anchor-cell"
|
ssdoc "date-cell"
|
||||||
'tag "td"
|
'tag "td"
|
||||||
'attribute (list "align" "left")
|
'attribute (list "class" "date-cell"))
|
||||||
'attribute (list "nowrap"))
|
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
(gnc:html-document-set-style!
|
||||||
ssdoc "number-cell"
|
ssdoc "anchor-cell"
|
||||||
'tag "td"
|
'tag "td"
|
||||||
'attribute (list "align" "right")
|
'attribute (list "class" "anchor-cell"))
|
||||||
'attribute (list "nowrap"))
|
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
(gnc:html-document-set-style!
|
||||||
ssdoc "number-cell-neg"
|
ssdoc "number-cell"
|
||||||
'tag "td"
|
'tag "td"
|
||||||
'attribute (list "align" "right")
|
'attribute (list "class" "number-cell"))
|
||||||
'attribute (list "nowrap"))
|
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
(gnc:html-document-set-style!
|
||||||
ssdoc "number-header"
|
ssdoc "number-cell-neg"
|
||||||
'tag "th"
|
'tag "td"
|
||||||
'attribute (list "align" "right"))
|
'attribute (list "class" "number-cell neg"))
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
(gnc:html-document-set-style!
|
||||||
ssdoc "text-cell"
|
ssdoc "number-header"
|
||||||
'tag "td"
|
'tag "th"
|
||||||
'attribute (list "align" "left"))
|
'attribute (list "class" "number-header"))
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
(gnc:html-document-set-style!
|
||||||
ssdoc "total-number-cell"
|
ssdoc "text-cell"
|
||||||
'tag '("td" "b")
|
'tag "td"
|
||||||
'attribute (list "align" "right"))
|
'attribute (list "class" "text-cell"))
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
(gnc:html-document-set-style!
|
||||||
ssdoc "total-number-cell-neg"
|
ssdoc "total-number-cell"
|
||||||
'tag '("td" "b")
|
'tag "td"
|
||||||
'attribute (list "align" "right"))
|
'attribute (list "class" "total-number-cell"))
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
(gnc:html-document-set-style!
|
||||||
ssdoc "total-label-cell"
|
ssdoc "total-number-cell-neg"
|
||||||
'tag '("td" "b")
|
'tag "td"
|
||||||
'attribute (list "align" "left"))
|
'attribute (list "class" "total-number-cell neg"))
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
(gnc:html-document-set-style!
|
||||||
ssdoc "centered-label-cell"
|
ssdoc "total-label-cell"
|
||||||
'tag '("td" "b")
|
'tag "td"
|
||||||
'attribute (list "align" "center"))
|
'attribute (list "class" "total-label-cell"))
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
(gnc:html-document-set-style!
|
||||||
ssdoc "normal-row"
|
ssdoc "centered-label-cell"
|
||||||
'tag "tr")
|
'tag "td"
|
||||||
|
'attribute (list "class" "centered-label-cell"))
|
||||||
|
|
||||||
|
(gnc:html-document-set-style!
|
||||||
|
ssdoc "normal-row"
|
||||||
|
'tag "tr")
|
||||||
|
|
||||||
(gnc:html-document-set-style!
|
(gnc:html-document-set-style!
|
||||||
ssdoc "alternate-row"
|
ssdoc "alternate-row"
|
||||||
'attribute (list "bgcolor" bgcolor)
|
'attribute (list "bgcolor" bgcolor)
|
||||||
'tag "tr")
|
'tag "tr")
|
||||||
(gnc:html-document-set-style!
|
(gnc:html-document-set-style!
|
||||||
ssdoc "primary-subheading"
|
ssdoc "primary-subheading"
|
||||||
'attribute (list "bgcolor" bgcolor)
|
'attribute (list "bgcolor" bgcolor)
|
||||||
'tag "tr")
|
'tag "tr")
|
||||||
(gnc:html-document-set-style!
|
(gnc:html-document-set-style!
|
||||||
ssdoc "secondary-subheading"
|
ssdoc "secondary-subheading"
|
||||||
'attribute (list "bgcolor" bgcolor)
|
'attribute (list "bgcolor" bgcolor)
|
||||||
'tag "tr")
|
'tag "tr")
|
||||||
(gnc:html-document-set-style!
|
(gnc:html-document-set-style!
|
||||||
ssdoc "grand-total"
|
ssdoc "grand-total"
|
||||||
'attribute (list "bgcolor" bgcolor)
|
'attribute (list "bgcolor" bgcolor)
|
||||||
'tag "tr")
|
'tag "tr")
|
||||||
|
|
||||||
;; don't surround marked-up links with <a> </a>
|
;; don't surround marked-up links with <a> </a>
|
||||||
(if (not links?)
|
(if (not links?)
|
||||||
(gnc:html-document-set-style!
|
(gnc:html-document-set-style!
|
||||||
ssdoc "a"
|
ssdoc "a"
|
||||||
'tag ""))
|
'tag ""))
|
||||||
|
|
||||||
|
(add-css-information-to-doc options ssdoc)
|
||||||
|
|
||||||
(let* ((title (gnc:html-document-title doc))
|
(let* ((title (gnc:html-document-title doc))
|
||||||
(doc-headline (gnc:html-document-headline doc))
|
(doc-headline (gnc:html-document-headline doc))
|
||||||
(headline (if (eq? doc-headline #f)
|
(headline (if (eq? doc-headline #f)
|
||||||
title doc-headline)))
|
title doc-headline)))
|
||||||
(if headline
|
(if headline
|
||||||
(gnc:html-document-add-object!
|
(gnc:html-document-add-object!
|
||||||
ssdoc
|
ssdoc
|
||||||
(gnc:make-html-text
|
(gnc:make-html-text
|
||||||
(gnc:html-markup-p
|
(gnc:html-markup-p
|
||||||
(gnc:html-markup-h3 headline))))))
|
(gnc:html-markup-h3 headline))))))
|
||||||
|
|
||||||
(gnc:html-document-append-objects! ssdoc
|
(gnc:html-document-append-objects! ssdoc
|
||||||
(gnc:html-document-objects doc))
|
(gnc:html-document-objects doc))
|
||||||
|
|
||||||
ssdoc))
|
ssdoc))
|
||||||
|
|
||||||
(gnc:define-html-style-sheet
|
(gnc:define-html-style-sheet
|
||||||
'version 1
|
'version 1
|
||||||
'name (N_ "Plain")
|
'name (N_ "Plain")
|
||||||
'renderer plain-renderer
|
'renderer plain-renderer
|
||||||
'options-generator plain-options)
|
'options-generator plain-options)
|
||||||
|
|
||||||
;; instantiate a default style sheet
|
;; instantiate a default style sheet
|
||||||
(gnc:make-html-style-sheet "Plain" (N_ "Default"))
|
(gnc:make-html-style-sheet "Plain" (N_ "Default"))
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
|
(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
|
||||||
(use-modules (gnucash report stylesheet-plain))
|
(use-modules (gnucash report stylesheet-plain))
|
||||||
(use-modules (gnucash report stylesheet-css))
|
|
||||||
(use-modules (gnucash report stylesheet-fancy))
|
(use-modules (gnucash report stylesheet-fancy))
|
||||||
(use-modules (gnucash report stylesheet-footer))
|
(use-modules (gnucash report stylesheet-footer))
|
||||||
(use-modules (gnucash report stylesheet-easy))
|
(use-modules (gnucash report stylesheet-easy))
|
||||||
|
Loading…
Reference in New Issue
Block a user