@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Tune document details in Legalpad

Summary:
Fixes T9245. These picked up some possibly-confusing metadata, like in the screenshot on T9245 where "Subscribers" appears in the middle of the page for no obvious reason.

- Make these pages a little cleaner by removing elements which aren't important for signing agreements.
- Use the last time the actual document text was updated as the modification time, not the last time the "Document" object was modified. The latter will change for trivial things like altering the view/edit policy, but that could be confusing if you see that a TOS was "last updated yesterday" but can't figure out what actually changed (since nothing changed).

Test Plan: Viewed signature page for a document.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9245

Differential Revision: https://secure.phabricator.com/D13982

+13 -4
+13 -4
src/applications/legalpad/controller/LegalpadDocumentSignController.php
··· 234 234 $document, 235 235 PhabricatorPolicyCapability::CAN_EDIT); 236 236 237 + // Use the last content update as the modified date. We don't want to 238 + // show that a document like a TOS was "updated" by an incidental change 239 + // to a field like the preamble or privacy settings which does not acutally 240 + // affect the content of the agreement. 241 + $content_updated = $document_body->getDateCreated(); 242 + 243 + // NOTE: We're avoiding `setPolicyObject()` here so we don't pick up 244 + // extra UI elements that are unnecessary and clutter the signature page. 245 + // These details are available on the "Manage" page. 237 246 $header = id(new PHUIHeaderView()) 238 247 ->setHeader($title) 239 248 ->setUser($viewer) 240 - ->setPolicyObject($document) 241 - ->setEpoch($document->getDateModified()) 249 + ->setEpoch($content_updated) 242 250 ->addActionLink( 243 251 id(new PHUIButtonView()) 244 252 ->setTag('a') ··· 258 266 'default', 259 267 $viewer); 260 268 269 + // NOTE: We're avoiding `setObject()` here so we don't pick up extra UI 270 + // elements like "Subscribers". This information is available on the 271 + // "Manage" page, but just clutters up the "Signature" page. 261 272 $preamble = id(new PHUIPropertyListView()) 262 273 ->setUser($viewer) 263 - ->setObject($document) 264 274 ->addSectionHeader(pht('Preamble')) 265 275 ->addTextContent($preamble_text); 266 276 267 277 $preamble_box = new PHUIPropertyGroupView(); 268 278 $preamble_box->addPropertyList($preamble); 269 - 270 279 } 271 280 272 281 $content = id(new PHUIDocumentView())