Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14600520
D15687.id37861.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
8 KB
Referenced Files
None
Subscribers
None
D15687.id37861.diff
View Options
diff --git a/src/applications/project/controller/PhabricatorProjectMembersViewController.php b/src/applications/project/controller/PhabricatorProjectMembersViewController.php
--- a/src/applications/project/controller/PhabricatorProjectMembersViewController.php
+++ b/src/applications/project/controller/PhabricatorProjectMembersViewController.php
@@ -22,21 +22,23 @@
$title = pht('Members and Watchers');
$properties = $this->buildProperties($project);
- $actions = $this->buildActions($project);
- $properties->setActionList($actions);
+ $curtain = $this->buildCurtainView($project);
$object_box = id(new PHUIObjectBoxView())
- ->setHeaderText($title)
+ ->setHeaderText(pht('Details'))
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->addPropertyList($properties);
$member_list = id(new PhabricatorProjectMemberListView())
->setUser($viewer)
->setProject($project)
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setUserPHIDs($project->getMemberPHIDs());
$watcher_list = id(new PhabricatorProjectWatcherListView())
->setUser($viewer)
->setProject($project)
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setUserPHIDs($project->getWatcherPHIDs());
$nav = $this->getProfileMenu();
@@ -44,17 +46,27 @@
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Members'));
+ $crumbs->setBorder(true);
+
+ $header = id(new PHUIHeaderView())
+ ->setHeader($title)
+ ->setHeaderIcon('fa-group');
+
+ $view = id(new PHUITwoColumnView())
+ ->setHeader($header)
+ ->setCurtain($curtain)
+ ->setMainColumn(array(
+ $object_box,
+ $member_list,
+ $watcher_list,
+ ));
+
return $this->newPage()
->setNavigation($nav)
->setCrumbs($crumbs)
- ->setTitle(array($project->getDisplayName(), $title))
- ->appendChild(
- array(
- $object_box,
- $member_list,
- $watcher_list,
- ));
+ ->setTitle(array($project->getName(), $title))
+ ->appendChild($view);
}
private function buildProperties(PhabricatorProject $project) {
@@ -156,12 +168,11 @@
return $view;
}
- private function buildActions(PhabricatorProject $project) {
+ private function buildCurtainView(PhabricatorProject $project) {
$viewer = $this->getViewer();
$id = $project->getID();
- $view = id(new PhabricatorActionListView())
- ->setUser($viewer);
+ $curtain = $this->newCurtainView($project);
$is_locked = $project->getIsMembershipLocked();
@@ -182,7 +193,7 @@
$viewer_phid = $viewer->getPHID();
if (!$project->isUserMember($viewer_phid)) {
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setHref('/project/update/'.$project->getID().'/join/')
->setIcon('fa-plus')
@@ -190,7 +201,7 @@
->setWorkflow(true)
->setName(pht('Join Project')));
} else {
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setHref('/project/update/'.$project->getID().'/leave/')
->setIcon('fa-times')
@@ -200,14 +211,14 @@
}
if (!$project->isUserWatcher($viewer->getPHID())) {
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setWorkflow(true)
->setHref('/project/watch/'.$project->getID().'/')
->setIcon('fa-eye')
->setName(pht('Watch Project')));
} else {
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setWorkflow(true)
->setHref('/project/unwatch/'.$project->getID().'/')
@@ -224,7 +235,7 @@
$silence_text = pht('Disable Mail');
}
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setName($silence_text)
->setIcon('fa-envelope-o')
@@ -234,7 +245,7 @@
$can_add = $can_edit && $supports_edit;
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setName(pht('Add Members'))
->setIcon('fa-user-plus')
@@ -253,7 +264,7 @@
$lock_icon = 'fa-lock';
}
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setName($lock_name)
->setIcon($lock_icon)
@@ -261,7 +272,7 @@
->setDisabled(!$can_lock)
->setWorkflow(true));
- return $view;
+ return $curtain;
}
private function isProjectSilenced(PhabricatorProject $project) {
diff --git a/src/applications/project/controller/PhabricatorProjectSubprojectsController.php b/src/applications/project/controller/PhabricatorProjectSubprojectsController.php
--- a/src/applications/project/controller/PhabricatorProjectSubprojectsController.php
+++ b/src/applications/project/controller/PhabricatorProjectSubprojectsController.php
@@ -52,6 +52,7 @@
if ($milestones) {
$milestone_list = id(new PHUIObjectBoxView())
->setHeaderText(pht('Milestones'))
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setObjectList(
id(new PhabricatorProjectListView())
->setUser($viewer)
@@ -64,6 +65,7 @@
if ($subprojects) {
$subproject_list = id(new PHUIObjectBoxView())
->setHeaderText(pht('Subprojects'))
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setObjectList(
id(new PhabricatorProjectListView())
->setUser($viewer)
@@ -78,15 +80,15 @@
$milestones,
$subprojects);
- $action_list = $this->buildActionList(
+ $curtain = $this->buildCurtainView(
$project,
$milestones,
$subprojects);
- $property_list->setActionList($action_list);
- $header_box = id(new PHUIObjectBoxView())
- ->setHeaderText(pht('Subprojects and Milestones'))
+ $details = id(new PHUIObjectBoxView())
+ ->setHeaderText(pht('Details'))
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->addPropertyList($property_list);
$nav = $this->getProfileMenu();
@@ -94,17 +96,26 @@
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Subprojects'));
+ $crumbs->setBorder(true);
+
+ $header = id(new PHUIHeaderView())
+ ->setHeader(pht('Subprojects and Milestones'))
+ ->setHeaderIcon('fa-sitemap');
+
+ $view = id(new PHUITwoColumnView())
+ ->setHeader($header)
+ ->setCurtain($curtain)
+ ->setMainColumn(array(
+ $details,
+ $milestone_list,
+ $subproject_list,
+ ));
return $this->newPage()
->setNavigation($nav)
->setCrumbs($crumbs)
->setTitle(array($project->getName(), pht('Subprojects')))
- ->appendChild(
- array(
- $header_box,
- $milestone_list,
- $subproject_list,
- ));
+ ->appendChild($view);
}
private function buildPropertyList(
@@ -174,7 +185,7 @@
return $view;
}
- private function buildActionList(
+ private function buildCurtainView(
PhabricatorProject $project,
array $milestones,
array $subprojects) {
@@ -192,8 +203,7 @@
$allows_milestones = $project->supportsMilestones();
$allows_subprojects = $project->supportsSubprojects();
- $view = id(new PhabricatorActionListView())
- ->setUser($viewer);
+ $curtain = $this->newCurtainView($project);
if ($allows_milestones && $milestones) {
$milestone_text = pht('Create Next Milestone');
@@ -204,7 +214,7 @@
$can_milestone = ($can_create && $can_edit && $allows_milestones);
$milestone_href = "/project/edit/?milestone={$id}";
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setName($milestone_text)
->setIcon('fa-plus')
@@ -226,7 +236,7 @@
$subproject_workflow = !$can_subproject;
}
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setName(pht('Create Subproject'))
->setIcon('fa-plus')
@@ -234,7 +244,7 @@
->setDisabled($subproject_disabled)
->setWorkflow($subproject_workflow));
- return $view;
+ return $curtain;
}
private function renderStatus($icon, $target, $note) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 9, 11:46 PM (9 h, 42 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6980766
Default Alt Text
D15687.id37861.diff (8 KB)
Attached To
Mode
D15687: Convert Project Pages to new UI
Attached
Detach File
Event Timeline
Log In to Comment