Browse files

improve getReverseR package output

- display total number of reverse deps in heading
- only link to packages that have reverse deps, to avoid 404's
- always display package version ranges, since it's useful information
- highlight packages that require an older package version
  with a light red background instead of Yes/No
  • Loading branch information...
1 parent 6940c8a commit 4500150c9d24f30882a238a0e945fa82f19f119b @juhp juhp committed Aug 23, 2011
Showing with 7 additions and 5 deletions.
  1. +7 −5 packdeps-yesod.hs
12 packdeps-yesod.hs
@@ -297,17 +297,19 @@ getReverseR dep = do
setTitle [shamlet|Reverse dependencies for #{dep}|]
addCassius mainCassius
addHamlet [hamlet|
-<h1>Reverse dependencies for #{dep} #{display version}
+<h1>#{show $ length rels} reverse dependencies for #{dep}-#{display version}
<th>Uses current version?
$forall rel <- rels
- <td
- <a href=@{ReverseR $ pack $ fst rel}>#{fst rel}
+ $if Map.member (fst rel) reverse
+ <td><a href=@{ReverseR $ pack $ fst rel}>#{fst rel}
+ $else
+ <td>#{fst rel}
$if withinRange version (snd rel)
- <td>Yes
+ <td>#{display (snd rel)}
- <td style="color:#900">No (#{display (snd rel)})
+ <td style="background-color:#fbb">#{display (snd rel)}

0 comments on commit 4500150

Please sign in to comment.