mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-23 15:22:41 +01:00
Remove ManiphestTransactionListView
Summary: Ref T2217. No remaining callsites. Test Plan: `grep` Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2217 Differential Revision: https://secure.phabricator.com/D7073
This commit is contained in:
parent
e27a83960c
commit
1881ac8ad8
2 changed files with 0 additions and 113 deletions
|
@ -736,7 +736,6 @@ phutil_register_library_map(array(
|
||||||
'ManiphestTransactionComment' => 'applications/maniphest/storage/ManiphestTransactionComment.php',
|
'ManiphestTransactionComment' => 'applications/maniphest/storage/ManiphestTransactionComment.php',
|
||||||
'ManiphestTransactionDetailView' => 'applications/maniphest/view/ManiphestTransactionDetailView.php',
|
'ManiphestTransactionDetailView' => 'applications/maniphest/view/ManiphestTransactionDetailView.php',
|
||||||
'ManiphestTransactionEditor' => 'applications/maniphest/editor/ManiphestTransactionEditor.php',
|
'ManiphestTransactionEditor' => 'applications/maniphest/editor/ManiphestTransactionEditor.php',
|
||||||
'ManiphestTransactionListView' => 'applications/maniphest/view/ManiphestTransactionListView.php',
|
|
||||||
'ManiphestTransactionPreviewController' => 'applications/maniphest/controller/ManiphestTransactionPreviewController.php',
|
'ManiphestTransactionPreviewController' => 'applications/maniphest/controller/ManiphestTransactionPreviewController.php',
|
||||||
'ManiphestTransactionPro' => 'applications/maniphest/storage/ManiphestTransactionPro.php',
|
'ManiphestTransactionPro' => 'applications/maniphest/storage/ManiphestTransactionPro.php',
|
||||||
'ManiphestTransactionQuery' => 'applications/maniphest/query/ManiphestTransactionQuery.php',
|
'ManiphestTransactionQuery' => 'applications/maniphest/query/ManiphestTransactionQuery.php',
|
||||||
|
@ -2829,7 +2828,6 @@ phutil_register_library_map(array(
|
||||||
'ManiphestTransactionComment' => 'PhabricatorApplicationTransactionComment',
|
'ManiphestTransactionComment' => 'PhabricatorApplicationTransactionComment',
|
||||||
'ManiphestTransactionDetailView' => 'ManiphestView',
|
'ManiphestTransactionDetailView' => 'ManiphestView',
|
||||||
'ManiphestTransactionEditor' => 'PhabricatorEditor',
|
'ManiphestTransactionEditor' => 'PhabricatorEditor',
|
||||||
'ManiphestTransactionListView' => 'ManiphestView',
|
|
||||||
'ManiphestTransactionPreviewController' => 'ManiphestController',
|
'ManiphestTransactionPreviewController' => 'ManiphestController',
|
||||||
'ManiphestTransactionPro' => 'PhabricatorApplicationTransaction',
|
'ManiphestTransactionPro' => 'PhabricatorApplicationTransaction',
|
||||||
'ManiphestTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
'ManiphestTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
||||||
|
|
|
@ -1,111 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @group maniphest
|
|
||||||
*/
|
|
||||||
final class ManiphestTransactionListView extends ManiphestView {
|
|
||||||
|
|
||||||
private $transactions;
|
|
||||||
private $handles;
|
|
||||||
private $markupEngine;
|
|
||||||
private $preview;
|
|
||||||
private $auxiliaryFields;
|
|
||||||
|
|
||||||
public function setTransactions(array $transactions) {
|
|
||||||
assert_instances_of($transactions, 'ManiphestTransaction');
|
|
||||||
$this->transactions = $transactions;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setHandles(array $handles) {
|
|
||||||
assert_instances_of($handles, 'PhabricatorObjectHandle');
|
|
||||||
$this->handles = $handles;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setMarkupEngine(PhabricatorMarkupEngine $engine) {
|
|
||||||
$this->markupEngine = $engine;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setPreview($preview) {
|
|
||||||
$this->preview = $preview;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setAuxiliaryFields(array $fields) {
|
|
||||||
assert_instances_of($fields, 'ManiphestCustomField');
|
|
||||||
$this->auxiliaryFields = $fields;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getAuxiliaryFields() {
|
|
||||||
if (empty($this->auxiliaryFields)) {
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
return $this->auxiliaryFields;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function render() {
|
|
||||||
|
|
||||||
$views = array();
|
|
||||||
|
|
||||||
|
|
||||||
$last = null;
|
|
||||||
$group = array();
|
|
||||||
$groups = array();
|
|
||||||
$has_description_transaction = false;
|
|
||||||
foreach ($this->transactions as $transaction) {
|
|
||||||
if ($transaction->getTransactionType() ==
|
|
||||||
ManiphestTransactionType::TYPE_DESCRIPTION) {
|
|
||||||
$has_description_transaction = true;
|
|
||||||
}
|
|
||||||
if ($last === null) {
|
|
||||||
$last = $transaction;
|
|
||||||
$group[] = $transaction;
|
|
||||||
continue;
|
|
||||||
} else if ($last->canGroupWith($transaction)) {
|
|
||||||
$group[] = $transaction;
|
|
||||||
if ($transaction->hasComments()) {
|
|
||||||
$last = $transaction;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$groups[] = $group;
|
|
||||||
$last = $transaction;
|
|
||||||
$group = array($transaction);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($group) {
|
|
||||||
$groups[] = $group;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($has_description_transaction) {
|
|
||||||
require_celerity_resource('differential-changeset-view-css');
|
|
||||||
require_celerity_resource('syntax-highlighting-css');
|
|
||||||
$whitespace_mode = DifferentialChangesetParser::WHITESPACE_SHOW_ALL;
|
|
||||||
Javelin::initBehavior('differential-show-more', array(
|
|
||||||
'uri' => '/maniphest/task/descriptionchange/',
|
|
||||||
'whitespace' => $whitespace_mode,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
$sequence = 1;
|
|
||||||
foreach ($groups as $group) {
|
|
||||||
$view = new ManiphestTransactionDetailView();
|
|
||||||
$view->setUser($this->user);
|
|
||||||
$view->setAuxiliaryFields($this->getAuxiliaryFields());
|
|
||||||
$view->setTransactionGroup($group);
|
|
||||||
$view->setHandles($this->handles);
|
|
||||||
$view->setMarkupEngine($this->markupEngine);
|
|
||||||
$view->setPreview($this->preview);
|
|
||||||
$view->setCommentNumber($sequence++);
|
|
||||||
$views[] = $view->render();
|
|
||||||
}
|
|
||||||
|
|
||||||
return phutil_tag(
|
|
||||||
'div',
|
|
||||||
array('class' => 'maniphest-transaction-list-view'),
|
|
||||||
$views);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in a new issue