mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 04:50:55 +01:00
Provide more structure to PHUIObjectBoxView
Summary: Three changes here. - Add `setActionList()`, and use that to set the action list. - Add `setPropertyList()`, and use that to set the property list. These will let us add some apropriate CSS so we can fix the border issue, and get rid of a bunch of goofy `.x + .y` selectors. - Replace `addContent()` with `appendChild()`. This is just a consistency thing; `AphrontView` already provides `appendChild()`, and `addContent()` did the same thing. Test Plan: - Viewed "All Config". - Viewed a countdown. - Viewed a revision (add comment, change list, table of contents, comment, local commits, open revisions affecting these files, update history). - Viewed Diffusion (browse, change, history, repository, lint). - Viewed Drydock (resource, lease). - Viewed Files. - Viewed Herald. - Viewed Legalpad. - Viewed macro (edit, edit audio, view). - Viewed Maniphest. - Viewed Applications. - Viewed Paste. - Viewed People. - Viewed Phulux. - Viewed Pholio. - Viewed Phame (blog, post). - Viewed Phortune (account, product). - Viewed Ponder (questions, answers, comments). - Viewed Releeph. - Viewed Projects. - Viewed Slowvote. NOTE: Images in Files aren't on a black background anymore -- I assume that's on purpose? NOTE: Some jankiness in Phortune, I'll clean that up when I get back to it. Not related to this diff. Reviewers: chad Reviewed By: chad CC: aran Differential Revision: https://secure.phabricator.com/D7174
This commit is contained in:
parent
6a74ad724b
commit
b592630d72
41 changed files with 106 additions and 101 deletions
|
@ -74,7 +74,7 @@ final class PhabricatorConfigAllController
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText(pht('Current Settings'))
|
->setHeaderText(pht('Current Settings'))
|
||||||
->addContent($version_property_list);
|
->setPropertyList($version_property_list);
|
||||||
|
|
||||||
$phabricator_root = dirname(phutil_get_library_root('phabricator'));
|
$phabricator_root = dirname(phutil_get_library_root('phabricator'));
|
||||||
$version_path = $phabricator_root.'/conf/local/VERSION';
|
$version_path = $phabricator_root.'/conf/local/VERSION';
|
||||||
|
|
|
@ -49,8 +49,8 @@ final class PhabricatorCountdownViewController
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
$content = array(
|
$content = array(
|
||||||
$crumbs,
|
$crumbs,
|
||||||
|
|
|
@ -872,7 +872,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeaderText(pht('Open Revisions Affecting These Files'))
|
->setHeaderText(pht('Open Revisions Affecting These Files'))
|
||||||
->addContent($view);
|
->appendChild($view);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -195,9 +195,9 @@ final class DifferentialAddCommentView extends AphrontView {
|
||||||
|
|
||||||
$comment_box = id(new PHUIObjectBoxView())
|
$comment_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($anchor)
|
->appendChild($anchor)
|
||||||
->addContent($warn)
|
->appendChild($warn)
|
||||||
->addContent($form);
|
->appendChild($form);
|
||||||
|
|
||||||
return array($comment_box, $preview);
|
return array($comment_box, $preview);
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,7 +210,7 @@ final class DifferentialChangesetListView extends AphrontView {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($content);
|
->appendChild($content);
|
||||||
|
|
||||||
return $object_box;
|
return $object_box;
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,7 +239,7 @@ final class DifferentialDiffTableOfContentsView extends AphrontView {
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeaderText(pht('Table of Contents'))
|
->setHeaderText(pht('Table of Contents'))
|
||||||
->addContent($content);
|
->appendChild($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderRename($display_file, $other_file, $arrow) {
|
private function renderRename($display_file, $other_file, $arrow) {
|
||||||
|
|
|
@ -137,8 +137,7 @@ final class DifferentialLocalCommitsView extends AphrontView {
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeaderText(pht('Local Commits'))
|
->setHeaderText(pht('Local Commits'))
|
||||||
->addContent($content);
|
->appendChild($content);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function formatCommit($commit) {
|
private static function formatCommit($commit) {
|
||||||
|
|
|
@ -113,8 +113,8 @@ final class DifferentialRevisionDetailView extends AphrontView {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
return $object_box;
|
return $object_box;
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,7 +220,7 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeaderText(pht('Revision Update History'))
|
->setHeaderText(pht('Revision Update History'))
|
||||||
->addContent($content);
|
->appendChild($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
const STAR_NONE = 'none';
|
const STAR_NONE = 'none';
|
||||||
|
|
|
@ -24,8 +24,8 @@ final class DiffusionBrowseDirectoryController
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($this->buildHeaderView($drequest))
|
->setHeader($this->buildHeaderView($drequest))
|
||||||
->addContent($this->buildActionView($drequest))
|
->setActionList($this->buildActionView($drequest))
|
||||||
->addContent($this->buildPropertyView($drequest));
|
->setPropertyList($this->buildPropertyView($drequest));
|
||||||
|
|
||||||
$content[] = $object_box;
|
$content[] = $object_box;
|
||||||
$content[] = $this->renderSearchForm($collapsed = true);
|
$content[] = $this->renderSearchForm($collapsed = true);
|
||||||
|
@ -77,7 +77,7 @@ final class DiffusionBrowseDirectoryController
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText(pht('README'))
|
->setHeaderText(pht('README'))
|
||||||
->addContent($box);
|
->appendChild($box);
|
||||||
|
|
||||||
$content[] = $object_box;
|
$content[] = $object_box;
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,8 +100,8 @@ final class DiffusionBrowseFileController extends DiffusionBrowseController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($this->buildHeaderView($drequest))
|
->setHeader($this->buildHeaderView($drequest))
|
||||||
->addContent($this->buildActionView($drequest))
|
->setActionList($this->buildActionView($drequest))
|
||||||
->addContent($this->buildPropertyView($drequest));
|
->setPropertyList($this->buildPropertyView($drequest));
|
||||||
|
|
||||||
// Render the page.
|
// Render the page.
|
||||||
$content = array();
|
$content = array();
|
||||||
|
|
|
@ -7,8 +7,8 @@ final class DiffusionBrowseSearchController extends DiffusionBrowseController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($this->buildHeaderView($drequest))
|
->setHeader($this->buildHeaderView($drequest))
|
||||||
->addContent($this->buildActionView($drequest))
|
->setActionList($this->buildActionView($drequest))
|
||||||
->addContent($this->buildPropertyView($drequest));
|
->setPropertyList($this->buildPropertyView($drequest));
|
||||||
|
|
||||||
$content = array();
|
$content = array();
|
||||||
|
|
||||||
|
|
|
@ -84,8 +84,8 @@ final class DiffusionChangeController extends DiffusionController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -140,8 +140,8 @@ final class DiffusionCommitController extends DiffusionController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($headsup_view)
|
->setHeader($headsup_view)
|
||||||
->addContent($headsup_actions)
|
->setActionList($headsup_actions)
|
||||||
->addContent($property_list);
|
->setPropertyList($property_list);
|
||||||
|
|
||||||
$content[] = $object_box;
|
$content[] = $object_box;
|
||||||
}
|
}
|
||||||
|
@ -743,7 +743,7 @@ final class DiffusionCommitController extends DiffusionController {
|
||||||
|
|
||||||
$comment_box = id(new PHUIObjectBoxView())
|
$comment_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($form);
|
->appendChild($form);
|
||||||
|
|
||||||
return phutil_tag(
|
return phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
|
|
|
@ -74,8 +74,8 @@ final class DiffusionHistoryController extends DiffusionController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
$crumbs = $this->buildCrumbs(
|
$crumbs = $this->buildCrumbs(
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -168,8 +168,8 @@ final class DiffusionLintController extends DiffusionController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
} else {
|
} else {
|
||||||
$object_box = null;
|
$object_box = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,8 +176,8 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($view);
|
->setPropertyList($view);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,8 @@ final class DrydockLeaseViewController extends DrydockController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -58,8 +58,8 @@ final class DrydockResourceViewController extends DrydockController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -51,8 +51,8 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
|
@ -113,7 +113,7 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
|
||||||
$comment_box = id(new PHUIObjectBoxView())
|
$comment_box = id(new PHUIObjectBoxView())
|
||||||
->setFlush(true)
|
->setFlush(true)
|
||||||
->setHeader($add_comment_header)
|
->setHeader($add_comment_header)
|
||||||
->addContent($add_comment_form);
|
->appendChild($add_comment_form);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
$timeline,
|
$timeline,
|
||||||
|
|
|
@ -34,8 +34,8 @@ final class HeraldRuleViewController extends HeraldController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -88,8 +88,8 @@ final class LegalpadDocumentViewController extends LegalpadController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
$content = array(
|
$content = array(
|
||||||
$crumbs,
|
$crumbs,
|
||||||
|
@ -216,7 +216,7 @@ final class LegalpadDocumentViewController extends LegalpadController {
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setFlush(true)
|
->setFlush(true)
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($form);
|
->appendChild($form);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,13 +93,13 @@ final class PhabricatorMacroViewController
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
$comment_box = id(new PHUIObjectBoxView())
|
$comment_box = id(new PHUIObjectBoxView())
|
||||||
->setFlush(true)
|
->setFlush(true)
|
||||||
->setHeader($add_comment_header)
|
->setHeader($add_comment_header)
|
||||||
->addContent($add_comment_form);
|
->appendChild($add_comment_form);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -365,13 +365,13 @@ final class ManiphestTaskDetailController extends ManiphestController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
$comment_box = id(new PHUIObjectBoxView())
|
$comment_box = id(new PHUIObjectBoxView())
|
||||||
->setFlush(true)
|
->setFlush(true)
|
||||||
->setHeader($comment_header)
|
->setHeader($comment_header)
|
||||||
->addContent($comment_form);
|
->appendChild($comment_form);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -56,8 +56,8 @@ final class PhabricatorApplicationDetailViewController
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -71,8 +71,8 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
$source_code = $this->buildSourceCodeView(
|
$source_code = $this->buildSourceCodeView(
|
||||||
$paste,
|
$paste,
|
||||||
|
@ -139,7 +139,7 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController {
|
||||||
$comment_box = id(new PHUIObjectBoxView())
|
$comment_box = id(new PHUIObjectBoxView())
|
||||||
->setFlush(true)
|
->setFlush(true)
|
||||||
->setHeader($add_comment_header)
|
->setHeader($add_comment_header)
|
||||||
->addContent($add_comment_form);
|
->appendChild($add_comment_form);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -78,8 +78,8 @@ final class PhabricatorPeopleProfileController
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -65,8 +65,8 @@ final class PhameBlogViewController extends PhameController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
$nav->appendChild(
|
$nav->appendChild(
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -50,8 +50,8 @@ final class PhamePostViewController extends PhameController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
if ($post->isDraft()) {
|
if ($post->isDraft()) {
|
||||||
$object_box->appendChild(
|
$object_box->appendChild(
|
||||||
|
|
|
@ -76,8 +76,8 @@ final class PhluxViewController extends PhluxController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -105,8 +105,8 @@ final class PholioMockViewController extends PholioController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
$content = array(
|
$content = array(
|
||||||
$crumbs,
|
$crumbs,
|
||||||
|
@ -257,7 +257,7 @@ final class PholioMockViewController extends PholioController {
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setFlush(true)
|
->setFlush(true)
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($form);
|
->appendChild($form);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,8 +62,8 @@ final class PhortuneAccountViewController extends PhortuneController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -83,8 +83,8 @@ final class PhortuneProductViewController extends PhortuneController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -52,8 +52,8 @@ final class PonderQuestionViewController extends PonderController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs($this->buildSideNavView());
|
$crumbs = $this->buildApplicationCrumbs($this->buildSideNavView());
|
||||||
$crumbs->setActionList($actions);
|
$crumbs->setActionList($actions);
|
||||||
|
@ -214,7 +214,7 @@ final class PonderQuestionViewController extends PonderController {
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setFlush(true)
|
->setFlush(true)
|
||||||
->setHeaderText(pht('Question Comment'))
|
->setHeaderText(pht('Question Comment'))
|
||||||
->addContent($add_comment);
|
->appendChild($add_comment);
|
||||||
|
|
||||||
return $this->wrapComments(
|
return $this->wrapComments(
|
||||||
count($xactions),
|
count($xactions),
|
||||||
|
@ -269,8 +269,8 @@ final class PonderQuestionViewController extends PonderController {
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
$out[] = $object_box;
|
$out[] = $object_box;
|
||||||
$details = array();
|
$details = array();
|
||||||
|
@ -291,7 +291,7 @@ final class PonderQuestionViewController extends PonderController {
|
||||||
$comment_box = id(new PHUIObjectBoxView())
|
$comment_box = id(new PHUIObjectBoxView())
|
||||||
->setFlush(true)
|
->setFlush(true)
|
||||||
->setHeaderText(pht('Answer Comment'))
|
->setHeaderText(pht('Answer Comment'))
|
||||||
->addContent($form);
|
->appendChild($form);
|
||||||
|
|
||||||
$details[] = $comment_box;
|
$details[] = $comment_box;
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,6 @@ final class PonderAddAnswerView extends AphrontView {
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($form);
|
->appendChild($form);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,8 +74,8 @@ final class PhabricatorProjectProfileController
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
|
@ -182,7 +182,7 @@ final class PhabricatorProjectProfileController
|
||||||
|
|
||||||
$content = id(new PHUIObjectBoxView())
|
$content = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText(pht('Open Tasks'))
|
->setHeaderText(pht('Open Tasks'))
|
||||||
->addContent($list);
|
->appendChild($list);
|
||||||
|
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,9 +170,8 @@ final class ReleephBranchViewController extends ReleephProjectController
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,9 +238,8 @@ final class ReleephProjectViewController extends ReleephProjectController
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,8 +59,8 @@ final class PhabricatorSlowvotePollController
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->addContent($actions)
|
->setActionList($actions)
|
||||||
->addContent($properties);
|
->setPropertyList($properties);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
|
@ -181,7 +181,7 @@ final class PhabricatorSlowvotePollController
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setFlush(true)
|
->setFlush(true)
|
||||||
->setHeader($add_comment_header)
|
->setHeader($add_comment_header)
|
||||||
->addContent($add_comment_form);
|
->appendChild($add_comment_form);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,20 @@ final class PHUIObjectBoxView extends AphrontView {
|
||||||
private $formError = null;
|
private $formError = null;
|
||||||
private $form;
|
private $form;
|
||||||
private $validationException;
|
private $validationException;
|
||||||
private $content = array();
|
|
||||||
private $header;
|
private $header;
|
||||||
private $flush;
|
private $flush;
|
||||||
|
private $propertyList;
|
||||||
|
private $actionList;
|
||||||
|
|
||||||
|
public function setActionList(PhabricatorActionListView $action_list) {
|
||||||
|
$this->actionList = $action_list;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPropertyList(PhabricatorPropertyListView $property_list) {
|
||||||
|
$this->propertyList = $property_list;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function setHeaderText($text) {
|
public function setHeaderText($text) {
|
||||||
$this->headerText = $text;
|
$this->headerText = $text;
|
||||||
|
@ -30,11 +41,6 @@ final class PHUIObjectBoxView extends AphrontView {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addContent($content) {
|
|
||||||
$this->content[] = $content;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setFlush($flush) {
|
public function setFlush($flush) {
|
||||||
$this->flush = $flush;
|
$this->flush = $flush;
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -79,7 +85,9 @@ final class PHUIObjectBoxView extends AphrontView {
|
||||||
$this->formError,
|
$this->formError,
|
||||||
$exception_errors,
|
$exception_errors,
|
||||||
$this->form,
|
$this->form,
|
||||||
$this->content,
|
$this->actionList,
|
||||||
|
$this->propertyList,
|
||||||
|
$this->renderChildren(),
|
||||||
))
|
))
|
||||||
->setBorder(true)
|
->setBorder(true)
|
||||||
->addMargin(PHUI::MARGIN_LARGE_TOP)
|
->addMargin(PHUI::MARGIN_LARGE_TOP)
|
||||||
|
|
Loading…
Reference in a new issue