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

Replaced AphrontCrumbsView with PhabricatorCrumbsView in PhrictionDiffController

Summary: Same as title

Test Plan: By checking in Phriction UI in Phabricator

Reviewers: epriestley, AnhNhan

Reviewed By: epriestley

CC: aran, Korvin

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

authored by

Afaque Hussain and committed by
epriestley
69d087a1 d887a3ff

+24 -78
-1
scripts/celerity_mapper.php
··· 70 70 'aphront-form-view-css', 71 71 'aphront-panel-view-css', 72 72 'aphront-table-view-css', 73 - 'aphront-crumbs-view-css', 74 73 'aphront-tokenizer-control-css', 75 74 'aphront-typeahead-control-css', 76 75 'aphront-list-filter-view-css',
+2 -4
src/__phutil_library_map__.php
··· 23 23 'AphrontCalendarMonthView' => 'applications/calendar/view/AphrontCalendarMonthView.php', 24 24 'AphrontContextBarView' => 'view/layout/AphrontContextBarView.php', 25 25 'AphrontController' => 'aphront/AphrontController.php', 26 - 'AphrontCrumbsView' => 'view/layout/AphrontCrumbsView.php', 27 26 'AphrontCursorPagerView' => 'view/control/AphrontCursorPagerView.php', 28 27 'AphrontDefaultApplicationConfiguration' => 'aphront/configuration/AphrontDefaultApplicationConfiguration.php', 29 28 'AphrontDialogResponse' => 'aphront/response/AphrontDialogResponse.php', ··· 1603 1602 'AphrontCalendarMonthView' => 'AphrontView', 1604 1603 'AphrontContextBarView' => 'AphrontView', 1605 1604 'AphrontController' => 'Phobject', 1606 - 'AphrontCrumbsView' => 'AphrontView', 1607 1605 'AphrontCursorPagerView' => 'AphrontView', 1608 1606 'AphrontDefaultApplicationConfiguration' => 'AphrontApplicationConfiguration', 1609 1607 'AphrontDialogResponse' => 'AphrontResponse', ··· 1752 1750 'ConduitAPI_phid_lookup_Method' => 'ConduitAPI_phid_Method', 1753 1751 'ConduitAPI_phid_query_Method' => 'ConduitAPI_phid_Method', 1754 1752 'ConduitAPI_phpast_Method' => 'ConduitAPIMethod', 1755 - 'ConduitAPI_phpast_getast_Method' => 'ConduitAPIMethod', 1756 - 'ConduitAPI_phpast_version_Method' => 'ConduitAPIMethod', 1753 + 'ConduitAPI_phpast_getast_Method' => 'ConduitAPI_phpast_Method', 1754 + 'ConduitAPI_phpast_version_Method' => 'ConduitAPI_phpast_Method', 1757 1755 'ConduitAPI_phriction_Method' => 'ConduitAPIMethod', 1758 1756 'ConduitAPI_phriction_edit_Method' => 'ConduitAPI_phriction_Method', 1759 1757 'ConduitAPI_phriction_history_Method' => 'ConduitAPI_phriction_Method',
+22 -20
src/applications/phriction/controller/PhrictionDiffController.php
··· 101 101 $revert_l = $this->renderRevertButton($content_l, $current); 102 102 $revert_r = $this->renderRevertButton($content_r, $current); 103 103 104 - $crumbs = new AphrontCrumbsView(); 105 - $crumbs->setCrumbs( 106 - array( 107 - 'Phriction', 108 - phutil_tag( 109 - 'a', 110 - array( 111 - 'href' => PhrictionDocument::getSlugURI($slug), 112 - ), 113 - $current->getTitle()), 114 - phutil_tag( 115 - 'a', 116 - array( 117 - 'href' => '/phriction/history/'.$document->getSlug().'/', 118 - ), 119 - 'History'), 120 - "Changes Between Version {$l} and Version {$r}", 121 - )); 104 + $crumbs = $this->buildApplicationCrumbs(); 105 + $crumb_views = $this->renderBreadcrumbs($slug); 106 + foreach ($crumb_views as $view) { 107 + $crumbs->addCrumb($view); 108 + } 109 + 110 + 111 + $title = "Version $l vs $r"; 112 + 113 + $header = id(new PhabricatorHeaderView()) 114 + ->setHeader($title); 115 + 116 + $crumbs->addCrumb( 117 + id(new PhabricatorCrumbView()) 118 + ->setName($title)); 119 + 122 120 123 121 $comparison_table = $this->renderComparisonTable( 124 122 array( ··· 170 168 171 169 172 170 $output = hsprintf( 173 - '<div class="phriction-document-history-diff">'. 171 + '<br><div class="phriction-document-history-diff">'. 174 172 '%s<br /><br />%s'. 175 173 '<table class="phriction-revert-table">'. 176 174 '<tr><td>%s</td><td>%s</td>'. ··· 183 181 $revert_r, 184 182 $output); 185 183 186 - return $this->buildStandardPageResponse( 184 + 185 + return $this->buildApplicationPage( 187 186 array( 188 187 $crumbs, 188 + $header, 189 189 $output, 190 190 ), 191 191 array( 192 192 'title' => pht('Document History'), 193 + 'device' => true, 193 194 )); 195 + 194 196 } 195 197 196 198 private function renderRevertButton(
-31
src/view/layout/AphrontCrumbsView.php
··· 1 - <?php 2 - 3 - final class AphrontCrumbsView extends AphrontView { 4 - 5 - private $crumbs = array(); 6 - 7 - public function setCrumbs(array $crumbs) { 8 - $this->crumbs = $crumbs; 9 - return $this; 10 - } 11 - 12 - public function render() { 13 - 14 - require_celerity_resource('aphront-crumbs-view-css'); 15 - 16 - $out = array(); 17 - foreach ($this->crumbs as $crumb) { 18 - $out[] = $crumb; 19 - } 20 - $out = phutil_implode_html( 21 - hsprintf('<span class="aphront-crumbs-spacer">'."\xC2\xBB".'</span>'), 22 - $out); 23 - 24 - return hsprintf( 25 - '<div class="aphront-crumbs-view">'. 26 - '<div class="aphront-crumbs-content">%s</div>'. 27 - '</div>', 28 - $out); 29 - } 30 - 31 - }
-22
webroot/rsrc/css/aphront/crumbs-view.css
··· 1 - /** 2 - * @provides aphront-crumbs-view-css 3 - */ 4 - 5 - .aphront-crumbs-view { 6 - margin: 1em 2em; 7 - } 8 - 9 - .aphront-crumbs-content { 10 - font-size: 16px; 11 - font-weight: bold; 12 - color: #333; 13 - } 14 - 15 - .aphront-crumbs-spacer { 16 - padding: 0 .35em; 17 - color: #888888; 18 - } 19 - 20 - .device-desktop .aphront-crumbs-view { 21 - width: 66%; 22 - }