mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
Add a "Last Edited" property to Wiki pages
Summary: Ref T13164. See PHI797. The last edit is available in the page header, but it's not precise (just says "180 days ago") and a little weird (it's unusual for us to put that kind of information in the header). Add a precise timestamp to the footer for now. I'd imagine re-examining this the next time Phriction gets some UI work and maybe trying to integrate timeline/transactions more cleanly (see also T1894). Test Plan: Looked at a wiki page, then edited it. Saw precise "Last Edit" timestamp adjacent to "Last Author". Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13164 Differential Revision: https://secure.phabricator.com/D19560
This commit is contained in:
parent
3574a55a95
commit
f3fa164882
1 changed files with 6 additions and 1 deletions
|
@ -254,7 +254,8 @@ final class PhrictionDocumentController
|
|||
PhrictionContent $content,
|
||||
$slug) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setUser($viewer)
|
||||
->setObject($document);
|
||||
|
@ -263,6 +264,10 @@ final class PhrictionDocumentController
|
|||
pht('Last Author'),
|
||||
$viewer->renderHandle($content->getAuthorPHID()));
|
||||
|
||||
$view->addProperty(
|
||||
pht('Last Edited'),
|
||||
phabricator_datetime($content->getDateCreated(), $viewer));
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue