@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.

Make Phriction diff-of-changes view draft-aware and clarify some language

Summary:
Ref T13077. Ref T13197. See PHI840.

- In the "History > Diff/Compare" view, the button language wasn't draft-aware.
- Revise language to avoid the word "Revert", since this can be ambiguous.
- "Edit this page, starting with an older version of the text" is now "Edit Older|Current|Draft Version X".
- "Mark this older version of the page as the current published version" is now "Publish Older Version".
- Let the user edit the current published version, too, since this is a reasonable operation if there are drafts.

Test Plan: Navigated the history diff view, saw better button and action text.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13197, T13077

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

+11 -13
+9 -11
src/applications/phriction/controller/PhrictionDiffController.php
··· 95 95 $navigation_table = null; 96 96 if ($l + 1 == $r) { 97 97 $nav_l = ($l > 1); 98 - $nav_r = ($r != $current->getVersion()); 98 + $nav_r = ($r != $document->getMaxVersion()); 99 99 100 100 $uri = $request->getRequestURI(); 101 101 ··· 191 191 PhrictionChangeType::CHANGE_MOVE_AWAY => true, // Plain silly 192 192 PhrictionChangeType::CHANGE_STUB => true, // Utterly silly 193 193 ); 194 + 194 195 if (isset($hidden_statuses[$content->getChangeType()])) { 195 196 // Don't show an edit/revert button for changes which deleted, moved or 196 197 // stubbed the content since it's silly. 197 198 return null; 198 199 } 199 200 200 - if ($content->getID() == $current->getID()) { 201 - return phutil_tag( 202 - 'a', 203 - array( 204 - 'href' => '/phriction/edit/'.$document_id.'/', 205 - 'class' => 'button button-grey', 206 - ), 207 - pht('Edit Current Version')); 201 + if ($version == $current->getVersion()) { 202 + $label = pht('Edit Current Version %s...', new PhutilNumber($version)); 203 + } else if ($version < $current->getVersion()) { 204 + $label = pht('Edit Older Version %s...', new PhutilNumber($version)); 205 + } else { 206 + $label = pht('Edit Draft Version %s...', new PhutilNumber($version)); 208 207 } 209 - 210 208 211 209 return phutil_tag( 212 210 'a', ··· 214 212 'href' => '/phriction/edit/'.$document_id.'/?revert='.$version, 215 213 'class' => 'button button-grey', 216 214 ), 217 - pht('Revert to Version %s...', $version)); 215 + $label); 218 216 } 219 217 220 218 private function renderComparisonTable(array $content) {
+1 -1
src/applications/phriction/controller/PhrictionDocumentController.php
··· 476 476 if ($is_draft) { 477 477 $publish_name = pht('Publish Draft'); 478 478 } else { 479 - $publish_name = pht('Publish Revert'); 479 + $publish_name = pht('Publish Older Version'); 480 480 } 481 481 482 482 // If you're looking at the current version; and it's an unpublished
+1 -1
src/applications/phriction/controller/PhrictionPublishController.php
··· 63 63 } 64 64 65 65 if ($content->getVersion() < $document->getContent()->getVersion()) { 66 - $title = pht('Revert Document?'); 66 + $title = pht('Publish Older Version?'); 67 67 $body = pht( 68 68 'Revert the published version of this document to an older '. 69 69 'version?');