mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +01:00
Have DifferentialRevisionList return an ObjectBox if header is set
Summary: Moving towards a consisent 'if header, show in object box' style around Phabricator. Test Plan: Grep for uses of RevisionList and make sure double boxes arent set, browse Differential, various searches, a revision, and a commit. {F282113} {F282114} Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11651
This commit is contained in:
parent
f96b258302
commit
468985c827
5 changed files with 19 additions and 10 deletions
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
return array(
|
return array(
|
||||||
'names' => array(
|
'names' => array(
|
||||||
'core.pkg.css' => '8be366b7',
|
'core.pkg.css' => 'adb53fe7',
|
||||||
'core.pkg.js' => '65e04767',
|
'core.pkg.js' => '65e04767',
|
||||||
'darkconsole.pkg.js' => '8ab24e01',
|
'darkconsole.pkg.js' => '8ab24e01',
|
||||||
'differential.pkg.css' => '8af45893',
|
'differential.pkg.css' => '8af45893',
|
||||||
|
@ -137,7 +137,7 @@ return array(
|
||||||
'rsrc/css/phui/phui-info-panel.css' => '27ea50a1',
|
'rsrc/css/phui/phui-info-panel.css' => '27ea50a1',
|
||||||
'rsrc/css/phui/phui-list.css' => '53deb25c',
|
'rsrc/css/phui/phui-list.css' => '53deb25c',
|
||||||
'rsrc/css/phui/phui-object-box.css' => 'b8b7fd78',
|
'rsrc/css/phui/phui-object-box.css' => 'b8b7fd78',
|
||||||
'rsrc/css/phui/phui-object-item-list-view.css' => '2670a4a9',
|
'rsrc/css/phui/phui-object-item-list-view.css' => 'ace03f3e',
|
||||||
'rsrc/css/phui/phui-pinboard-view.css' => '3dd4a269',
|
'rsrc/css/phui/phui-pinboard-view.css' => '3dd4a269',
|
||||||
'rsrc/css/phui/phui-property-list-view.css' => '51480060',
|
'rsrc/css/phui/phui-property-list-view.css' => '51480060',
|
||||||
'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b',
|
'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b',
|
||||||
|
@ -785,7 +785,7 @@ return array(
|
||||||
'phui-info-panel-css' => '27ea50a1',
|
'phui-info-panel-css' => '27ea50a1',
|
||||||
'phui-list-view-css' => '53deb25c',
|
'phui-list-view-css' => '53deb25c',
|
||||||
'phui-object-box-css' => 'b8b7fd78',
|
'phui-object-box-css' => 'b8b7fd78',
|
||||||
'phui-object-item-list-view-css' => '2670a4a9',
|
'phui-object-item-list-view-css' => 'ace03f3e',
|
||||||
'phui-pinboard-view-css' => '3dd4a269',
|
'phui-pinboard-view-css' => '3dd4a269',
|
||||||
'phui-property-list-view-css' => '51480060',
|
'phui-property-list-view-css' => '51480060',
|
||||||
'phui-remarkup-preview-css' => '19ad512b',
|
'phui-remarkup-preview-css' => '19ad512b',
|
||||||
|
|
|
@ -778,6 +778,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||||
$user = $this->getRequest()->getUser();
|
$user = $this->getRequest()->getUser();
|
||||||
|
|
||||||
$view = id(new DifferentialRevisionListView())
|
$view = id(new DifferentialRevisionListView())
|
||||||
|
->setHeader(pht('Open Revisions Affecting These Files'))
|
||||||
->setRevisions($revisions)
|
->setRevisions($revisions)
|
||||||
->setUser($user);
|
->setUser($user);
|
||||||
|
|
||||||
|
@ -785,9 +786,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||||
$handles = $this->loadViewerHandles($phids);
|
$handles = $this->loadViewerHandles($phids);
|
||||||
$view->setHandles($handles);
|
$view->setHandles($handles);
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return $view;
|
||||||
->setHeaderText(pht('Open Revisions Affecting These Files'))
|
|
||||||
->appendChild($view);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -179,9 +179,16 @@ final class DifferentialRevisionListView extends AphrontView {
|
||||||
$list->addItem($item);
|
$list->addItem($item);
|
||||||
}
|
}
|
||||||
|
|
||||||
$list->setHeader($this->header);
|
|
||||||
$list->setNoDataString($this->noDataString);
|
$list->setNoDataString($this->noDataString);
|
||||||
|
|
||||||
|
|
||||||
|
if ($this->header) {
|
||||||
|
$list->setFlush(true);
|
||||||
|
$list = id(new PHUIObjectBoxView())
|
||||||
|
->setHeaderText($this->header)
|
||||||
|
->appendChild($list);
|
||||||
|
}
|
||||||
|
|
||||||
return $list;
|
return $list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -208,6 +208,7 @@ abstract class DiffusionBrowseController extends DiffusionController {
|
||||||
}
|
}
|
||||||
|
|
||||||
$view = id(new DifferentialRevisionListView())
|
$view = id(new DifferentialRevisionListView())
|
||||||
|
->setHeader(pht('Pending Differential Revisions'))
|
||||||
->setRevisions($revisions)
|
->setRevisions($revisions)
|
||||||
->setUser($user);
|
->setUser($user);
|
||||||
|
|
||||||
|
@ -215,9 +216,7 @@ abstract class DiffusionBrowseController extends DiffusionController {
|
||||||
$handles = $this->loadViewerHandles($phids);
|
$handles = $this->loadViewerHandles($phids);
|
||||||
$view->setHandles($handles);
|
$view->setHandles($handles);
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return $view;
|
||||||
->setHeaderText(pht('Pending Differential Revisions'))
|
|
||||||
->appendChild($view);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,6 +61,10 @@ ul.phui-object-item-list-view {
|
||||||
margin: 0 0 4px 0;
|
margin: 0 0 4px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.phui-object-box .phui-object-list-flush .phui-object-item {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.phui-object-item-name {
|
.phui-object-item-name {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
padding: 8px 8px 0;
|
padding: 8px 8px 0;
|
||||||
|
|
Loading…
Reference in a new issue