RSS feed: include package links

This commit is contained in:
Michael Snoyman 2017-09-18 13:42:46 +03:00
parent fda2b78723
commit a95dfbe396
No known key found for this signature in database
GPG Key ID: A048E8C057E86876

View File

@ -58,8 +58,9 @@ getContent sid2 snap = do
Nothing -> return "No previous snapshot found for comparison" Nothing -> return "No previous snapshot found for comparison"
Just (sid1, name1) -> do Just (sid1, name1) -> do
snapDiff <- getSnapshotDiff sid1 sid2 snapDiff <- getSnapshotDiff sid1 sid2
return let name2 = snapshotName snap
[shamlet| withUrlRenderer
[hamlet|
<p>Difference between #{prettyNameShort name1} and #{prettyNameShort $ snapshotName snap} <p>Difference between #{prettyNameShort name1} and #{prettyNameShort $ snapshotName snap}
<table border=1 cellpadding=5> <table border=1 cellpadding=5>
<thead> <thead>
@ -68,17 +69,25 @@ getContent sid2 snap = do
<th align=right>Old <th align=right>Old
<th align=left>New <th align=left>New
<tbody> <tbody>
$forall (PackageName name, VersionChange change) <- toDiffList snapDiff $forall (pkgname@(PackageName name), VersionChange change) <- toDiffList snapDiff
<tr> <tr>
<th align=right>#{name} <th align=right>#{name}
$case change $case change
$of This (Version old) $of This old
<td align=right>#{old}
<td>
$of That (Version new)
<td align=right> <td align=right>
<td>#{new} <a href=@{packageUrl name1 pkgname old}#changes>
$of These (Version old) (Version new) #{old}
<td align=right>#{old} <td>
<td>#{new} $of That new
<td align=right>
<td>
<a href=@{packageUrl name2 pkgname new}#changes>
#{new}
$of These old new
<td align=right>
<a href=@{packageUrl name1 pkgname old}#changes>
#{old}
<td>
<a href=@{packageUrl name2 pkgname new}#changes>
#{new}
|] |]