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

Add "View Raw Remarkup" to inline comments

Summary: Ref T13513. Ref T11401. Support viewing raw remarkup for inlines.

Test Plan: Viewed raw remarkup on inlines.

Maniphest Tasks: T13513, T11401

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

+40 -15
+6 -6
resources/celerity/map.php
··· 13 13 'core.pkg.js' => '1e667bcb', 14 14 'dark-console.pkg.js' => '187792c2', 15 15 'differential.pkg.css' => 'd71d4531', 16 - 'differential.pkg.js' => '21616a78', 16 + 'differential.pkg.js' => 'b3e29cb8', 17 17 'diffusion.pkg.css' => '42c75c37', 18 18 'diffusion.pkg.js' => 'a98c0bf7', 19 19 'maniphest.pkg.css' => '35995d6d', ··· 381 381 'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => '0116d3e8', 382 382 'rsrc/js/application/diff/DiffChangeset.js' => '20715b98', 383 383 'rsrc/js/application/diff/DiffChangesetList.js' => '40d6c41c', 384 - 'rsrc/js/application/diff/DiffInline.js' => '15de2478', 384 + 'rsrc/js/application/diff/DiffInline.js' => '6227a0e3', 385 385 'rsrc/js/application/diff/DiffPathView.js' => '8207abf9', 386 386 'rsrc/js/application/diff/DiffTreeView.js' => '5d83623b', 387 387 'rsrc/js/application/differential/behavior-diff-radios.js' => '925fe8cd', ··· 776 776 'phabricator-dashboard-css' => '5a205b9d', 777 777 'phabricator-diff-changeset' => '20715b98', 778 778 'phabricator-diff-changeset-list' => '40d6c41c', 779 - 'phabricator-diff-inline' => '15de2478', 779 + 'phabricator-diff-inline' => '6227a0e3', 780 780 'phabricator-diff-path-view' => '8207abf9', 781 781 'phabricator-diff-tree-view' => '5d83623b', 782 782 'phabricator-drag-and-drop-file-upload' => '4370900d', ··· 1034 1034 'javelin-stratcom', 1035 1035 'javelin-util', 1036 1036 ), 1037 - '15de2478' => array( 1038 - 'javelin-dom', 1039 - ), 1040 1037 '1a844c06' => array( 1041 1038 'javelin-install', 1042 1039 'javelin-util', ··· 1510 1507 ), 1511 1508 '60cd9241' => array( 1512 1509 'javelin-behavior', 1510 + ), 1511 + '6227a0e3' => array( 1512 + 'javelin-dom', 1513 1513 ), 1514 1514 '6337cf26' => array( 1515 1515 'javelin-behavior',
+5
src/applications/transactions/storage/PhabricatorApplicationTransactionComment.php
··· 101 101 return ($this->oldComment !== self::ATTACHABLE); 102 102 } 103 103 104 + public function getRawRemarkupURI() { 105 + return urisprintf( 106 + '/transactions/raw/%s/', 107 + $this->getTransactionPHID()); 108 + } 104 109 105 110 /* -( PhabricatorMarkupInterface )----------------------------------------- */ 106 111
+22 -6
src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php
··· 173 173 'action' => 'edit', 174 174 'key' => 'e', 175 175 ); 176 - 177 - $menu_items[] = array( 178 - 'label' => pht('Delete Comment'), 179 - 'icon' => 'fa-trash-o', 180 - 'action' => 'delete', 181 - ); 182 176 } else if ($is_preview) { 183 177 $links[] = javelin_tag( 184 178 'a', ··· 233 227 'icon' => 'fa-quote-left', 234 228 'action' => 'quote', 235 229 'key' => 'R', 230 + ); 231 + } 232 + 233 + if (!$is_preview) { 234 + $xaction_phid = $inline->getTransactionPHID(); 235 + $storage = $inline->getStorageObject(); 236 + 237 + if ($xaction_phid) { 238 + $menu_items[] = array( 239 + 'label' => pht('View Raw Remarkup'), 240 + 'icon' => 'fa-code', 241 + 'action' => 'raw', 242 + 'uri' => $storage->getRawRemarkupURI(), 243 + ); 244 + } 245 + } 246 + 247 + if ($this->editable && !$is_preview) { 248 + $menu_items[] = array( 249 + 'label' => pht('Delete Comment'), 250 + 'icon' => 'fa-trash-o', 251 + 'action' => 'delete', 236 252 ); 237 253 } 238 254
+1 -1
src/view/phui/PHUITimelineEventView.php
··· 705 705 $items[] = id(new PhabricatorActionView()) 706 706 ->setIcon('fa-code') 707 707 ->setHref('/transactions/raw/'.$xaction_phid.'/') 708 - ->setName(pht('View Remarkup')) 708 + ->setName(pht('View Raw Remarkup')) 709 709 ->addSigil('transaction-raw') 710 710 ->setMetadata( 711 711 array(
+6 -2
webroot/rsrc/js/application/diff/DiffInline.js
··· 921 921 for (var ii = 0; ii < this._menuItems.length; ii++) { 922 922 var spec = this._menuItems[ii]; 923 923 924 - var onmenu = JX.bind(this, this._onMenuItem, menu, spec.action); 924 + var onmenu = JX.bind(this, this._onMenuItem, menu, spec.action, spec); 925 925 926 926 var item = new JX.PHUIXActionView() 927 927 .setIcon(spec.icon) ··· 938 938 return items; 939 939 }, 940 940 941 - _onMenuItem: function(menu, action, e) { 941 + _onMenuItem: function(menu, action, spec, e) { 942 942 e.prevent(); 943 943 menu.close(); 944 944 ··· 957 957 break; 958 958 case 'edit': 959 959 this.edit(); 960 + break; 961 + case 'raw': 962 + new JX.Workflow(spec.uri) 963 + .start(); 960 964 break; 961 965 } 962 966