diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php
index f83dbeeb8a..6cf7c73547 100644
--- a/src/__celerity_resource_map__.php
+++ b/src/__celerity_resource_map__.php
@@ -3397,7 +3397,7 @@ celerity_register_resource_map(array(
),
'phriction-document-css' =>
array(
- 'uri' => '/res/8d09bd7f/rsrc/css/application/phriction/phriction-document-css.css',
+ 'uri' => '/res/e71e4a67/rsrc/css/application/phriction/phriction-document-css.css',
'type' => 'css',
'requires' =>
array(
diff --git a/src/applications/phriction/controller/PhrictionDiffController.php b/src/applications/phriction/controller/PhrictionDiffController.php
index 186dd96ca0..811ac4e611 100644
--- a/src/applications/phriction/controller/PhrictionDiffController.php
+++ b/src/applications/phriction/controller/PhrictionDiffController.php
@@ -107,6 +107,11 @@ final class PhrictionDiffController
$crumbs->addCrumb($view);
}
+ $crumbs->addCrumb(
+ id(new PhabricatorCrumbView())
+ ->setName(pht('History'))
+ ->setHref(PhrictionDocument::getSlugURI($slug, 'history')));
+
$title = "Version $l vs $r";
@@ -115,7 +120,8 @@ final class PhrictionDiffController
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
- ->setName($title));
+ ->setName($title)
+ ->setHref($request->getRequestURI()));
$comparison_table = $this->renderComparisonTable(
@@ -166,7 +172,6 @@ final class PhrictionDiffController
}
-
$output = hsprintf(
'
'.
'%s
%s'.
@@ -202,9 +207,14 @@ final class PhrictionDiffController
$document_id = $content->getDocumentID();
$version = $content->getVersion();
- if ($content->getChangeType() == PhrictionChangeType::CHANGE_DELETE) {
- // Don't show an edit/revert button for changes which deleted the content
- // since it's silly.
+ $hidden_statuses = array(
+ PhrictionChangeType::CHANGE_DELETE => true, // Silly
+ PhrictionChangeType::CHANGE_MOVE_AWAY => true, // Plain silly
+ PhrictionChangeType::CHANGE_STUB => true, // Utterly silly
+ );
+ if (isset($hidden_statuses[$content->getChangeType()])) {
+ // Don't show an edit/revert button for changes which deleted, moved or
+ // stubbed the content since it's silly.
return null;
}
@@ -236,37 +246,35 @@ final class PhrictionDiffController
$phids = mpull($content, 'getAuthorPHID');
$handles = $this->loadViewerHandles($phids);
- $rows = array();
+ $list = new PhabricatorObjectItemListView();
+
+ $first = true;
foreach ($content as $c) {
- $rows[] = array(
- phabricator_date($c->getDateCreated(), $user),
- phabricator_time($c->getDateCreated(), $user),
- 'Version '.$c->getVersion(),
- $handles[$c->getAuthorPHID()]->renderLink(),
- $c->getDescription(),
- );
+ $author = $handles[$c->getAuthorPHID()]->renderLink();
+ $item = id(new PhabricatorObjectItemView())
+ ->setHeader(pht('%s by %s, %s',
+ PhrictionChangeType::getChangeTypeLabel($c->getChangeType()),
+ $author,
+ pht('Version %s', $c->getVersion())))
+ ->addAttribute(pht('%s %s',
+ phabricator_date($c->getDateCreated(), $user),
+ phabricator_time($c->getDateCreated(), $user)));
+
+ if ($c->getDescription()) {
+ $item->addAttribute($c->getDescription());
+ }
+
+ if ($first == true) {
+ $item->setBarColor('green');
+ $first = false;
+ } else {
+ $item->setBarColor('red');
+ }
+
+ $list->addItem($item);
}
-
- $table = new AphrontTableView($rows);
- $table->setHeaders(
- array(
- pht('Date'),
- pht('Time'),
- pht('Version'),
- pht('Author'),
- pht('Description'),
- ));
- $table->setColumnClasses(
- array(
- '',
- 'right',
- 'pri',
- '',
- 'wide',
- ));
-
- return $table;
+ return $list;
}
}
diff --git a/webroot/rsrc/css/application/phriction/phriction-document-css.css b/webroot/rsrc/css/application/phriction/phriction-document-css.css
index c0dd596e49..97206b45eb 100644
--- a/webroot/rsrc/css/application/phriction/phriction-document-css.css
+++ b/webroot/rsrc/css/application/phriction/phriction-document-css.css
@@ -64,11 +64,8 @@
font-size: 11px;
}
-
.phriction-document-history-diff {
- margin: 0 0 0 2em;
- padding-bottom: 2em;
- max-width: 1162px;
+ padding: 0 2em 2em;
}
.phriction-revert-table {