Added todo category for no description, added warnings in table for todos.

This commit is contained in:
Conor Finegan 2017-07-20 10:35:34 -04:00 committed by Jay McCarthy
parent 95ceb660ed
commit 8853817f70

View File

@ -638,24 +638,31 @@
,(~a (- (package-last-updated pkg))))
,@(maybe-splice
(< (- now (package-last-updated pkg)) recent-seconds)
`(span ((class "label label-info")) "New")))
`(p (span ((class "label label-info")) "New")))
,@(maybe-splice
(> 0 todokey)
(label-p (if (< todokey 5)
"label-warning"
"label-danger") "Todo")))
(td (h2 ,(package-link (package-name pkg)))
,(authors-list (package-authors pkg)))
(td (p ,(package-description pkg))
,@(maybe-splice
(or has-docs? has-readme?)
`(div
(span ((class "doctags-label")) "Docs: ")
,(doc-links (package-docs pkg))
,@(maybe-splice has-readme?
" "
`(a ((href ,(package-readme-url pkg)))
"README"))))
,@(maybe-splice
has-tags?
`(div
(span ((class "doctags-label")) "Tags: ")
,(tag-links (package-tags pkg)))))
(td (p ,(if (string=? "" (package-description pkg))
`(span ((class "label-warning")) "This package needs a description")
(package-description pkg)))
,(if (not (or has-docs? has-readme?))
(label-p "label-warning" "This package needs documentation")
`(div
(span ((class "doctags-label")) "Docs: ")
,(doc-links (package-docs pkg))
,@(maybe-splice has-readme?
" "
`(a ((href ,(package-readme-url pkg)))
"README"))))
,(if (not has-tags?)
(label-p "label-warning" "This package needs tags")
`(div
(span ((class "doctags-label")) "Tags: ")
,(tag-links (package-tags pkg)))))
,(build-status-td pkg)
(td ((style "display: none")) ,(number->string todokey))))
(values (cons row-xexp pkg-rows)
@ -663,6 +670,9 @@
;; for/fold reverses pkg-rows, so un-reverse before returning.
(values (reverse pkg-rows) num-todos))
(define (label-p cls txt)
`(p (span ((class ,cls)) ,txt)))
(define (build-status-td pkg)
;; Build the index page cell for summarizing a package's build status.
;; Nothing at all is for no information on build success or failure.