Page MenuHomePhabricator

D11981.diff
No OneTemporary

D11981.diff

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

Mime Type
text/plain
Expires
Sat, Oct 26, 3:27 PM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6746058
Default Alt Text
D11981.diff (2 KB)

Event Timeline