From 3bc391fbc7f5bd4a5a1192aca7a5f02b612d71de Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Fri, 22 Aug 2014 13:15:49 -0700 Subject: [PATCH] Paste - add created time to pastes in a list Summary: Fixes T5943. We do this differently in different places; Audit / Differential do something like this while Pholio expands the "byLine" to include a timestamp. Go with the Audit / Differential approach, as presumably having the date as a top line, easily scannable metadata is the goal here. Test Plan: viewed a list of pastes and saw a timestamp of creation at the top. Reviewers: epriestley, chad Reviewed By: chad Subscribers: epriestley, Korvin Maniphest Tasks: T5943 Differential Revision: https://secure.phabricator.com/D10338 --- src/applications/paste/query/PhabricatorPasteSearchEngine.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/applications/paste/query/PhabricatorPasteSearchEngine.php b/src/applications/paste/query/PhabricatorPasteSearchEngine.php index 209f519ed9..f7289c7b29 100644 --- a/src/applications/paste/query/PhabricatorPasteSearchEngine.php +++ b/src/applications/paste/query/PhabricatorPasteSearchEngine.php @@ -163,6 +163,7 @@ final class PhabricatorPasteSearchEngine ), $preview); + $created = phabricator_datetime($paste->getDateCreated(), $viewer); $line_count = count($lines); $line_count = pht( '%s Line(s)', @@ -176,6 +177,7 @@ final class PhabricatorPasteSearchEngine ->setHref('/P'.$paste->getID()) ->setObject($paste) ->addByline(pht('Author: %s', $author)) + ->addIcon('none', $created) ->addIcon('none', $line_count) ->appendChild($source_code); -- 2.51.2