Use new table for member fees calendar, quick hack for problem with SGR and spaces.
This commit is contained in:
parent
eaced78aee
commit
656789e984
2 changed files with 18 additions and 17 deletions
|
@ -50,7 +50,7 @@
|
||||||
brmember
|
brmember
|
||||||
cal-month
|
cal-month
|
||||||
ansi
|
ansi
|
||||||
table-old
|
table
|
||||||
mbase
|
mbase
|
||||||
cal-period
|
cal-period
|
||||||
specification)
|
specification)
|
||||||
|
@ -104,14 +104,14 @@
|
||||||
(if e
|
(if e
|
||||||
(if (member 'existing (cadr e))
|
(if (member 'existing (cadr e))
|
||||||
(if (member 'suspended (cadr e))
|
(if (member 'suspended (cadr e))
|
||||||
(ansi-string #:bgdarkgrey " ") ; Suspended
|
(ansi-string #:bgdarkgrey "__\x1b[0m") ; Suspended
|
||||||
(if (member 'destroyed (cadr e))
|
(if (member 'destroyed (cadr e))
|
||||||
(ansi-string #:bgblack "~~") ; Destroyed
|
(ansi-string #:bgblack "~~\x1b[0m") ; Destroyed
|
||||||
(if (member 'student (cadr e))
|
(if (member 'student (cadr e))
|
||||||
(ansi-string #:bgyellow " ") ; Student
|
(ansi-string #:bgyellow "__\x1b[0m") ; Student
|
||||||
(ansi-string #:bggreen " ")))) ; Normal
|
(ansi-string #:bggreen "__\x1b[0m")))) ; Normal
|
||||||
" ") ; Nonexistent - should not happen
|
"__") ; Nonexistent - should not happen
|
||||||
" ")) ; Nonexistent
|
"__")) ; Nonexistent
|
||||||
|
|
||||||
;; Converts the entry into the fee
|
;; Converts the entry into the fee
|
||||||
(define (member-calendar-entry->fee e)
|
(define (member-calendar-entry->fee e)
|
||||||
|
@ -171,15 +171,15 @@
|
||||||
;; Nicely print calendar for given member
|
;; Nicely print calendar for given member
|
||||||
(define (member-calendar->table mr)
|
(define (member-calendar->table mr)
|
||||||
(let* ((mc (member-calendar mr))
|
(let* ((mc (member-calendar mr))
|
||||||
(fees (member-calendar->fees mc)))
|
(fees (member-calendar->fees mc))
|
||||||
(table->string (cons (map (lambda (c)
|
(data (cons (map (lambda (c)
|
||||||
(sprintf "\t~A\t" c))
|
(sprintf "\t~A\t" c))
|
||||||
(list "" 1 2 3 4 5 6 7 8 9 10 11 12))
|
(list "" 1 2 3 4 5 6 7 8 9 10 11 12))
|
||||||
(member-calendar->years-table mc))
|
(member-calendar->years-table mc))))
|
||||||
#:table-border #f
|
(table->string data
|
||||||
#:row-border #t
|
#:border '(((light #:top #:left none) (light #:top none) ... (light #:top #:right none))
|
||||||
#:col-border #t
|
((light #:left none) light ... (light #:right none)) ...
|
||||||
#:ansi #t
|
((light #:bottom #:left none) (light #:bottom none) ... (light #:bottom #:right none)))
|
||||||
)))
|
)))
|
||||||
|
|
||||||
;; Summarizes (cons students full) counts
|
;; Summarizes (cons students full) counts
|
||||||
|
|
|
@ -113,7 +113,8 @@
|
||||||
(if (and (not (null? res))
|
(if (and (not (null? res))
|
||||||
(sgr-token-spaces? (car res)))
|
(sgr-token-spaces? (car res)))
|
||||||
(reverse (cdr res))
|
(reverse (cdr res))
|
||||||
(if (and (not (null? (cdr res)))
|
(if (and (not (null? res))
|
||||||
|
(not (null? (cdr res)))
|
||||||
(sgr-state? (car res))
|
(sgr-state? (car res))
|
||||||
(sgr-token-spaces? (cadr res)))
|
(sgr-token-spaces? (cadr res)))
|
||||||
(reverse (cons (car res)
|
(reverse (cons (car res)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue