Add a generic way of presenting values that may be store items
This commit is contained in:
parent
022cbc68ef
commit
81eb5f88d1
1 changed files with 13 additions and 0 deletions
|
|
@ -32,6 +32,7 @@
|
|||
header
|
||||
form-horizontal-control
|
||||
|
||||
display-possible-store-item
|
||||
display-store-item
|
||||
display-store-item-short
|
||||
build-status-span
|
||||
|
|
@ -426,6 +427,18 @@
|
|||
(style "display: inline-block; font-size: 1.2em; margin-top: 0.4em;"))
|
||||
,(build-status-value->display-string status)))
|
||||
|
||||
(define (display-possible-store-item value)
|
||||
(match (string-split value #\/)
|
||||
(("" "gnu" "store" item)
|
||||
`(a (@ (href ,value))
|
||||
,(display-store-item value)))
|
||||
(("" "gnu" "store" item fileparts ...)
|
||||
`(a (@ (href ,value))
|
||||
,(display-file-in-store-item-oneline value)))
|
||||
(_
|
||||
`(span (@ (style "font-family: monospace;"))
|
||||
,value))))
|
||||
|
||||
(define (display-store-item-short item)
|
||||
`((span (@ (style "font-size: small; font-family: monospace; display: block;"))
|
||||
,(string-take item 44))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue