1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-08 22:01:03 +01:00

Normalize headers and actions in Project sub pages

Summary: Run through all the pages in projects and make sure they all feel similar. Adds back curtain on board manage page, even though it is sad for only having a single action.

Test Plan: Test all pages on a project for consistency in UI.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17909
This commit is contained in:
Chad Little 2017-05-16 09:53:38 -07:00
parent 8052ab84bf
commit fdf001739c
2 changed files with 26 additions and 18 deletions

View file

@ -31,6 +31,7 @@ final class PhabricatorProjectBoardManageController
$board_id = $board->getID();
$header = $this->buildHeaderView($board);
$curtain = $this->buildCurtainView($board);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Workboard'), "/project/board/{$board_id}/");
@ -46,7 +47,8 @@ final class PhabricatorProjectBoardManageController
->setHeader($header)
->addClass('project-view-home')
->addClass('project-view-people-home')
->setFooter($columns_list);
->setCurtain($curtain)
->setMainColumn($columns_list);
$title = array(
pht('Manage Workboard'),
@ -63,29 +65,35 @@ final class PhabricatorProjectBoardManageController
private function buildHeaderView(PhabricatorProject $board) {
$viewer = $this->getViewer();
$header = id(new PHUIHeaderView())
->setHeader(pht('Workboard: %s', $board->getDisplayName()))
->setUser($viewer);
return $header;
}
private function buildCurtainView(PhabricatorProject $board) {
$viewer = $this->getViewer();
$id = $board->getID();
$curtain = $this->newCurtainView();
$can_edit = PhabricatorPolicyFilter::hasCapability(
$viewer,
$board,
PhabricatorPolicyCapability::CAN_EDIT);
$id = $board->getID();
$disable_uri = $this->getApplicationURI("board/{$id}/disable/");
$button = id(new PHUIButtonView())
->setTag('a')
->setIcon('fa-ban')
->setText(pht('Disable Board'))
->setHref($disable_uri)
->setDisabled(!$can_edit)
->setWorkflow(true);
$curtain->addAction(
id(new PhabricatorActionView())
->setIcon('fa-ban')
->setName(pht('Disable Workboard'))
->setHref($disable_uri)
->setDisabled(!$can_edit)
->setWorkflow(true));
$header = id(new PHUIHeaderView())
->setHeader(pht('Workboard: %s', $board->getDisplayName()))
->setUser($viewer)
->setProfileHeader(true)
->addActionLink($button);
return $header;
return $curtain;
}
private function buildColumnsList(
@ -126,6 +134,7 @@ final class PhabricatorProjectBoardManageController
return id(new PHUIObjectBoxView())
->setHeaderText(pht('Columns'))
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setObjectList($view);
}

View file

@ -75,8 +75,7 @@ final class PhabricatorProjectColumnDetailController
$header = id(new PHUIHeaderView())
->setHeader(pht('Column: %s', $column->getDisplayName()))
->setUser($viewer)
->setProfileHeader(true);
->setUser($viewer);
if ($column->isHidden()) {
$header->setStatus('fa-ban', 'dark', pht('Hidden'));