1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16:52:41 +01:00

Clean up Project Board Manage / Column Manage pages

Summary: Slightly nicer, more consistent UI. Also removed "Column History" from dropdowns as this is available on the general board manage page.

Test Plan: Review Board and Column management pages.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17881
This commit is contained in:
Chad Little 2017-05-14 18:58:33 -07:00
parent 7f54f79fd1
commit 6fa91caf32
4 changed files with 30 additions and 56 deletions

View file

@ -40,8 +40,12 @@ final class PhabricatorProjectBoardManageController
$nav = $this->getProfileMenu();
$columns_list = $this->buildColumnsList($board, $columns);
require_celerity_resource('project-view-css');
$view = id(new PHUITwoColumnView())
->setHeader($header)
->addClass('project-view-home')
->addClass('project-view-people-home')
->setFooter($columns_list);
$title = array(
@ -78,7 +82,6 @@ final class PhabricatorProjectBoardManageController
$header = id(new PHUIHeaderView())
->setHeader(pht('Workboard: %s', $board->getDisplayName()))
->setUser($viewer)
->setPolicyObject($board)
->setProfileHeader(true)
->addActionLink($button);

View file

@ -879,12 +879,6 @@ final class PhabricatorProjectBoardViewController
->setWorkflow(true);
}
$details_uri = 'board/'.$this->id.'/column/'.$column->getID().'/';
$column_items[] = id(new PhabricatorActionView())
->setName(pht('Column History'))
->setIcon('fa-columns')
->setHref($this->getApplicationURI($details_uri));
$column_menu = id(new PhabricatorActionListView())
->setUser($viewer);
foreach ($column_items as $item) {

View file

@ -44,36 +44,39 @@ final class PhabricatorProjectColumnDetailController
$title = $column->getDisplayName();
$header = $this->buildHeaderView($column);
$actions = $this->buildActionView($column);
$properties = $this->buildPropertyView($column, $actions);
$properties = $this->buildPropertyView($column);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Workboard'), "/project/board/{$project_id}/");
$crumbs->addTextCrumb(pht('Column: %s', $title));
$box = id(new PHUIObjectBoxView())
->setHeader($header)
->addPropertyList($properties);
$crumbs->setBorder(true);
$nav = $this->getProfileMenu();
require_celerity_resource('project-view-css');
$view = id(new PHUITwoColumnView())
->setHeader($header)
->addClass('project-view-home')
->addClass('project-view-people-home')
->setMainColumn(array(
$properties,
$timeline,
));
return $this->newPage()
->setTitle($title)
->setNavigation($nav)
->setCrumbs($crumbs)
->appendChild(
array(
$box,
$timeline,
));
->appendChild($view);
}
private function buildHeaderView(PhabricatorProjectColumn $column) {
$viewer = $this->getRequest()->getUser();
$viewer = $this->getViewer();
$header = id(new PHUIHeaderView())
->setHeader(pht('Column: %s', $column->getDisplayName()))
->setUser($viewer)
->setHeader($column->getDisplayName());
->setProfileHeader(true);
if ($column->isHidden()) {
$header->setStatus('fa-ban', 'dark', pht('Hidden'));
@ -82,41 +85,13 @@ final class PhabricatorProjectColumnDetailController
return $header;
}
private function buildActionView(PhabricatorProjectColumn $column) {
$viewer = $this->getRequest()->getUser();
$id = $column->getID();
$project_id = $this->getProject()->getID();
$base_uri = '/board/'.$project_id.'/';
$actions = id(new PhabricatorActionListView())
->setUser($viewer);
$can_edit = PhabricatorPolicyFilter::hasCapability(
$viewer,
$column,
PhabricatorPolicyCapability::CAN_EDIT);
$actions->addAction(
id(new PhabricatorActionView())
->setName(pht('Edit Column'))
->setIcon('fa-pencil')
->setHref($this->getApplicationURI($base_uri.'edit/'.$id.'/'))
->setDisabled(!$can_edit)
->setWorkflow(true));
return $actions;
}
private function buildPropertyView(
PhabricatorProjectColumn $column,
PhabricatorActionListView $actions) {
$viewer = $this->getRequest()->getUser();
PhabricatorProjectColumn $column) {
$viewer = $this->getViewer();
$properties = id(new PHUIPropertyListView())
->setUser($viewer)
->setObject($column)
->setActionList($actions);
->setObject($column);
$limit = $column->getPointLimit();
if ($limit === null) {
@ -126,7 +101,12 @@ final class PhabricatorProjectColumnDetailController
}
$properties->addProperty(pht('Point Limit'), $limit_text);
return $properties;
$box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Details'))
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->appendChild($properties);
return $box;
}
}

View file

@ -113,10 +113,7 @@ final class PhabricatorProjectProfileController
->setCrumbs($crumbs)
->setTitle($project->getDisplayName())
->setPageObjectPHIDs(array($project->getPHID()))
->appendChild(
array(
$home,
));
->appendChild($home);
}
private function buildPropertyListView(