diff --git a/src/applications/phriction/controller/PhrictionDiffController.php b/src/applications/phriction/controller/PhrictionDiffController.php --- a/src/applications/phriction/controller/PhrictionDiffController.php +++ b/src/applications/phriction/controller/PhrictionDiffController.php @@ -95,7 +95,7 @@ $navigation_table = null; if ($l + 1 == $r) { $nav_l = ($l > 1); - $nav_r = ($r != $current->getVersion()); + $nav_r = ($r != $document->getMaxVersion()); $uri = $request->getRequestURI(); @@ -191,30 +191,28 @@ PhrictionChangeType::CHANGE_MOVE_AWAY => true, // Plain silly PhrictionChangeType::CHANGE_STUB => true, // Utterly silly ); + if (isset($hidden_statuses[$content->getChangeType()])) { // Don't show an edit/revert button for changes which deleted, moved or // stubbed the content since it's silly. return null; } - if ($content->getID() == $current->getID()) { - return phutil_tag( - 'a', - array( - 'href' => '/phriction/edit/'.$document_id.'/', - 'class' => 'button button-grey', - ), - pht('Edit Current Version')); + if ($version == $current->getVersion()) { + $label = pht('Edit Current Version %s...', new PhutilNumber($version)); + } else if ($version < $current->getVersion()) { + $label = pht('Edit Older Version %s...', new PhutilNumber($version)); + } else { + $label = pht('Edit Draft Version %s...', new PhutilNumber($version)); } - return phutil_tag( 'a', array( 'href' => '/phriction/edit/'.$document_id.'/?revert='.$version, 'class' => 'button button-grey', ), - pht('Revert to Version %s...', $version)); + $label); } private function renderComparisonTable(array $content) { diff --git a/src/applications/phriction/controller/PhrictionDocumentController.php b/src/applications/phriction/controller/PhrictionDocumentController.php --- a/src/applications/phriction/controller/PhrictionDocumentController.php +++ b/src/applications/phriction/controller/PhrictionDocumentController.php @@ -476,7 +476,7 @@ if ($is_draft) { $publish_name = pht('Publish Draft'); } else { - $publish_name = pht('Publish Revert'); + $publish_name = pht('Publish Older Version'); } // If you're looking at the current version; and it's an unpublished diff --git a/src/applications/phriction/controller/PhrictionPublishController.php b/src/applications/phriction/controller/PhrictionPublishController.php --- a/src/applications/phriction/controller/PhrictionPublishController.php +++ b/src/applications/phriction/controller/PhrictionPublishController.php @@ -63,7 +63,7 @@ } if ($content->getVersion() < $document->getContent()->getVersion()) { - $title = pht('Revert Document?'); + $title = pht('Publish Older Version?'); $body = pht( 'Revert the published version of this document to an older '. 'version?');