fixes from connors code
This commit is contained in:
parent
9cafa90c69
commit
37cbb17fd3
15
src/site.rkt
15
src/site.rkt
|
@ -596,7 +596,7 @@
|
||||||
(define-values (pkg-rows num-todos)
|
(define-values (pkg-rows num-todos)
|
||||||
(build-pkg-rows/num-todos package-names))
|
(build-pkg-rows/num-todos package-names))
|
||||||
`(table
|
`(table
|
||||||
((class "packages sortable") (data-todokey ,num-todos))
|
((class "packages sortable") (data-todokey ,(number->string num-todos)))
|
||||||
(thead
|
(thead
|
||||||
(tr
|
(tr
|
||||||
(th 'nbsp)
|
(th 'nbsp)
|
||||||
|
@ -631,7 +631,7 @@
|
||||||
[else 0]))
|
[else 0]))
|
||||||
(define row-xexp
|
(define row-xexp
|
||||||
`(tr
|
`(tr
|
||||||
((data-todokey ,todokey))
|
((data-todokey ,(number->string todokey)))
|
||||||
(td (span ((class "last-updated-negated") (style "display: none"))
|
(td (span ((class "last-updated-negated") (style "display: none"))
|
||||||
,(~a (- (package-last-updated pkg))))
|
,(~a (- (package-last-updated pkg))))
|
||||||
,@(maybe-splice
|
,@(maybe-splice
|
||||||
|
@ -655,8 +655,9 @@
|
||||||
(span ((class "doctags-label")) "Tags: ")
|
(span ((class "doctags-label")) "Tags: ")
|
||||||
,(tag-links (package-tags pkg)))))
|
,(tag-links (package-tags pkg)))))
|
||||||
,(build-status-td pkg)
|
,(build-status-td pkg)
|
||||||
(td ((style "display: none")) ,todokey)))
|
(td ((style "display: none")) ,(number->string todokey))))
|
||||||
(values (cons row-xexp pkg-rows) (if (> 0 todokey) (add1 num-todos) num-todos))))
|
(values (cons row-xexp pkg-rows)
|
||||||
|
(+ num-todos (min todokey 1)))))
|
||||||
;; 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))
|
||||||
|
|
||||||
|
@ -728,7 +729,7 @@
|
||||||
,(format "~a packages" (length package-name-list))
|
,(format "~a packages" (length package-name-list))
|
||||||
" "
|
" "
|
||||||
(a ((href ,(format "~a?q=%20" (named-url search-page)))) "(see all, including packages tagged as \"deprecated\", \"main-distribution\", or \"main-test\")"))
|
(a ((href ,(format "~a?q=%20" (named-url search-page)))) "(see all, including packages tagged as \"deprecated\", \"main-distribution\", or \"main-test\")"))
|
||||||
(p ((class "package-count") (id "todo-msg")) "") ;; filled in by client-side JS.
|
(p ((class "package-count") (id "todo-msg")) "")
|
||||||
,(package-summary-table package-name-list))
|
,(package-summary-table package-name-list))
|
||||||
`(div ((class "jumbotron"))
|
`(div ((class "jumbotron"))
|
||||||
(p "Questions? Comments? Bugs? Email "
|
(p "Questions? Comments? Bugs? Email "
|
||||||
|
@ -1404,7 +1405,8 @@
|
||||||
|
|
||||||
(define (search-page request)
|
(define (search-page request)
|
||||||
(parameterize ((bootstrap-active-navigation nav-search)
|
(parameterize ((bootstrap-active-navigation nav-search)
|
||||||
(bootstrap-page-scripts (list (static-resource-url "/searchbox.js"))))
|
(bootstrap-page-scripts (list (static-resource-url "/searchbox.js")
|
||||||
|
(static-resource-url "/todos.js"))))
|
||||||
(authentication-wrap
|
(authentication-wrap
|
||||||
#:request request
|
#:request request
|
||||||
(define-form-bindings request ([search-text q ""]
|
(define-form-bindings request ([search-text q ""]
|
||||||
|
@ -1433,6 +1435,7 @@
|
||||||
`(div
|
`(div
|
||||||
(p ((class "package-count"))
|
(p ((class "package-count"))
|
||||||
,(format "~a packages found" (length package-name-list)))
|
,(format "~a packages found" (length package-name-list)))
|
||||||
|
(p ((class "package-count") (id "todo-msg")) "")
|
||||||
,(package-summary-table package-name-list))))))))))
|
,(package-summary-table package-name-list))))))))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
|
@ -24,6 +24,7 @@ $(function() {
|
||||||
var todoTotal = $("table.packages").data("todokey");
|
var todoTotal = $("table.packages").data("todokey");
|
||||||
|
|
||||||
if (todoTotal > 0) {
|
if (todoTotal > 0) {
|
||||||
|
$("#todo-msg").show();
|
||||||
$("#todo-msg").html(
|
$("#todo-msg").html(
|
||||||
todoTotal + " todos. " +
|
todoTotal + " todos. " +
|
||||||
"<a style='cursor:pointer' id='filter-pkgs'> Click here to see them.</a>"
|
"<a style='cursor:pointer' id='filter-pkgs'> Click here to see them.</a>"
|
||||||
|
@ -43,6 +44,8 @@ $(function() {
|
||||||
filterIsApplied = false;
|
filterIsApplied = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
$("#todo-msg").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
}); /* document.ready */
|
}); /* document.ready */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user