Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14058429
D11981.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D11981.diff
View Options
diff --git a/src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php b/src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php
--- a/src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php
+++ b/src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php
@@ -88,74 +88,16 @@
// increments $ii by the entire size of the gap and then continues
// the loop.
$gap = array_pop($gaps);
-
- // TODO: Move this to renderShowContextLinks() once that is stable.
-
$top = $gap[0];
$len = $gap[1];
- $end = $top + $len - 20;
-
- $contents = array();
-
- if ($len > 40) {
- $is_first_block = false;
- if ($ii == 0) {
- $is_first_block = true;
- }
-
- $contents[] = javelin_tag(
- 'a',
- array(
- 'href' => '#',
- 'mustcapture' => true,
- 'sigil' => 'show-more',
- 'meta' => array(
- 'ref' => $reference,
- 'range' => "{$top}-{$len}/{$top}-20",
- ),
- ),
- $is_first_block
- ? pht('Show First 20 Lines')
- : pht("\xE2\x96\xB2 Show 20 Lines"));
- }
-
- $contents[] = javelin_tag(
- 'a',
- array(
- 'href' => '#',
- 'mustcapture' => true,
- 'sigil' => 'show-more',
- 'meta' => array(
- 'type' => 'all',
- 'ref' => $reference,
- 'range' => "{$top}-{$len}/{$top}-{$len}",
- ),
- ),
- pht('Show All %d Lines', $len));
+ $contents = $this->renderShowContextLinks($top, $len, $rows);
$is_last_block = false;
if ($ii + $len >= $rows) {
$is_last_block = true;
}
- if ($len > 40) {
- $contents[] = javelin_tag(
- 'a',
- array(
- 'href' => '#',
- 'mustcapture' => true,
- 'sigil' => 'show-more',
- 'meta' => array(
- 'ref' => $reference,
- 'range' => "{$top}-{$len}/{$end}-20",
- ),
- ),
- $is_last_block
- ? pht('Show Last 20 Lines')
- : pht("\xE2\x96\xBC Show 20 Lines"));
- }
-
$context = null;
$context_line = null;
if (!$is_last_block && $depths[$ii + $len]) {
@@ -181,9 +123,7 @@
'colspan' => 2,
'class' => 'show-more',
),
- phutil_implode_html(
- " \xE2\x80\xA2 ", // Bullet
- $contents)),
+ $contents),
phutil_tag(
'th',
array(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 12:04 PM (14 h, 37 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6746058
Default Alt Text
D11981.diff (2 KB)
Attached To
Mode
D11981: Share code for context link rendering on side-by-side diffs
Attached
Detach File
Event Timeline
Log In to Comment