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,12 +638,19 @@
,(~a (- (package-last-updated pkg)))) ,(~a (- (package-last-updated pkg))))
,@(maybe-splice ,@(maybe-splice
(< (- now (package-last-updated pkg)) recent-seconds) (< (- 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))) (td (h2 ,(package-link (package-name pkg)))
,(authors-list (package-authors pkg))) ,(authors-list (package-authors pkg)))
(td (p ,(package-description pkg)) (td (p ,(if (string=? "" (package-description pkg))
,@(maybe-splice `(span ((class "label-warning")) "This package needs a description")
(or has-docs? has-readme?) (package-description pkg)))
,(if (not (or has-docs? has-readme?))
(label-p "label-warning" "This package needs documentation")
`(div `(div
(span ((class "doctags-label")) "Docs: ") (span ((class "doctags-label")) "Docs: ")
,(doc-links (package-docs pkg)) ,(doc-links (package-docs pkg))
@ -651,8 +658,8 @@
" " " "
`(a ((href ,(package-readme-url pkg))) `(a ((href ,(package-readme-url pkg)))
"README")))) "README"))))
,@(maybe-splice ,(if (not has-tags?)
has-tags? (label-p "label-warning" "This package needs tags")
`(div `(div
(span ((class "doctags-label")) "Tags: ") (span ((class "doctags-label")) "Tags: ")
,(tag-links (package-tags pkg))))) ,(tag-links (package-tags pkg)))))
@ -663,6 +670,9 @@
;; for/fold reverses pkg-rows, so un-reverse before returning. ;; for/fold reverses pkg-rows, so un-reverse before returning.
(values (reverse pkg-rows) num-todos)) (values (reverse pkg-rows) num-todos))
(define (label-p cls txt)
`(p (span ((class ,cls)) ,txt)))
(define (build-status-td pkg) (define (build-status-td pkg)
;; Build the index page cell for summarizing a package's build status. ;; Build the index page cell for summarizing a package's build status.
;; Nothing at all is for no information on build success or failure. ;; Nothing at all is for no information on build success or failure.