diff --git a/scripts/celerity_mapper.php b/scripts/celerity_mapper.php index c80aa69e46..a120f03a92 100755 --- a/scripts/celerity_mapper.php +++ b/scripts/celerity_mapper.php @@ -70,7 +70,6 @@ $package_spec = array( 'aphront-form-view-css', 'aphront-panel-view-css', 'aphront-table-view-css', - 'aphront-crumbs-view-css', 'aphront-tokenizer-control-css', 'aphront-typeahead-control-css', 'aphront-list-filter-view-css', diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 6f784b2a3e..a13b97b6ec 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -23,7 +23,6 @@ phutil_register_library_map(array( 'AphrontCalendarMonthView' => 'applications/calendar/view/AphrontCalendarMonthView.php', 'AphrontContextBarView' => 'view/layout/AphrontContextBarView.php', 'AphrontController' => 'aphront/AphrontController.php', - 'AphrontCrumbsView' => 'view/layout/AphrontCrumbsView.php', 'AphrontCursorPagerView' => 'view/control/AphrontCursorPagerView.php', 'AphrontDefaultApplicationConfiguration' => 'aphront/configuration/AphrontDefaultApplicationConfiguration.php', 'AphrontDialogResponse' => 'aphront/response/AphrontDialogResponse.php', @@ -1603,7 +1602,6 @@ phutil_register_library_map(array( 'AphrontCalendarMonthView' => 'AphrontView', 'AphrontContextBarView' => 'AphrontView', 'AphrontController' => 'Phobject', - 'AphrontCrumbsView' => 'AphrontView', 'AphrontCursorPagerView' => 'AphrontView', 'AphrontDefaultApplicationConfiguration' => 'AphrontApplicationConfiguration', 'AphrontDialogResponse' => 'AphrontResponse', @@ -1752,8 +1750,8 @@ phutil_register_library_map(array( 'ConduitAPI_phid_lookup_Method' => 'ConduitAPI_phid_Method', 'ConduitAPI_phid_query_Method' => 'ConduitAPI_phid_Method', 'ConduitAPI_phpast_Method' => 'ConduitAPIMethod', - 'ConduitAPI_phpast_getast_Method' => 'ConduitAPIMethod', - 'ConduitAPI_phpast_version_Method' => 'ConduitAPIMethod', + 'ConduitAPI_phpast_getast_Method' => 'ConduitAPI_phpast_Method', + 'ConduitAPI_phpast_version_Method' => 'ConduitAPI_phpast_Method', 'ConduitAPI_phriction_Method' => 'ConduitAPIMethod', 'ConduitAPI_phriction_edit_Method' => 'ConduitAPI_phriction_Method', 'ConduitAPI_phriction_history_Method' => 'ConduitAPI_phriction_Method', diff --git a/src/applications/phriction/controller/PhrictionDiffController.php b/src/applications/phriction/controller/PhrictionDiffController.php index a1daeb9d95..186dd96ca0 100644 --- a/src/applications/phriction/controller/PhrictionDiffController.php +++ b/src/applications/phriction/controller/PhrictionDiffController.php @@ -101,24 +101,22 @@ final class PhrictionDiffController $revert_l = $this->renderRevertButton($content_l, $current); $revert_r = $this->renderRevertButton($content_r, $current); - $crumbs = new AphrontCrumbsView(); - $crumbs->setCrumbs( - array( - 'Phriction', - phutil_tag( - 'a', - array( - 'href' => PhrictionDocument::getSlugURI($slug), - ), - $current->getTitle()), - phutil_tag( - 'a', - array( - 'href' => '/phriction/history/'.$document->getSlug().'/', - ), - 'History'), - "Changes Between Version {$l} and Version {$r}", - )); + $crumbs = $this->buildApplicationCrumbs(); + $crumb_views = $this->renderBreadcrumbs($slug); + foreach ($crumb_views as $view) { + $crumbs->addCrumb($view); + } + + + $title = "Version $l vs $r"; + + $header = id(new PhabricatorHeaderView()) + ->setHeader($title); + + $crumbs->addCrumb( + id(new PhabricatorCrumbView()) + ->setName($title)); + $comparison_table = $this->renderComparisonTable( array( @@ -170,7 +168,7 @@ final class PhrictionDiffController $output = hsprintf( - '
%s | %s | '. @@ -183,14 +181,18 @@ final class PhrictionDiffController $revert_r, $output); - return $this->buildStandardPageResponse( + + return $this->buildApplicationPage( array( $crumbs, + $header, $output, ), array( 'title' => pht('Document History'), + 'device' => true, )); + } private function renderRevertButton( diff --git a/src/view/layout/AphrontCrumbsView.php b/src/view/layout/AphrontCrumbsView.php deleted file mode 100644 index e9cee36a22..0000000000 --- a/src/view/layout/AphrontCrumbsView.php +++ /dev/null @@ -1,31 +0,0 @@ -crumbs = $crumbs; - return $this; - } - - public function render() { - - require_celerity_resource('aphront-crumbs-view-css'); - - $out = array(); - foreach ($this->crumbs as $crumb) { - $out[] = $crumb; - } - $out = phutil_implode_html( - hsprintf(''."\xC2\xBB".''), - $out); - - return hsprintf( - '