Merge lp:~wgrant/launchpad/bug-1015289 into lp:launchpad

Proposed by William Grant on 2012-06-20
Status: Merged
Approved by: William Grant on 2012-06-20
Approved revision: no longer in the source branch.
Merged at revision: 15456
Proposed branch: lp:~wgrant/launchpad/bug-1015289
Merge into: lp:launchpad
Diff against target: 12 lines (+1/-1)
1 file modified
lib/lp/registry/templates/distributionsourcepackage-index.pt (+1/-1)
To merge this branch: bzr merge lp:~wgrant/launchpad/bug-1015289
Reviewer Review Type Date Requested Status
Ian Booth (community) 2012-06-20 Approve on 2012-06-20
Review via email: mp+111139@code.launchpad.net

Commit Message

Use fmt:approximatedate instead of fmt:date on DistributionSourcePackage:+index to make uploads within the last 24 hours a bit more useful.

Description of the Change

This branch fixes bug #1015289, an issue that I raised during the fixing of bug #999662.

DistributionSourcePackage:+index used to always show the age of publications, which got sort of ridiculous (eg. "220 weeks ago"). Bug #999662 was fixed by changing it to show a date. But that makes it pretty awkward to see when a very recent upload happened, as fmt:date doesn't use an age for even moments-old timestamps. This branch just changes the page to use fmt:approximatedate, which displays an age for timestamps less than a day old, and a date otherwise.

To post a comment you must log in.
Ian Booth (wallyworld) wrote :

What a hard review

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/templates/distributionsourcepackage-index.pt'
2--- lib/lp/registry/templates/distributionsourcepackage-index.pt 2012-06-14 10:34:55 +0000
3+++ lib/lp/registry/templates/distributionsourcepackage-index.pt 2012-06-20 03:21:21 +0000
4@@ -162,7 +162,7 @@
5 </td>
6 <td>
7 <tal:date_published condition="row/date_published">
8- <span tal:replace="row/date_published/fmt:date"/>
9+ <span tal:replace="row/date_published/fmt:approximatedate"/>
10 </tal:date_published>
11 <tal:not_published
12 condition="not: row/date_published"