mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 02:32:42 +01:00
Clean up Phriction History View
Summary: Fixes T4028, makes the table a bit easier to read and navigate changesets. Test Plan: Tested a big history, back to original and latest. Reviewers: epriestley, btrahan CC: Korvin, epriestley, aran Maniphest Tasks: T4028 Differential Revision: https://secure.phabricator.com/D7438
This commit is contained in:
parent
6bdedfe679
commit
f82cb0e063
3 changed files with 38 additions and 12 deletions
|
@ -3804,7 +3804,7 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'phriction-document-css' =>
|
'phriction-document-css' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/7ae003b1/rsrc/css/application/phriction/phriction-document-css.css',
|
'uri' => '/res/97cbd7c6/rsrc/css/application/phriction/phriction-document-css.css',
|
||||||
'type' => 'css',
|
'type' => 'css',
|
||||||
'requires' =>
|
'requires' =>
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -113,7 +113,7 @@ final class PhrictionDiffController
|
||||||
->setHref(PhrictionDocument::getSlugURI($slug, 'history')));
|
->setHref(PhrictionDocument::getSlugURI($slug, 'history')));
|
||||||
|
|
||||||
|
|
||||||
$title = "Version $l vs $r";
|
$title = pht("Version %s vs %s", $l, $r);
|
||||||
|
|
||||||
$header = id(new PHUIHeaderView())
|
$header = id(new PHUIHeaderView())
|
||||||
->setHeader($title);
|
->setHeader($title);
|
||||||
|
@ -142,10 +142,17 @@ final class PhrictionDiffController
|
||||||
'a',
|
'a',
|
||||||
array(
|
array(
|
||||||
'href' => $uri->alter('l', $l - 1)->alter('r', $r - 1),
|
'href' => $uri->alter('l', $l - 1)->alter('r', $r - 1),
|
||||||
|
'class' => 'button',
|
||||||
),
|
),
|
||||||
pht("\xC2\xAB Previous Change"));
|
pht("\xC2\xAB Previous Change"));
|
||||||
} else {
|
} else {
|
||||||
$link_l = pht('Original Change');
|
$link_l = phutil_tag(
|
||||||
|
'a',
|
||||||
|
array(
|
||||||
|
'href' => '#',
|
||||||
|
'class' => 'button grey disabled',
|
||||||
|
),
|
||||||
|
pht('Original Change'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$link_r = null;
|
$link_r = null;
|
||||||
|
@ -154,10 +161,17 @@ final class PhrictionDiffController
|
||||||
'a',
|
'a',
|
||||||
array(
|
array(
|
||||||
'href' => $uri->alter('l', $l + 1)->alter('r', $r + 1),
|
'href' => $uri->alter('l', $l + 1)->alter('r', $r + 1),
|
||||||
|
'class' => 'button',
|
||||||
),
|
),
|
||||||
pht("Next Change \xC2\xBB"));
|
pht("Next Change \xC2\xBB"));
|
||||||
} else {
|
} else {
|
||||||
$link_r = pht('Most Recent Change');
|
$link_r = phutil_tag(
|
||||||
|
'a',
|
||||||
|
array(
|
||||||
|
'href' => '#',
|
||||||
|
'class' => 'button grey disabled',
|
||||||
|
),
|
||||||
|
pht('Most Recent Change'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$navigation_table = hsprintf(
|
$navigation_table = hsprintf(
|
||||||
|
@ -174,7 +188,7 @@ final class PhrictionDiffController
|
||||||
|
|
||||||
$output = hsprintf(
|
$output = hsprintf(
|
||||||
'<br><div class="phriction-document-history-diff">'.
|
'<br><div class="phriction-document-history-diff">'.
|
||||||
'%s<br /><br />%s'.
|
'%s%s'.
|
||||||
'<table class="phriction-revert-table">'.
|
'<table class="phriction-revert-table">'.
|
||||||
'<tr><td>%s</td><td>%s</td>'.
|
'<tr><td>%s</td><td>%s</td>'.
|
||||||
'</table>'.
|
'</table>'.
|
||||||
|
@ -187,11 +201,14 @@ final class PhrictionDiffController
|
||||||
$output);
|
$output);
|
||||||
|
|
||||||
|
|
||||||
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
|
->setHeader($header)
|
||||||
|
->appendChild($output);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
$crumbs,
|
$crumbs,
|
||||||
$header,
|
$object_box,
|
||||||
$output,
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => pht('Document History'),
|
'title' => pht('Document History'),
|
||||||
|
@ -223,7 +240,7 @@ final class PhrictionDiffController
|
||||||
'a',
|
'a',
|
||||||
array(
|
array(
|
||||||
'href' => '/phriction/edit/'.$document_id.'/',
|
'href' => '/phriction/edit/'.$document_id.'/',
|
||||||
'class' => 'button',
|
'class' => 'button grey',
|
||||||
),
|
),
|
||||||
pht('Edit Current Version'));
|
pht('Edit Current Version'));
|
||||||
}
|
}
|
||||||
|
@ -233,7 +250,7 @@ final class PhrictionDiffController
|
||||||
'a',
|
'a',
|
||||||
array(
|
array(
|
||||||
'href' => '/phriction/edit/'.$document_id.'/?revert='.$version,
|
'href' => '/phriction/edit/'.$document_id.'/?revert='.$version,
|
||||||
'class' => 'button',
|
'class' => 'button grey',
|
||||||
),
|
),
|
||||||
pht('Revert to Version %s...', $version));
|
pht('Revert to Version %s...', $version));
|
||||||
}
|
}
|
||||||
|
@ -247,6 +264,7 @@ final class PhrictionDiffController
|
||||||
$handles = $this->loadViewerHandles($phids);
|
$handles = $this->loadViewerHandles($phids);
|
||||||
|
|
||||||
$list = new PHUIObjectItemListView();
|
$list = new PHUIObjectItemListView();
|
||||||
|
$list->setFlush(true);
|
||||||
|
|
||||||
$first = true;
|
$first = true;
|
||||||
foreach ($content as $c) {
|
foreach ($content as $c) {
|
||||||
|
|
|
@ -43,8 +43,8 @@
|
||||||
text-shadow: 0 1px 2px #fff;
|
text-shadow: 0 1px 2px #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.phriction-document-history-diff {
|
.phriction-document-history-diff .phui-object-item-list-view {
|
||||||
padding: 0 2em 2em;
|
padding: 0 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.phriction-revert-table {
|
.phriction-revert-table {
|
||||||
|
@ -54,11 +54,15 @@
|
||||||
.phriction-revert-table td {
|
.phriction-revert-table td {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
padding: .5em 0;
|
padding: 8px 0;
|
||||||
|
margin: 0 16px;
|
||||||
|
background-color: {$lightbluebackground};
|
||||||
|
border-top: 1px solid {$lightblueborder};
|
||||||
}
|
}
|
||||||
|
|
||||||
.phriction-history-nav-table {
|
.phriction-history-nav-table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.phriction-history-nav-table td {
|
.phriction-history-nav-table td {
|
||||||
|
@ -66,6 +70,10 @@
|
||||||
color: {$darkgreytext};
|
color: {$darkgreytext};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.phriction-history-nav-table td {
|
||||||
|
padding: 8px 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.phriction-history-nav-table td.nav-next {
|
.phriction-history-nav-table td.nav-next {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue