1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 11:30:55 +01:00

First cut of new Project Home

Summary:
First pass at a new Project Home page. This is starting to sprawl, so punting this up now before it gets too large.

 - Project homes now have "large header"
 - Custom Fields / Descriptions are in the main column
 - Feed is simpler visually
 - new "Background" option for PHUIObjectBoxView
 - move header buttons globally to "Grey" instead of "Simple"
 - New color and hover states for "Grey"
 - Transitions on Buttons haha
 - Edit Icon on Nav is now under "Manage" panel
 - New "Manage" Panel

TODO:
 - More testing of bad cases of Custom Fields
 - Members Page in flux, needs design
 - Um still not sure how to make Custom Field not show UI

Test Plan:
Lots of random Project page visits. Save project, watch project, edit project, etc.

{F1068191}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15097
This commit is contained in:
Chad Little 2016-01-23 16:02:29 -08:00
parent 9ecd82a993
commit b381265d92
22 changed files with 288 additions and 141 deletions

View file

@ -7,7 +7,7 @@
*/ */
return array( return array(
'names' => array( 'names' => array(
'core.pkg.css' => '4dd8bb4d', 'core.pkg.css' => '2ee00a33',
'core.pkg.js' => '573e6664', 'core.pkg.js' => '573e6664',
'darkconsole.pkg.js' => 'e7393ebb', 'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => '2de124c9', 'differential.pkg.css' => '2de124c9',
@ -93,6 +93,7 @@ return array(
'rsrc/css/application/policy/policy-transaction-detail.css' => '82100a43', 'rsrc/css/application/policy/policy-transaction-detail.css' => '82100a43',
'rsrc/css/application/policy/policy.css' => '957ea14c', 'rsrc/css/application/policy/policy.css' => '957ea14c',
'rsrc/css/application/ponder/ponder-view.css' => '7b0df4da', 'rsrc/css/application/ponder/ponder-view.css' => '7b0df4da',
'rsrc/css/application/project/project-view.css' => 'efd02445',
'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733', 'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733',
'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5', 'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5',
'rsrc/css/application/releeph/releeph-request-differential-create-dialog.css' => '8d8b92cd', 'rsrc/css/application/releeph/releeph-request-differential-create-dialog.css' => '8d8b92cd',
@ -122,8 +123,8 @@ return array(
'rsrc/css/phui/phui-action-panel.css' => '91c7b835', 'rsrc/css/phui/phui-action-panel.css' => '91c7b835',
'rsrc/css/phui/phui-badge.css' => 'f25c3476', 'rsrc/css/phui/phui-badge.css' => 'f25c3476',
'rsrc/css/phui/phui-big-info-view.css' => 'bd903741', 'rsrc/css/phui/phui-big-info-view.css' => 'bd903741',
'rsrc/css/phui/phui-box.css' => '10939564', 'rsrc/css/phui/phui-box.css' => 'fd269ed1',
'rsrc/css/phui/phui-button.css' => '16020a60', 'rsrc/css/phui/phui-button.css' => 'd6ac72db',
'rsrc/css/phui/phui-crumbs-view.css' => '414406b5', 'rsrc/css/phui/phui-crumbs-view.css' => '414406b5',
'rsrc/css/phui/phui-document-pro.css' => '8799acf7', 'rsrc/css/phui/phui-document-pro.css' => '8799acf7',
'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf', 'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf',
@ -140,10 +141,10 @@ return array(
'rsrc/css/phui/phui-info-view.css' => '6d7c3509', 'rsrc/css/phui/phui-info-view.css' => '6d7c3509',
'rsrc/css/phui/phui-list.css' => '9da2aa00', 'rsrc/css/phui/phui-list.css' => '9da2aa00',
'rsrc/css/phui/phui-object-box.css' => '407eaf5a', 'rsrc/css/phui/phui-object-box.css' => '407eaf5a',
'rsrc/css/phui/phui-object-item-list-view.css' => '26c30d3f', 'rsrc/css/phui/phui-object-item-list-view.css' => 'bbc929b3',
'rsrc/css/phui/phui-pager.css' => 'bea33d23', 'rsrc/css/phui/phui-pager.css' => 'bea33d23',
'rsrc/css/phui/phui-pinboard-view.css' => '2495140e', 'rsrc/css/phui/phui-pinboard-view.css' => '2495140e',
'rsrc/css/phui/phui-profile-menu.css' => '0734510a', 'rsrc/css/phui/phui-profile-menu.css' => 'fa814ef9',
'rsrc/css/phui/phui-property-list-view.css' => '27b2849e', 'rsrc/css/phui/phui-property-list-view.css' => '27b2849e',
'rsrc/css/phui/phui-remarkup-preview.css' => '1a8f2591', 'rsrc/css/phui/phui-remarkup-preview.css' => '1a8f2591',
'rsrc/css/phui/phui-spacing.css' => '042804d6', 'rsrc/css/phui/phui-spacing.css' => '042804d6',
@ -151,7 +152,7 @@ return array(
'rsrc/css/phui/phui-tag-view.css' => 'e60e227b', 'rsrc/css/phui/phui-tag-view.css' => 'e60e227b',
'rsrc/css/phui/phui-text.css' => 'cf019f54', 'rsrc/css/phui/phui-text.css' => 'cf019f54',
'rsrc/css/phui/phui-timeline-view.css' => '2efceff8', 'rsrc/css/phui/phui-timeline-view.css' => '2efceff8',
'rsrc/css/phui/phui-two-column-view.css' => '39ecafb1', 'rsrc/css/phui/phui-two-column-view.css' => 'c75bfc5b',
'rsrc/css/phui/phui-workboard-view.css' => 'f488d036', 'rsrc/css/phui/phui-workboard-view.css' => 'f488d036',
'rsrc/css/phui/phui-workpanel-view.css' => 'adec7699', 'rsrc/css/phui/phui-workpanel-view.css' => 'adec7699',
'rsrc/css/sprite-login.css' => '60e8560e', 'rsrc/css/sprite-login.css' => '60e8560e',
@ -792,8 +793,8 @@ return array(
'phui-action-panel-css' => '91c7b835', 'phui-action-panel-css' => '91c7b835',
'phui-badge-view-css' => 'f25c3476', 'phui-badge-view-css' => 'f25c3476',
'phui-big-info-view-css' => 'bd903741', 'phui-big-info-view-css' => 'bd903741',
'phui-box-css' => '10939564', 'phui-box-css' => 'fd269ed1',
'phui-button-css' => '16020a60', 'phui-button-css' => 'd6ac72db',
'phui-calendar-css' => 'ccabe893', 'phui-calendar-css' => 'ccabe893',
'phui-calendar-day-css' => 'd1cf6f93', 'phui-calendar-day-css' => 'd1cf6f93',
'phui-calendar-list-css' => 'c1c7f338', 'phui-calendar-list-css' => 'c1c7f338',
@ -816,10 +817,10 @@ return array(
'phui-inline-comment-view-css' => '0fdb3667', 'phui-inline-comment-view-css' => '0fdb3667',
'phui-list-view-css' => '9da2aa00', 'phui-list-view-css' => '9da2aa00',
'phui-object-box-css' => '407eaf5a', 'phui-object-box-css' => '407eaf5a',
'phui-object-item-list-view-css' => '26c30d3f', 'phui-object-item-list-view-css' => 'bbc929b3',
'phui-pager-css' => 'bea33d23', 'phui-pager-css' => 'bea33d23',
'phui-pinboard-view-css' => '2495140e', 'phui-pinboard-view-css' => '2495140e',
'phui-profile-menu-css' => '0734510a', 'phui-profile-menu-css' => 'fa814ef9',
'phui-property-list-view-css' => '27b2849e', 'phui-property-list-view-css' => '27b2849e',
'phui-remarkup-preview-css' => '1a8f2591', 'phui-remarkup-preview-css' => '1a8f2591',
'phui-spacing-css' => '042804d6', 'phui-spacing-css' => '042804d6',
@ -828,7 +829,7 @@ return array(
'phui-text-css' => 'cf019f54', 'phui-text-css' => 'cf019f54',
'phui-theme-css' => '981a58f8', 'phui-theme-css' => '981a58f8',
'phui-timeline-view-css' => '2efceff8', 'phui-timeline-view-css' => '2efceff8',
'phui-two-column-view-css' => '39ecafb1', 'phui-two-column-view-css' => 'c75bfc5b',
'phui-workboard-view-css' => 'f488d036', 'phui-workboard-view-css' => 'f488d036',
'phui-workpanel-view-css' => 'adec7699', 'phui-workpanel-view-css' => 'adec7699',
'phuix-action-list-view' => 'b5c256b8', 'phuix-action-list-view' => 'b5c256b8',
@ -841,6 +842,7 @@ return array(
'policy-edit-css' => '815c66f7', 'policy-edit-css' => '815c66f7',
'policy-transaction-detail-css' => '82100a43', 'policy-transaction-detail-css' => '82100a43',
'ponder-view-css' => '7b0df4da', 'ponder-view-css' => '7b0df4da',
'project-view-css' => 'efd02445',
'raphael-core' => '51ee6b43', 'raphael-core' => '51ee6b43',
'raphael-g' => '40dde778', 'raphael-g' => '40dde778',
'raphael-g-line' => '40da039e', 'raphael-g-line' => '40da039e',

View file

@ -2889,7 +2889,6 @@ phutil_register_library_map(array(
'PhabricatorProjectHeraldAction' => 'applications/project/herald/PhabricatorProjectHeraldAction.php', 'PhabricatorProjectHeraldAction' => 'applications/project/herald/PhabricatorProjectHeraldAction.php',
'PhabricatorProjectHeraldAdapter' => 'applications/project/herald/PhabricatorProjectHeraldAdapter.php', 'PhabricatorProjectHeraldAdapter' => 'applications/project/herald/PhabricatorProjectHeraldAdapter.php',
'PhabricatorProjectHeraldFieldGroup' => 'applications/project/herald/PhabricatorProjectHeraldFieldGroup.php', 'PhabricatorProjectHeraldFieldGroup' => 'applications/project/herald/PhabricatorProjectHeraldFieldGroup.php',
'PhabricatorProjectHistoryController' => 'applications/project/controller/PhabricatorProjectHistoryController.php',
'PhabricatorProjectIconSet' => 'applications/project/icon/PhabricatorProjectIconSet.php', 'PhabricatorProjectIconSet' => 'applications/project/icon/PhabricatorProjectIconSet.php',
'PhabricatorProjectIconsConfigOptionType' => 'applications/project/config/PhabricatorProjectIconsConfigOptionType.php', 'PhabricatorProjectIconsConfigOptionType' => 'applications/project/config/PhabricatorProjectIconsConfigOptionType.php',
'PhabricatorProjectInterface' => 'applications/project/interface/PhabricatorProjectInterface.php', 'PhabricatorProjectInterface' => 'applications/project/interface/PhabricatorProjectInterface.php',
@ -2901,6 +2900,8 @@ phutil_register_library_map(array(
'PhabricatorProjectLogicalOrNotDatasource' => 'applications/project/typeahead/PhabricatorProjectLogicalOrNotDatasource.php', 'PhabricatorProjectLogicalOrNotDatasource' => 'applications/project/typeahead/PhabricatorProjectLogicalOrNotDatasource.php',
'PhabricatorProjectLogicalUserDatasource' => 'applications/project/typeahead/PhabricatorProjectLogicalUserDatasource.php', 'PhabricatorProjectLogicalUserDatasource' => 'applications/project/typeahead/PhabricatorProjectLogicalUserDatasource.php',
'PhabricatorProjectLogicalViewerDatasource' => 'applications/project/typeahead/PhabricatorProjectLogicalViewerDatasource.php', 'PhabricatorProjectLogicalViewerDatasource' => 'applications/project/typeahead/PhabricatorProjectLogicalViewerDatasource.php',
'PhabricatorProjectManageController' => 'applications/project/controller/PhabricatorProjectManageController.php',
'PhabricatorProjectManageProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectManageProfilePanel.php',
'PhabricatorProjectMaterializedMemberEdgeType' => 'applications/project/edge/PhabricatorProjectMaterializedMemberEdgeType.php', 'PhabricatorProjectMaterializedMemberEdgeType' => 'applications/project/edge/PhabricatorProjectMaterializedMemberEdgeType.php',
'PhabricatorProjectMemberListView' => 'applications/project/view/PhabricatorProjectMemberListView.php', 'PhabricatorProjectMemberListView' => 'applications/project/view/PhabricatorProjectMemberListView.php',
'PhabricatorProjectMemberOfProjectEdgeType' => 'applications/project/edge/PhabricatorProjectMemberOfProjectEdgeType.php', 'PhabricatorProjectMemberOfProjectEdgeType' => 'applications/project/edge/PhabricatorProjectMemberOfProjectEdgeType.php',
@ -7298,7 +7299,6 @@ phutil_register_library_map(array(
'PhabricatorProjectHeraldAction' => 'HeraldAction', 'PhabricatorProjectHeraldAction' => 'HeraldAction',
'PhabricatorProjectHeraldAdapter' => 'HeraldAdapter', 'PhabricatorProjectHeraldAdapter' => 'HeraldAdapter',
'PhabricatorProjectHeraldFieldGroup' => 'HeraldFieldGroup', 'PhabricatorProjectHeraldFieldGroup' => 'HeraldFieldGroup',
'PhabricatorProjectHistoryController' => 'PhabricatorProjectController',
'PhabricatorProjectIconSet' => 'PhabricatorIconSet', 'PhabricatorProjectIconSet' => 'PhabricatorIconSet',
'PhabricatorProjectIconsConfigOptionType' => 'PhabricatorConfigJSONOptionType', 'PhabricatorProjectIconsConfigOptionType' => 'PhabricatorConfigJSONOptionType',
'PhabricatorProjectListController' => 'PhabricatorProjectController', 'PhabricatorProjectListController' => 'PhabricatorProjectController',
@ -7309,6 +7309,8 @@ phutil_register_library_map(array(
'PhabricatorProjectLogicalOrNotDatasource' => 'PhabricatorTypeaheadCompositeDatasource', 'PhabricatorProjectLogicalOrNotDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
'PhabricatorProjectLogicalUserDatasource' => 'PhabricatorTypeaheadCompositeDatasource', 'PhabricatorProjectLogicalUserDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
'PhabricatorProjectLogicalViewerDatasource' => 'PhabricatorTypeaheadDatasource', 'PhabricatorProjectLogicalViewerDatasource' => 'PhabricatorTypeaheadDatasource',
'PhabricatorProjectManageController' => 'PhabricatorProjectController',
'PhabricatorProjectManageProfilePanel' => 'PhabricatorProfilePanel',
'PhabricatorProjectMaterializedMemberEdgeType' => 'PhabricatorEdgeType', 'PhabricatorProjectMaterializedMemberEdgeType' => 'PhabricatorEdgeType',
'PhabricatorProjectMemberListView' => 'PhabricatorProjectUserListView', 'PhabricatorProjectMemberListView' => 'PhabricatorProjectUserListView',
'PhabricatorProjectMemberOfProjectEdgeType' => 'PhabricatorEdgeType', 'PhabricatorProjectMemberOfProjectEdgeType' => 'PhabricatorEdgeType',

View file

@ -57,9 +57,9 @@ final class PhabricatorFileThumbnailTransform
public function generateTransforms() { public function generateTransforms() {
return array( return array(
id(new PhabricatorFileThumbnailTransform()) id(new PhabricatorFileThumbnailTransform())
->setName(pht("Profile (100px \xC3\x97 100px)")) ->setName(pht("Profile (200px \xC3\x97 200px)"))
->setKey(self::TRANSFORM_PROFILE) ->setKey(self::TRANSFORM_PROFILE)
->setDimensions(100, 100) ->setDimensions(200, 200)
->setScaleUp(true), ->setScaleUp(true),
id(new PhabricatorFileThumbnailTransform()) id(new PhabricatorFileThumbnailTransform())
->setName(pht("Pinboard (280px \xC3\x97 210px)")) ->setName(pht("Pinboard (280px \xC3\x97 210px)"))

View file

@ -86,7 +86,7 @@ final class PhabricatorProjectApplication extends PhabricatorApplication {
), ),
'update/(?P<id>[1-9]\d*)/(?P<action>[^/]+)/' 'update/(?P<id>[1-9]\d*)/(?P<action>[^/]+)/'
=> 'PhabricatorProjectUpdateController', => 'PhabricatorProjectUpdateController',
'history/(?P<id>[1-9]\d*)/' => 'PhabricatorProjectHistoryController', 'manage/(?P<id>[1-9]\d*)/' => 'PhabricatorProjectManageController',
'(?P<action>watch|unwatch)/(?P<id>[1-9]\d*)/' '(?P<action>watch|unwatch)/(?P<id>[1-9]\d*)/'
=> 'PhabricatorProjectWatchController', => 'PhabricatorProjectWatchController',
'silence/(?P<id>[1-9]\d*)/' 'silence/(?P<id>[1-9]\d*)/'

View file

@ -20,7 +20,7 @@ final class PhabricatorProjectArchiveController
return new Aphront404Response(); return new Aphront404Response();
} }
$edit_uri = $this->getApplicationURI('history/'.$project->getID().'/'); $edit_uri = $this->getApplicationURI('manage/'.$project->getID().'/');
if ($request->isFormPost()) { if ($request->isFormPost()) {
if ($project->isArchived()) { if ($project->isArchived()) {

View file

@ -23,8 +23,8 @@ final class PhabricatorProjectEditPictureController
$this->setProject($project); $this->setProject($project);
$edit_uri = $this->getApplicationURI('history/'.$project->getID().'/'); $edit_uri = $this->getApplicationURI('manage/'.$project->getID().'/');
$view_uri = $this->getApplicationURI('history/'.$project->getID().'/'); $view_uri = $this->getApplicationURI('manage/'.$project->getID().'/');
$supported_formats = PhabricatorFile::getTransformableImageFormats(); $supported_formats = PhabricatorFile::getTransformableImageFormats();
$e_file = true; $e_file = true;
@ -255,7 +255,7 @@ final class PhabricatorProjectEditPictureController
->setForm($upload_form); ->setForm($upload_form);
$nav = $this->getProfileMenu(); $nav = $this->getProfileMenu();
$nav->selectFilter(PhabricatorProject::PANEL_PROFILE); $nav->selectFilter(PhabricatorProject::PANEL_MANAGE);
return $this->newPage() return $this->newPage()
->setTitle($title) ->setTitle($title)

View file

@ -1,6 +1,6 @@
<?php <?php
final class PhabricatorProjectHistoryController final class PhabricatorProjectManageController
extends PhabricatorProjectController { extends PhabricatorProjectController {
public function shouldAllowPublic() { public function shouldAllowPublic() {
@ -43,10 +43,10 @@ final class PhabricatorProjectHistoryController
$timeline->setShouldTerminate(true); $timeline->setShouldTerminate(true);
$nav = $this->getProfileMenu(); $nav = $this->getProfileMenu();
$nav->selectFilter(PhabricatorProject::PANEL_PROFILE); $nav->selectFilter(PhabricatorProject::PANEL_MANAGE);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('History')); $crumbs->addTextCrumb(pht('Manage'));
return $this->newPage() return $this->newPage()
->setNavigation($nav) ->setNavigation($nav)
@ -73,12 +73,6 @@ final class PhabricatorProjectHistoryController
$project, $project,
PhabricatorPolicyCapability::CAN_EDIT); PhabricatorPolicyCapability::CAN_EDIT);
$view->addAction(
id(new PhabricatorActionView())
->setName(pht('Back to Profile'))
->setIcon('fa-chevron-left')
->setHref($project->getURI()));
$view->addAction( $view->addAction(
id(new PhabricatorActionView()) id(new PhabricatorActionView())
->setName(pht('Edit Details')) ->setName(pht('Edit Details'))
@ -87,6 +81,14 @@ final class PhabricatorProjectHistoryController
->setDisabled(!$can_edit) ->setDisabled(!$can_edit)
->setWorkflow(!$can_edit)); ->setWorkflow(!$can_edit));
$view->addAction(
id(new PhabricatorActionView())
->setName(pht('Edit Menu'))
->setIcon('fa-th-list')
->setHref($this->getApplicationURI("{$id}/panel/configure/"))
->setDisabled(!$can_edit)
->setWorkflow(!$can_edit));
$view->addAction( $view->addAction(
id(new PhabricatorActionView()) id(new PhabricatorActionView())
->setName(pht('Edit Picture')) ->setName(pht('Edit Picture'))
@ -126,6 +128,10 @@ final class PhabricatorProjectHistoryController
->setUser($viewer) ->setUser($viewer)
->setActionList($actions); ->setActionList($actions);
$view->addProperty(
pht('Looks Like'),
$viewer->renderHandle($project->getPHID())->setAsTag(true));
return $view; return $view;
} }

View file

@ -30,12 +30,9 @@ final class PhabricatorProjectProfileController
$header->setStatus('fa-ban', 'red', pht('Archived')); $header->setStatus('fa-ban', 'red', pht('Archived'));
} }
$actions = $this->buildActionListView($project); $properties = $this->buildPropertyListView($project);
$properties = $this->buildPropertyListView($project, $actions); $watch_action = $this->renderWatchAction($project);
$header->addActionLink($watch_action);
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
->addPropertyList($properties);
$member_list = id(new PhabricatorProjectMemberListView()) $member_list = id(new PhabricatorProjectMemberListView())
->setUser($viewer) ->setUser($viewer)
@ -52,8 +49,6 @@ final class PhabricatorProjectProfileController
$nav = $this->getProfileMenu(); $nav = $this->getProfileMenu();
$nav->selectFilter(PhabricatorProject::PANEL_PROFILE); $nav->selectFilter(PhabricatorProject::PANEL_PROFILE);
$watch_action = $this->renderWatchAction($project);
$stories = id(new PhabricatorFeedQuery()) $stories = id(new PhabricatorFeedQuery())
->setViewer($viewer) ->setViewer($viewer)
->setFilterPHIDs( ->setFilterPHIDs(
@ -63,27 +58,41 @@ final class PhabricatorProjectProfileController
->setLimit(50) ->setLimit(50)
->execute(); ->execute();
$feed = $this->renderStories($stories); $feed = $this->renderStories($stories);
$feed = phutil_tag_div('project-view-feed', $feed);
$feed_header = id(new PHUIHeaderView()) $columns = id(new PHUITwoColumnView())
->setHeader(pht('Recent Activity')) ->setMainColumn(
->addActionLink($watch_action); array(
$properties,
$feed = id(new PHUIObjectBoxView()) $feed,
->setHeader($feed_header) ))
->appendChild($feed); ->setSideColumn(
$columns = id(new AphrontMultiColumnView())
->setFluidLayout(true)
->addColumn($feed)
->addColumn(
array( array(
$member_list, $member_list,
$watcher_list, $watcher_list,
)); ));
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->setBorder(true);
$header = phutil_tag(
'div',
array(
'class' => 'project-view-header',
),
$header);
require_celerity_resource('project-view-css');
$home = phutil_tag(
'div',
array(
'class' => 'project-view-home',
),
array(
$header,
$columns,
));
return $this->newPage() return $this->newPage()
->setNavigation($nav) ->setNavigation($nav)
@ -92,50 +101,29 @@ final class PhabricatorProjectProfileController
->setPageObjectPHIDs(array($project->getPHID())) ->setPageObjectPHIDs(array($project->getPHID()))
->appendChild( ->appendChild(
array( array(
$object_box, $home,
$columns,
)); ));
} }
private function buildActionListView(PhabricatorProject $project) {
$request = $this->getRequest();
$viewer = $request->getUser();
$id = $project->getID();
$view = id(new PhabricatorActionListView())
->setUser($viewer)
->setObject($project);
$view->addAction(
id(new PhabricatorActionView())
->setName(pht('Edit Project'))
->setIcon('fa-pencil')
->setHref($this->getApplicationURI("history/{$id}/")));
return $view;
}
private function buildPropertyListView( private function buildPropertyListView(
PhabricatorProject $project, PhabricatorProject $project) {
PhabricatorActionListView $actions) {
$request = $this->getRequest(); $request = $this->getRequest();
$viewer = $request->getUser(); $viewer = $request->getUser();
$view = id(new PHUIPropertyListView()) $view = id(new PHUIPropertyListView())
->setUser($viewer) ->setUser($viewer)
->setObject($project) ->setObject($project);
->setActionList($actions);
$view->addProperty(
pht('Looks Like'),
$viewer->renderHandle($project->getPHID())->setAsTag(true));
$field_list = PhabricatorCustomField::getObjectFields( $field_list = PhabricatorCustomField::getObjectFields(
$project, $project,
PhabricatorCustomField::ROLE_VIEW); PhabricatorCustomField::ROLE_VIEW);
$field_list->appendFieldsToPropertyList($project, $viewer, $view); $field_list->appendFieldsToPropertyList($project, $viewer, $view);
$view = id(new PHUIBoxView())
->setColor(PHUIBoxView::GREY)
->appendChild($view)
->addClass('project-view-properties');
return $view; return $view;
} }
@ -147,7 +135,7 @@ final class PhabricatorProjectProfileController
$builder->setShowHovercards(true); $builder->setShowHovercards(true);
$view = $builder->buildView(); $view = $builder->buildView();
return phutil_tag_div('profile-feed', $view->render()); return $view;
} }
private function renderWatchAction(PhabricatorProject $project) { private function renderWatchAction(PhabricatorProject $project) {

View file

@ -82,7 +82,7 @@ final class PhabricatorProjectEditEngine
return $object->getURI(); return $object->getURI();
} else { } else {
$id = $object->getID(); $id = $object->getID();
return "/project/history/{$id}/"; return "/project/manage/{$id}/";
} }
} }

View file

@ -24,6 +24,10 @@ final class PhabricatorProjectProfilePanelEngine
->setBuiltinKey(PhabricatorProject::PANEL_MEMBERS) ->setBuiltinKey(PhabricatorProject::PANEL_MEMBERS)
->setPanelKey(PhabricatorProjectMembersProfilePanel::PANELKEY); ->setPanelKey(PhabricatorProjectMembersProfilePanel::PANELKEY);
$panels[] = $this->newPanel()
->setBuiltinKey(PhabricatorProject::PANEL_MANAGE)
->setPanelKey(PhabricatorProjectManageProfilePanel::PANELKEY);
return $panels; return $panels;
} }

View file

@ -0,0 +1,64 @@
<?php
final class PhabricatorProjectManageProfilePanel
extends PhabricatorProfilePanel {
const PANELKEY = 'project.manage';
public function getPanelTypeName() {
return pht('Manage Project');
}
private function getDefaultName() {
return pht('Manage');
}
public function canMakeDefault(
PhabricatorProfilePanelConfiguration $config) {
return true;
}
public function getDisplayName(
PhabricatorProfilePanelConfiguration $config) {
$name = $config->getPanelProperty('name');
if (strlen($name)) {
return $name;
}
return $this->getDefaultName();
}
public function buildEditEngineFields(
PhabricatorProfilePanelConfiguration $config) {
return array(
id(new PhabricatorTextEditField())
->setKey('name')
->setLabel(pht('Name'))
->setPlaceholder($this->getDefaultName())
->setValue($config->getPanelProperty('name')),
);
}
protected function newNavigationMenuItems(
PhabricatorProfilePanelConfiguration $config) {
$project = $config->getProfileObject();
$id = $project->getID();
$name = $this->getDisplayName($config);
$icon = 'fa-gears';
$href = "/project/manage/{$id}/";
$item = $this->newItem()
->setHref($href)
->setName($name)
->setIcon($icon);
return array(
$item,
);
}
}

View file

@ -49,6 +49,7 @@ final class PhabricatorProject extends PhabricatorProjectDAO
const PANEL_PROFILE = 'project.profile'; const PANEL_PROFILE = 'project.profile';
const PANEL_WORKBOARD = 'project.workboard'; const PANEL_WORKBOARD = 'project.workboard';
const PANEL_MEMBERS = 'project.members'; const PANEL_MEMBERS = 'project.members';
const PANEL_MANAGE = 'project.manage';
const PANEL_MILESTONES = 'project.milestones'; const PANEL_MILESTONES = 'project.milestones';
const PANEL_SUBPROJECTS = 'project.subprojects'; const PANEL_SUBPROJECTS = 'project.subprojects';

View file

@ -120,7 +120,8 @@ abstract class PhabricatorProjectUserListView extends AphrontView {
return id(new PHUIObjectBoxView()) return id(new PHUIObjectBoxView())
->setHeader($header) ->setHeader($header)
->setObjectList($list); ->setObjectList($list)
->setBackground(PHUIBoxView::GREY);
} }
} }

View file

@ -371,47 +371,8 @@ abstract class PhabricatorProfilePanelEngine extends Phobject {
->setHideInApplicationMenu(true) ->setHideInApplicationMenu(true)
->addClass('phui-profile-menu-spacer'); ->addClass('phui-profile-menu-spacer');
if ($this->isPanelEngineConfigurable()) {
$viewer = $this->getViewer();
$object = $this->getProfileObject();
$can_edit = PhabricatorPolicyFilter::hasCapability(
$viewer,
$object,
PhabricatorPolicyCapability::CAN_EDIT);
$expanded_edit_icon = id(new PHUIIconCircleView())
->addClass('phui-list-item-icon')
->addClass('phui-profile-menu-visible-when-expanded')
->setIconFont('fa-pencil');
$collapsed_edit_icon = id(new PHUIIconCircleView())
->addClass('phui-list-item-icon')
->addClass('phui-profile-menu-visible-when-collapsed')
->setIconFont('fa-pencil')
->addSigil('has-tooltip')
->setMetadata(
array(
'tip' => pht('Edit Menu'),
'align' => 'E',
));
$items[] = id(new PHUIListItemView())
->setName('Edit Menu')
->setKey('panel.configure')
->addIcon($expanded_edit_icon)
->addIcon($collapsed_edit_icon)
->addClass('phui-profile-menu-footer')
->addClass('phui-profile-menu-footer-1')
->setHref($this->getPanelURI('configure/'))
->setDisabled(!$can_edit)
->setWorkflow(!$can_edit);
}
$collapse_id = celerity_generate_unique_node_id(); $collapse_id = celerity_generate_unique_node_id();
$viewer = $this->getViewer(); $viewer = $this->getViewer();
$collapse_key = $collapse_key =
PhabricatorUserPreferences::PREFERENCE_PROFILE_MENU_COLLAPSED; PhabricatorUserPreferences::PREFERENCE_PROFILE_MENU_COLLAPSED;
@ -442,7 +403,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject {
$collapse_icon = id(new PHUIIconCircleView()) $collapse_icon = id(new PHUIIconCircleView())
->addClass('phui-list-item-icon') ->addClass('phui-list-item-icon')
->addClass('phui-profile-menu-visible-when-expanded') ->addClass('phui-profile-menu-visible-when-expanded')
->setIconFont('fa-angle-left'); ->setIconFont('fa-chevron-left');
$expand_icon = id(new PHUIIconCircleView()) $expand_icon = id(new PHUIIconCircleView())
->addClass('phui-list-item-icon') ->addClass('phui-list-item-icon')
@ -453,7 +414,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject {
'tip' => pht('Expand'), 'tip' => pht('Expand'),
'align' => 'E', 'align' => 'E',
)) ))
->setIconFont('fa-angle-right'); ->setIconFont('fa-chevron-right');
$items[] = id(new PHUIListItemView()) $items[] = id(new PHUIListItemView())
->setName('Collapse') ->setName('Collapse')
@ -461,7 +422,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject {
->addIcon($expand_icon) ->addIcon($expand_icon)
->setID($collapse_id) ->setID($collapse_id)
->addClass('phui-profile-menu-footer') ->addClass('phui-profile-menu-footer')
->addClass('phui-profile-menu-footer-2') ->addClass('phui-profile-menu-footer-1')
->setHideInApplicationMenu(true) ->setHideInApplicationMenu(true)
->setHref('#'); ->setHref('#');

View file

@ -190,7 +190,7 @@ final class PHUIHeaderView extends AphrontTagView {
if ($this->actionLinks) { if ($this->actionLinks) {
$actions = array(); $actions = array();
foreach ($this->actionLinks as $button) { foreach ($this->actionLinks as $button) {
$button->setColor(PHUIButtonView::SIMPLE); $button->setColor(PHUIButtonView::GREY);
$button->addClass(PHUI::MARGIN_SMALL_LEFT); $button->addClass(PHUI::MARGIN_SMALL_LEFT);
$button->addClass('phui-header-action-link'); $button->addClass('phui-header-action-link');
$actions[] = $button; $actions[] = $button;

View file

@ -4,6 +4,7 @@ final class PHUIObjectBoxView extends AphrontView {
private $headerText; private $headerText;
private $color; private $color;
private $background;
private $formErrors = null; private $formErrors = null;
private $formSaved = false; private $formSaved = false;
private $infoView; private $infoView;
@ -106,6 +107,11 @@ final class PHUIObjectBoxView extends AphrontView {
return $this; return $this;
} }
public function setBackground($color) {
$this->background = $color;
return $this;
}
public function setFormErrors(array $errors, $title = null) { public function setFormErrors(array $errors, $title = null) {
if ($errors) { if ($errors) {
$this->formErrors = id(new PHUIInfoView()) $this->formErrors = id(new PHUIInfoView())
@ -387,6 +393,10 @@ final class PHUIObjectBoxView extends AphrontView {
$content->addClass('phui-object-box-'.$this->color); $content->addClass('phui-object-box-'.$this->color);
} }
if ($this->background) {
$content->setColor($this->background);
}
if ($this->collapsed) { if ($this->collapsed) {
$content->addClass('phui-object-box-collapsed'); $content->addClass('phui-object-box-collapsed');
} }

View file

@ -0,0 +1,84 @@
/**
* @provides project-view-css
*/
.project-view-home {
background: #fff;
}
.project-view-header {
padding: 32px 24px 32px;
}
.project-view-header .phui-header-shell {
margin: 0;
padding: 0;
border: none;
}
.project-view-header .phui-header-image {
height: 80px;
width: 80px;
}
.project-view-header .phui-header-col1 {
width: 96px;
}
.project-view-header .phui-header-subheader {
margin-top: 12px;
}
.project-view-header .phui-header-shell .phui-header-header {
font-family: 'Aleo', {$fontfamily};
font-size: 24px;
}
.project-view-header .phui-header-col3 {
vertical-align: top;
}
.phui-box.phui-box-grey.project-view-properties {
margin: 0 16px 0 16px;
padding: 4px 12px;
}
.project-view-properties .phui-property-list-key {
width: auto;
margin-left: 4px;
}
.project-view-properties .phui-property-list-section-header {
border: none;
padding: 12px 4px 0;
}
.project-view-feed .phui-object-box.phui-box-border {
border: none;
padding: 8px;
}
.project-view-feed .phui-header-shell {
padding: 8px 4px;
}
.project-view-feed .phui-header-header {
font-size: {$biggerfontsize};
margin-left: 4px;
}
.project-view-home .phui-box-grey {
padding: 0;
}
.project-view-home .phui-box-grey .phui-header-shell {
padding: 8px 8px 8px 12px;
}
.project-view-home .phui-box-grey .phui-header-header {
font-size: {$biggerfontsize};
}
.project-view-home .phui-box-grey .phui-object-item-list-view {
padding: 8px;
}

View file

@ -15,9 +15,33 @@
.phui-box-grey { .phui-box-grey {
background-color: rgba(71,87,120,0.1); background-color: rgba(71,87,120,0.1);
border-radius: 3px; border-radius: 3px;
border: none;
} }
.phui-box-blue { .phui-box-blue {
background-color: {$bluebackground}; background-color: {$bluebackground};
border-radius: 3px; border-radius: 3px;
border: none;
}
.phui-box-blue .phui-object-item,
.phui-box-grey .phui-object-item {
background: transparent;
}
.phui-box-blue .phui-object-item-link,
.phui-box-grey .phui-object-item-link {
color: {$darkbluetext};
}
.phui-box-blue .phui-header-shell,
.phui-box-grey .phui-header-shell {
border-bottom: 2px solid #fff;
}
.phui-box-blue .phui-info-severity-nodata,
.phui-box-grey .phui-info-severity-nodata {
background: transparent;
padding: 12px 4px;
text-align: center;
} }

View file

@ -59,8 +59,8 @@ button.grey,
input[type="submit"].grey, input[type="submit"].grey,
a.grey, a.grey,
a.grey:visited { a.grey:visited {
background-color: {$lightgreybackground}; background-color: rgba(71, 87, 120, 0.06);
border-color: {$lightgreyborder}; border-color: rgba(71, 87, 120, 0.12);
color: {$darkgreytext}; color: {$darkgreytext};
} }
@ -101,27 +101,33 @@ a.button:hover,
button:hover { button:hover {
text-decoration: none; text-decoration: none;
background-color: {$sky}; background-color: {$sky};
transition: 0.1s;
} }
a.button.grey:hover, a.button.grey:hover,
button.grey:hover { button.grey:hover {
background-color: #fff; background-color: rgba(71, 87, 120, 0.12);
border-color: rgba(71, 87, 120, 0.2);
transition: 0.1s;
} }
a.button.green:hover, a.button.green:hover,
button.green:hover { button.green:hover {
background-color: #0DAD48; background-color: #0DAD48;
transition: 0.1s;
} }
a.button.simple:hover, a.button.simple:hover,
button.simple:hover { button.simple:hover {
background-color: {$blue}; background-color: {$blue};
color: #fff; color: #fff;
transition: 0.1s;
} }
a.button.simple:hover .phui-icon-view, a.button.simple:hover .phui-icon-view,
button.simple:hover .phui-icon-view { button.simple:hover .phui-icon-view {
color: #fff; color: #fff;
transition: 0.1s;
} }
a.button.simple .phui-icon-view { a.button.simple .phui-icon-view {

View file

@ -735,6 +735,8 @@ ul.phui-object-item-list-view .phui-object-item-selected
.phui-object-item-image { .phui-object-item-image {
width: 40px; width: 40px;
height: 40px; height: 40px;
box-shadow: inset 0 0 0 1px rgba(55,55,55,.15);
border-radius: 3px;
background-size: 100%; background-size: 100%;
margin: 6px; margin: 6px;
position: absolute; position: absolute;

View file

@ -165,7 +165,7 @@
.phui-profile-menu .phui-profile-menu-collapsed .phabricator-side-menu .phui-profile-menu .phui-profile-menu-collapsed .phabricator-side-menu
.phui-profile-menu-footer .phui-list-item-href { .phui-profile-menu-footer .phui-list-item-href {
padding: 20px 0 20px; padding: 20px 0 24px;
} }
.phui-profile-menu .phabricator-side-menu .phui-profile-menu-footer .phui-profile-menu .phabricator-side-menu .phui-profile-menu-footer
@ -202,28 +202,20 @@
.phui-profile-menu .phui-profile-menu-footer .phui-profile-menu .phui-profile-menu-footer
.phui-icon-circle.phui-list-item-icon { .phui-icon-circle.phui-list-item-icon {
font-size: 11px; font-size: 12px;
} }
div.phui-profile-menu .phabricator-side-menu .phui-profile-menu-footer-1 { div.phui-profile-menu .phabricator-side-menu .phui-profile-menu-footer-1 {
bottom: 40px;
position: fixed;
background-color: {$menu.profile.background};
}
div.phui-profile-menu .phabricator-side-menu .phui-profile-menu-footer-2 {
bottom: 0; bottom: 0;
position: fixed; position: fixed;
background-color: {$menu.profile.background}; background-color: {$menu.profile.background};
} }
.phui-profile-menu .phui-profile-menu-footer-1, .phui-profile-menu .phui-profile-menu-footer-1 {
.phui-profile-menu .phui-profile-menu-footer-2 {
width: {$menu.profile.width}; width: {$menu.profile.width};
} }
.phui-profile-menu .phui-profile-menu-collapsed .phui-profile-menu-footer-1, .phui-profile-menu .phui-profile-menu-collapsed .phui-profile-menu-footer-1 {
.phui-profile-menu .phui-profile-menu-collapsed .phui-profile-menu-footer-2 {
width: {$menu.profile.width.collapsed}; width: {$menu.profile.width.collapsed};
} }

View file

@ -28,7 +28,7 @@
} }
.device-desktop .phui-two-column-view .device-desktop .phui-two-column-view
.phui-side-column .phui-object-box:first-child { .phui-side-column .phui-object-box {
margin: 0 16px 16px 0; margin: 0 16px 16px 0;
} }