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:
parent
9ecd82a993
commit
b381265d92
22 changed files with 288 additions and 141 deletions
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
return array(
|
||||
'names' => array(
|
||||
'core.pkg.css' => '4dd8bb4d',
|
||||
'core.pkg.css' => '2ee00a33',
|
||||
'core.pkg.js' => '573e6664',
|
||||
'darkconsole.pkg.js' => 'e7393ebb',
|
||||
'differential.pkg.css' => '2de124c9',
|
||||
|
@ -93,6 +93,7 @@ return array(
|
|||
'rsrc/css/application/policy/policy-transaction-detail.css' => '82100a43',
|
||||
'rsrc/css/application/policy/policy.css' => '957ea14c',
|
||||
'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-preview-branch.css' => 'b7a6f4a5',
|
||||
'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-badge.css' => 'f25c3476',
|
||||
'rsrc/css/phui/phui-big-info-view.css' => 'bd903741',
|
||||
'rsrc/css/phui/phui-box.css' => '10939564',
|
||||
'rsrc/css/phui/phui-button.css' => '16020a60',
|
||||
'rsrc/css/phui/phui-box.css' => 'fd269ed1',
|
||||
'rsrc/css/phui/phui-button.css' => 'd6ac72db',
|
||||
'rsrc/css/phui/phui-crumbs-view.css' => '414406b5',
|
||||
'rsrc/css/phui/phui-document-pro.css' => '8799acf7',
|
||||
'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-list.css' => '9da2aa00',
|
||||
'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-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-remarkup-preview.css' => '1a8f2591',
|
||||
'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-text.css' => 'cf019f54',
|
||||
'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-workpanel-view.css' => 'adec7699',
|
||||
'rsrc/css/sprite-login.css' => '60e8560e',
|
||||
|
@ -792,8 +793,8 @@ return array(
|
|||
'phui-action-panel-css' => '91c7b835',
|
||||
'phui-badge-view-css' => 'f25c3476',
|
||||
'phui-big-info-view-css' => 'bd903741',
|
||||
'phui-box-css' => '10939564',
|
||||
'phui-button-css' => '16020a60',
|
||||
'phui-box-css' => 'fd269ed1',
|
||||
'phui-button-css' => 'd6ac72db',
|
||||
'phui-calendar-css' => 'ccabe893',
|
||||
'phui-calendar-day-css' => 'd1cf6f93',
|
||||
'phui-calendar-list-css' => 'c1c7f338',
|
||||
|
@ -816,10 +817,10 @@ return array(
|
|||
'phui-inline-comment-view-css' => '0fdb3667',
|
||||
'phui-list-view-css' => '9da2aa00',
|
||||
'phui-object-box-css' => '407eaf5a',
|
||||
'phui-object-item-list-view-css' => '26c30d3f',
|
||||
'phui-object-item-list-view-css' => 'bbc929b3',
|
||||
'phui-pager-css' => 'bea33d23',
|
||||
'phui-pinboard-view-css' => '2495140e',
|
||||
'phui-profile-menu-css' => '0734510a',
|
||||
'phui-profile-menu-css' => 'fa814ef9',
|
||||
'phui-property-list-view-css' => '27b2849e',
|
||||
'phui-remarkup-preview-css' => '1a8f2591',
|
||||
'phui-spacing-css' => '042804d6',
|
||||
|
@ -828,7 +829,7 @@ return array(
|
|||
'phui-text-css' => 'cf019f54',
|
||||
'phui-theme-css' => '981a58f8',
|
||||
'phui-timeline-view-css' => '2efceff8',
|
||||
'phui-two-column-view-css' => '39ecafb1',
|
||||
'phui-two-column-view-css' => 'c75bfc5b',
|
||||
'phui-workboard-view-css' => 'f488d036',
|
||||
'phui-workpanel-view-css' => 'adec7699',
|
||||
'phuix-action-list-view' => 'b5c256b8',
|
||||
|
@ -841,6 +842,7 @@ return array(
|
|||
'policy-edit-css' => '815c66f7',
|
||||
'policy-transaction-detail-css' => '82100a43',
|
||||
'ponder-view-css' => '7b0df4da',
|
||||
'project-view-css' => 'efd02445',
|
||||
'raphael-core' => '51ee6b43',
|
||||
'raphael-g' => '40dde778',
|
||||
'raphael-g-line' => '40da039e',
|
||||
|
|
|
@ -2889,7 +2889,6 @@ phutil_register_library_map(array(
|
|||
'PhabricatorProjectHeraldAction' => 'applications/project/herald/PhabricatorProjectHeraldAction.php',
|
||||
'PhabricatorProjectHeraldAdapter' => 'applications/project/herald/PhabricatorProjectHeraldAdapter.php',
|
||||
'PhabricatorProjectHeraldFieldGroup' => 'applications/project/herald/PhabricatorProjectHeraldFieldGroup.php',
|
||||
'PhabricatorProjectHistoryController' => 'applications/project/controller/PhabricatorProjectHistoryController.php',
|
||||
'PhabricatorProjectIconSet' => 'applications/project/icon/PhabricatorProjectIconSet.php',
|
||||
'PhabricatorProjectIconsConfigOptionType' => 'applications/project/config/PhabricatorProjectIconsConfigOptionType.php',
|
||||
'PhabricatorProjectInterface' => 'applications/project/interface/PhabricatorProjectInterface.php',
|
||||
|
@ -2901,6 +2900,8 @@ phutil_register_library_map(array(
|
|||
'PhabricatorProjectLogicalOrNotDatasource' => 'applications/project/typeahead/PhabricatorProjectLogicalOrNotDatasource.php',
|
||||
'PhabricatorProjectLogicalUserDatasource' => 'applications/project/typeahead/PhabricatorProjectLogicalUserDatasource.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',
|
||||
'PhabricatorProjectMemberListView' => 'applications/project/view/PhabricatorProjectMemberListView.php',
|
||||
'PhabricatorProjectMemberOfProjectEdgeType' => 'applications/project/edge/PhabricatorProjectMemberOfProjectEdgeType.php',
|
||||
|
@ -7298,7 +7299,6 @@ phutil_register_library_map(array(
|
|||
'PhabricatorProjectHeraldAction' => 'HeraldAction',
|
||||
'PhabricatorProjectHeraldAdapter' => 'HeraldAdapter',
|
||||
'PhabricatorProjectHeraldFieldGroup' => 'HeraldFieldGroup',
|
||||
'PhabricatorProjectHistoryController' => 'PhabricatorProjectController',
|
||||
'PhabricatorProjectIconSet' => 'PhabricatorIconSet',
|
||||
'PhabricatorProjectIconsConfigOptionType' => 'PhabricatorConfigJSONOptionType',
|
||||
'PhabricatorProjectListController' => 'PhabricatorProjectController',
|
||||
|
@ -7309,6 +7309,8 @@ phutil_register_library_map(array(
|
|||
'PhabricatorProjectLogicalOrNotDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||
'PhabricatorProjectLogicalUserDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||
'PhabricatorProjectLogicalViewerDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||
'PhabricatorProjectManageController' => 'PhabricatorProjectController',
|
||||
'PhabricatorProjectManageProfilePanel' => 'PhabricatorProfilePanel',
|
||||
'PhabricatorProjectMaterializedMemberEdgeType' => 'PhabricatorEdgeType',
|
||||
'PhabricatorProjectMemberListView' => 'PhabricatorProjectUserListView',
|
||||
'PhabricatorProjectMemberOfProjectEdgeType' => 'PhabricatorEdgeType',
|
||||
|
|
|
@ -57,9 +57,9 @@ final class PhabricatorFileThumbnailTransform
|
|||
public function generateTransforms() {
|
||||
return array(
|
||||
id(new PhabricatorFileThumbnailTransform())
|
||||
->setName(pht("Profile (100px \xC3\x97 100px)"))
|
||||
->setName(pht("Profile (200px \xC3\x97 200px)"))
|
||||
->setKey(self::TRANSFORM_PROFILE)
|
||||
->setDimensions(100, 100)
|
||||
->setDimensions(200, 200)
|
||||
->setScaleUp(true),
|
||||
id(new PhabricatorFileThumbnailTransform())
|
||||
->setName(pht("Pinboard (280px \xC3\x97 210px)"))
|
||||
|
|
|
@ -86,7 +86,7 @@ final class PhabricatorProjectApplication extends PhabricatorApplication {
|
|||
),
|
||||
'update/(?P<id>[1-9]\d*)/(?P<action>[^/]+)/'
|
||||
=> 'PhabricatorProjectUpdateController',
|
||||
'history/(?P<id>[1-9]\d*)/' => 'PhabricatorProjectHistoryController',
|
||||
'manage/(?P<id>[1-9]\d*)/' => 'PhabricatorProjectManageController',
|
||||
'(?P<action>watch|unwatch)/(?P<id>[1-9]\d*)/'
|
||||
=> 'PhabricatorProjectWatchController',
|
||||
'silence/(?P<id>[1-9]\d*)/'
|
||||
|
|
|
@ -20,7 +20,7 @@ final class PhabricatorProjectArchiveController
|
|||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
$edit_uri = $this->getApplicationURI('history/'.$project->getID().'/');
|
||||
$edit_uri = $this->getApplicationURI('manage/'.$project->getID().'/');
|
||||
|
||||
if ($request->isFormPost()) {
|
||||
if ($project->isArchived()) {
|
||||
|
|
|
@ -23,8 +23,8 @@ final class PhabricatorProjectEditPictureController
|
|||
|
||||
$this->setProject($project);
|
||||
|
||||
$edit_uri = $this->getApplicationURI('history/'.$project->getID().'/');
|
||||
$view_uri = $this->getApplicationURI('history/'.$project->getID().'/');
|
||||
$edit_uri = $this->getApplicationURI('manage/'.$project->getID().'/');
|
||||
$view_uri = $this->getApplicationURI('manage/'.$project->getID().'/');
|
||||
|
||||
$supported_formats = PhabricatorFile::getTransformableImageFormats();
|
||||
$e_file = true;
|
||||
|
@ -255,7 +255,7 @@ final class PhabricatorProjectEditPictureController
|
|||
->setForm($upload_form);
|
||||
|
||||
$nav = $this->getProfileMenu();
|
||||
$nav->selectFilter(PhabricatorProject::PANEL_PROFILE);
|
||||
$nav->selectFilter(PhabricatorProject::PANEL_MANAGE);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorProjectHistoryController
|
||||
final class PhabricatorProjectManageController
|
||||
extends PhabricatorProjectController {
|
||||
|
||||
public function shouldAllowPublic() {
|
||||
|
@ -43,10 +43,10 @@ final class PhabricatorProjectHistoryController
|
|||
$timeline->setShouldTerminate(true);
|
||||
|
||||
$nav = $this->getProfileMenu();
|
||||
$nav->selectFilter(PhabricatorProject::PANEL_PROFILE);
|
||||
$nav->selectFilter(PhabricatorProject::PANEL_MANAGE);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb(pht('History'));
|
||||
$crumbs->addTextCrumb(pht('Manage'));
|
||||
|
||||
return $this->newPage()
|
||||
->setNavigation($nav)
|
||||
|
@ -73,12 +73,6 @@ final class PhabricatorProjectHistoryController
|
|||
$project,
|
||||
PhabricatorPolicyCapability::CAN_EDIT);
|
||||
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Back to Profile'))
|
||||
->setIcon('fa-chevron-left')
|
||||
->setHref($project->getURI()));
|
||||
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Edit Details'))
|
||||
|
@ -87,6 +81,14 @@ final class PhabricatorProjectHistoryController
|
|||
->setDisabled(!$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(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Edit Picture'))
|
||||
|
@ -126,6 +128,10 @@ final class PhabricatorProjectHistoryController
|
|||
->setUser($viewer)
|
||||
->setActionList($actions);
|
||||
|
||||
$view->addProperty(
|
||||
pht('Looks Like'),
|
||||
$viewer->renderHandle($project->getPHID())->setAsTag(true));
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
|
@ -30,12 +30,9 @@ final class PhabricatorProjectProfileController
|
|||
$header->setStatus('fa-ban', 'red', pht('Archived'));
|
||||
}
|
||||
|
||||
$actions = $this->buildActionListView($project);
|
||||
$properties = $this->buildPropertyListView($project, $actions);
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->addPropertyList($properties);
|
||||
$properties = $this->buildPropertyListView($project);
|
||||
$watch_action = $this->renderWatchAction($project);
|
||||
$header->addActionLink($watch_action);
|
||||
|
||||
$member_list = id(new PhabricatorProjectMemberListView())
|
||||
->setUser($viewer)
|
||||
|
@ -52,8 +49,6 @@ final class PhabricatorProjectProfileController
|
|||
$nav = $this->getProfileMenu();
|
||||
$nav->selectFilter(PhabricatorProject::PANEL_PROFILE);
|
||||
|
||||
$watch_action = $this->renderWatchAction($project);
|
||||
|
||||
$stories = id(new PhabricatorFeedQuery())
|
||||
->setViewer($viewer)
|
||||
->setFilterPHIDs(
|
||||
|
@ -63,27 +58,41 @@ final class PhabricatorProjectProfileController
|
|||
->setLimit(50)
|
||||
->execute();
|
||||
|
||||
|
||||
$feed = $this->renderStories($stories);
|
||||
$feed = phutil_tag_div('project-view-feed', $feed);
|
||||
|
||||
$feed_header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Recent Activity'))
|
||||
->addActionLink($watch_action);
|
||||
|
||||
$feed = id(new PHUIObjectBoxView())
|
||||
->setHeader($feed_header)
|
||||
->appendChild($feed);
|
||||
|
||||
$columns = id(new AphrontMultiColumnView())
|
||||
->setFluidLayout(true)
|
||||
->addColumn($feed)
|
||||
->addColumn(
|
||||
$columns = id(new PHUITwoColumnView())
|
||||
->setMainColumn(
|
||||
array(
|
||||
$properties,
|
||||
$feed,
|
||||
))
|
||||
->setSideColumn(
|
||||
array(
|
||||
$member_list,
|
||||
$watcher_list,
|
||||
));
|
||||
|
||||
$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()
|
||||
->setNavigation($nav)
|
||||
|
@ -92,50 +101,29 @@ final class PhabricatorProjectProfileController
|
|||
->setPageObjectPHIDs(array($project->getPHID()))
|
||||
->appendChild(
|
||||
array(
|
||||
$object_box,
|
||||
$columns,
|
||||
$home,
|
||||
));
|
||||
}
|
||||
|
||||
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(
|
||||
PhabricatorProject $project,
|
||||
PhabricatorActionListView $actions) {
|
||||
PhabricatorProject $project) {
|
||||
$request = $this->getRequest();
|
||||
$viewer = $request->getUser();
|
||||
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setUser($viewer)
|
||||
->setObject($project)
|
||||
->setActionList($actions);
|
||||
|
||||
$view->addProperty(
|
||||
pht('Looks Like'),
|
||||
$viewer->renderHandle($project->getPHID())->setAsTag(true));
|
||||
->setObject($project);
|
||||
|
||||
$field_list = PhabricatorCustomField::getObjectFields(
|
||||
$project,
|
||||
PhabricatorCustomField::ROLE_VIEW);
|
||||
$field_list->appendFieldsToPropertyList($project, $viewer, $view);
|
||||
|
||||
$view = id(new PHUIBoxView())
|
||||
->setColor(PHUIBoxView::GREY)
|
||||
->appendChild($view)
|
||||
->addClass('project-view-properties');
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
|
@ -147,7 +135,7 @@ final class PhabricatorProjectProfileController
|
|||
$builder->setShowHovercards(true);
|
||||
$view = $builder->buildView();
|
||||
|
||||
return phutil_tag_div('profile-feed', $view->render());
|
||||
return $view;
|
||||
}
|
||||
|
||||
private function renderWatchAction(PhabricatorProject $project) {
|
||||
|
|
|
@ -82,7 +82,7 @@ final class PhabricatorProjectEditEngine
|
|||
return $object->getURI();
|
||||
} else {
|
||||
$id = $object->getID();
|
||||
return "/project/history/{$id}/";
|
||||
return "/project/manage/{$id}/";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,10 @@ final class PhabricatorProjectProfilePanelEngine
|
|||
->setBuiltinKey(PhabricatorProject::PANEL_MEMBERS)
|
||||
->setPanelKey(PhabricatorProjectMembersProfilePanel::PANELKEY);
|
||||
|
||||
$panels[] = $this->newPanel()
|
||||
->setBuiltinKey(PhabricatorProject::PANEL_MANAGE)
|
||||
->setPanelKey(PhabricatorProjectManageProfilePanel::PANELKEY);
|
||||
|
||||
return $panels;
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -49,6 +49,7 @@ final class PhabricatorProject extends PhabricatorProjectDAO
|
|||
const PANEL_PROFILE = 'project.profile';
|
||||
const PANEL_WORKBOARD = 'project.workboard';
|
||||
const PANEL_MEMBERS = 'project.members';
|
||||
const PANEL_MANAGE = 'project.manage';
|
||||
const PANEL_MILESTONES = 'project.milestones';
|
||||
const PANEL_SUBPROJECTS = 'project.subprojects';
|
||||
|
||||
|
|
|
@ -120,7 +120,8 @@ abstract class PhabricatorProjectUserListView extends AphrontView {
|
|||
|
||||
return id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->setObjectList($list);
|
||||
->setObjectList($list)
|
||||
->setBackground(PHUIBoxView::GREY);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -371,47 +371,8 @@ abstract class PhabricatorProfilePanelEngine extends Phobject {
|
|||
->setHideInApplicationMenu(true)
|
||||
->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();
|
||||
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$collapse_key =
|
||||
PhabricatorUserPreferences::PREFERENCE_PROFILE_MENU_COLLAPSED;
|
||||
|
||||
|
@ -442,7 +403,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject {
|
|||
$collapse_icon = id(new PHUIIconCircleView())
|
||||
->addClass('phui-list-item-icon')
|
||||
->addClass('phui-profile-menu-visible-when-expanded')
|
||||
->setIconFont('fa-angle-left');
|
||||
->setIconFont('fa-chevron-left');
|
||||
|
||||
$expand_icon = id(new PHUIIconCircleView())
|
||||
->addClass('phui-list-item-icon')
|
||||
|
@ -453,7 +414,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject {
|
|||
'tip' => pht('Expand'),
|
||||
'align' => 'E',
|
||||
))
|
||||
->setIconFont('fa-angle-right');
|
||||
->setIconFont('fa-chevron-right');
|
||||
|
||||
$items[] = id(new PHUIListItemView())
|
||||
->setName('Collapse')
|
||||
|
@ -461,7 +422,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject {
|
|||
->addIcon($expand_icon)
|
||||
->setID($collapse_id)
|
||||
->addClass('phui-profile-menu-footer')
|
||||
->addClass('phui-profile-menu-footer-2')
|
||||
->addClass('phui-profile-menu-footer-1')
|
||||
->setHideInApplicationMenu(true)
|
||||
->setHref('#');
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ final class PHUIHeaderView extends AphrontTagView {
|
|||
if ($this->actionLinks) {
|
||||
$actions = array();
|
||||
foreach ($this->actionLinks as $button) {
|
||||
$button->setColor(PHUIButtonView::SIMPLE);
|
||||
$button->setColor(PHUIButtonView::GREY);
|
||||
$button->addClass(PHUI::MARGIN_SMALL_LEFT);
|
||||
$button->addClass('phui-header-action-link');
|
||||
$actions[] = $button;
|
||||
|
|
|
@ -4,6 +4,7 @@ final class PHUIObjectBoxView extends AphrontView {
|
|||
|
||||
private $headerText;
|
||||
private $color;
|
||||
private $background;
|
||||
private $formErrors = null;
|
||||
private $formSaved = false;
|
||||
private $infoView;
|
||||
|
@ -106,6 +107,11 @@ final class PHUIObjectBoxView extends AphrontView {
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function setBackground($color) {
|
||||
$this->background = $color;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setFormErrors(array $errors, $title = null) {
|
||||
if ($errors) {
|
||||
$this->formErrors = id(new PHUIInfoView())
|
||||
|
@ -387,6 +393,10 @@ final class PHUIObjectBoxView extends AphrontView {
|
|||
$content->addClass('phui-object-box-'.$this->color);
|
||||
}
|
||||
|
||||
if ($this->background) {
|
||||
$content->setColor($this->background);
|
||||
}
|
||||
|
||||
if ($this->collapsed) {
|
||||
$content->addClass('phui-object-box-collapsed');
|
||||
}
|
||||
|
|
84
webroot/rsrc/css/application/project/project-view.css
Normal file
84
webroot/rsrc/css/application/project/project-view.css
Normal 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;
|
||||
}
|
|
@ -15,9 +15,33 @@
|
|||
.phui-box-grey {
|
||||
background-color: rgba(71,87,120,0.1);
|
||||
border-radius: 3px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.phui-box-blue {
|
||||
background-color: {$bluebackground};
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -59,8 +59,8 @@ button.grey,
|
|||
input[type="submit"].grey,
|
||||
a.grey,
|
||||
a.grey:visited {
|
||||
background-color: {$lightgreybackground};
|
||||
border-color: {$lightgreyborder};
|
||||
background-color: rgba(71, 87, 120, 0.06);
|
||||
border-color: rgba(71, 87, 120, 0.12);
|
||||
color: {$darkgreytext};
|
||||
}
|
||||
|
||||
|
@ -101,27 +101,33 @@ a.button:hover,
|
|||
button:hover {
|
||||
text-decoration: none;
|
||||
background-color: {$sky};
|
||||
transition: 0.1s;
|
||||
}
|
||||
|
||||
a.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,
|
||||
button.green:hover {
|
||||
background-color: #0DAD48;
|
||||
transition: 0.1s;
|
||||
}
|
||||
|
||||
a.button.simple:hover,
|
||||
button.simple:hover {
|
||||
background-color: {$blue};
|
||||
color: #fff;
|
||||
transition: 0.1s;
|
||||
}
|
||||
|
||||
a.button.simple:hover .phui-icon-view,
|
||||
button.simple:hover .phui-icon-view {
|
||||
color: #fff;
|
||||
transition: 0.1s;
|
||||
}
|
||||
|
||||
a.button.simple .phui-icon-view {
|
||||
|
|
|
@ -735,6 +735,8 @@ ul.phui-object-item-list-view .phui-object-item-selected
|
|||
.phui-object-item-image {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
box-shadow: inset 0 0 0 1px rgba(55,55,55,.15);
|
||||
border-radius: 3px;
|
||||
background-size: 100%;
|
||||
margin: 6px;
|
||||
position: absolute;
|
||||
|
|
|
@ -165,7 +165,7 @@
|
|||
|
||||
.phui-profile-menu .phui-profile-menu-collapsed .phabricator-side-menu
|
||||
.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
|
||||
|
@ -202,28 +202,20 @@
|
|||
|
||||
.phui-profile-menu .phui-profile-menu-footer
|
||||
.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 {
|
||||
bottom: 40px;
|
||||
position: fixed;
|
||||
background-color: {$menu.profile.background};
|
||||
}
|
||||
|
||||
div.phui-profile-menu .phabricator-side-menu .phui-profile-menu-footer-2 {
|
||||
bottom: 0;
|
||||
position: fixed;
|
||||
background-color: {$menu.profile.background};
|
||||
}
|
||||
|
||||
.phui-profile-menu .phui-profile-menu-footer-1,
|
||||
.phui-profile-menu .phui-profile-menu-footer-2 {
|
||||
.phui-profile-menu .phui-profile-menu-footer-1 {
|
||||
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-2 {
|
||||
.phui-profile-menu .phui-profile-menu-collapsed .phui-profile-menu-footer-1 {
|
||||
width: {$menu.profile.width.collapsed};
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue