Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14003312
D11272.id27145.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
26 KB
Referenced Files
None
Subscribers
None
D11272.id27145.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -7,7 +7,7 @@
*/
return array(
'names' => array(
- 'core.pkg.css' => '63e782fb',
+ 'core.pkg.css' => 'ebd4cf1c',
'core.pkg.js' => '44aac665',
'darkconsole.pkg.js' => '8ab24e01',
'differential.pkg.css' => '8af45893',
@@ -115,7 +115,7 @@
'rsrc/css/layout/phabricator-crumbs-view.css' => 'a49339de',
'rsrc/css/layout/phabricator-filetree-view.css' => 'fccf9f82',
'rsrc/css/layout/phabricator-hovercard-view.css' => '893f4783',
- 'rsrc/css/layout/phabricator-side-menu-view.css' => '90eafc85',
+ 'rsrc/css/layout/phabricator-side-menu-view.css' => 'd5307ad3',
'rsrc/css/layout/phabricator-source-code-view.css' => '7d346aa4',
'rsrc/css/phui/calendar/phui-calendar-day.css' => 'de035c8a',
'rsrc/css/phui/calendar/phui-calendar-list.css' => 'c1d0ca59',
@@ -145,7 +145,7 @@
'rsrc/css/phui/phui-tag-view.css' => '6b74282b',
'rsrc/css/phui/phui-text.css' => 'cf019f54',
'rsrc/css/phui/phui-timeline-view.css' => '415bf348',
- 'rsrc/css/phui/phui-workboard-view.css' => '2bf82d00',
+ 'rsrc/css/phui/phui-workboard-view.css' => '8896938c',
'rsrc/css/phui/phui-workpanel-view.css' => 'e495a5cc',
'rsrc/css/sprite-apps-large.css' => '20ec0cc0',
'rsrc/css/sprite-apps.css' => 'd5baed0f',
@@ -733,7 +733,7 @@
'phabricator-remarkup-css' => '7604f12e',
'phabricator-search-results-css' => 'f240504c',
'phabricator-shaped-request' => '7cbe244b',
- 'phabricator-side-menu-view-css' => '90eafc85',
+ 'phabricator-side-menu-view-css' => 'd5307ad3',
'phabricator-slowvote-css' => '266df6a1',
'phabricator-source-code-view-css' => '7d346aa4',
'phabricator-standard-page-view' => '2c96cfb5',
@@ -790,7 +790,7 @@
'phui-tag-view-css' => '6b74282b',
'phui-text-css' => 'cf019f54',
'phui-timeline-view-css' => '415bf348',
- 'phui-workboard-view-css' => '2bf82d00',
+ 'phui-workboard-view-css' => '8896938c',
'phui-workpanel-view-css' => 'e495a5cc',
'phuix-action-list-view' => 'b5c256b8',
'phuix-action-view' => '6e8cefa4',
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -2225,6 +2225,7 @@
'PhabricatorProjectTransactionQuery' => 'applications/project/query/PhabricatorProjectTransactionQuery.php',
'PhabricatorProjectUIEventListener' => 'applications/project/events/PhabricatorProjectUIEventListener.php',
'PhabricatorProjectUpdateController' => 'applications/project/controller/PhabricatorProjectUpdateController.php',
+ 'PhabricatorProjectViewController' => 'applications/project/controller/PhabricatorProjectViewController.php',
'PhabricatorProjectWatchController' => 'applications/project/controller/PhabricatorProjectWatchController.php',
'PhabricatorProjectWikiExplainController' => 'applications/project/controller/PhabricatorProjectWikiExplainController.php',
'PhabricatorProjectsPolicyRule' => 'applications/policy/rule/PhabricatorProjectsPolicyRule.php',
@@ -5445,6 +5446,7 @@
'PhabricatorProjectTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
'PhabricatorProjectUIEventListener' => 'PhabricatorEventListener',
'PhabricatorProjectUpdateController' => 'PhabricatorProjectController',
+ 'PhabricatorProjectViewController' => 'PhabricatorProjectController',
'PhabricatorProjectWatchController' => 'PhabricatorProjectController',
'PhabricatorProjectWikiExplainController' => 'PhabricatorProjectController',
'PhabricatorProjectsPolicyRule' => 'PhabricatorPolicyRule',
diff --git a/src/applications/project/application/PhabricatorProjectApplication.php b/src/applications/project/application/PhabricatorProjectApplication.php
--- a/src/applications/project/application/PhabricatorProjectApplication.php
+++ b/src/applications/project/application/PhabricatorProjectApplication.php
@@ -52,8 +52,10 @@
=> 'PhabricatorProjectMembersEditController',
'members/(?P<id>[1-9]\d*)/remove/'
=> 'PhabricatorProjectMembersRemoveController',
- 'view/(?P<id>[1-9]\d*)/'
+ 'profile/(?P<id>[1-9]\d*)/'
=> 'PhabricatorProjectProfileController',
+ 'view/(?P<id>[1-9]\d*)/'
+ => 'PhabricatorProjectViewController',
'picture/(?P<id>[1-9]\d*)/'
=> 'PhabricatorProjectEditPictureController',
'icon/(?P<id>[1-9]\d*)/'
@@ -86,7 +88,7 @@
'wiki/' => 'PhabricatorProjectWikiExplainController',
),
'/tag/' => array(
- '(?P<slug>[^/]+)/' => 'PhabricatorProjectProfileController',
+ '(?P<slug>[^/]+)/' => 'PhabricatorProjectViewController',
'(?P<slug>[^/]+)/board/' => 'PhabricatorProjectBoardViewController',
),
);
diff --git a/src/applications/project/controller/PhabricatorProjectBoardController.php b/src/applications/project/controller/PhabricatorProjectBoardController.php
--- a/src/applications/project/controller/PhabricatorProjectBoardController.php
+++ b/src/applications/project/controller/PhabricatorProjectBoardController.php
@@ -18,7 +18,23 @@
$crumbs = parent::buildApplicationCrumbs();
$crumbs->addTextCrumb(
$project->getName(),
- $this->getApplicationURI('view/'.$project->getID().'/'));
+ $this->getApplicationURI('profile/'.$project->getID().'/'));
return $crumbs;
}
+
+ public function buildIconNavView() {
+ $user = $this->getRequest()->getUser();
+ $project = $this->getProject();
+ $id = $project->getID();
+
+ $nav = new AphrontSideNavFilterView();
+ $nav->setIconNav(true);
+ $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
+ $nav->addIcon("profile/{$id}/", pht('Details'), 'fa-home');
+ $nav->addIcon("board/{$id}/", pht('Workboard'), 'fa-columns');
+ $nav->addIcon("members/{$id}/", pht('Members'), 'fa-group');
+ $nav->addIcon("edit/{$id}/", pht('Edit'), 'fa-pencil');
+
+ return $nav;
+ }
}
diff --git a/src/applications/project/controller/PhabricatorProjectBoardViewController.php b/src/applications/project/controller/PhabricatorProjectBoardViewController.php
--- a/src/applications/project/controller/PhabricatorProjectBoardViewController.php
+++ b/src/applications/project/controller/PhabricatorProjectBoardViewController.php
@@ -15,16 +15,9 @@
return true;
}
- public function willProcessRequest(array $data) {
- $this->id = idx($data, 'id');
- $this->slug = idx($data, 'slug');
- $this->queryKey = idx($data, 'queryKey');
- $this->filter = (bool)idx($data, 'filter');
- }
-
- public function processRequest() {
- $request = $this->getRequest();
+ public function handleRequest(AphrontRequest $request) {
$viewer = $request->getUser();
+ $id = $request->getURIData('id');
$show_hidden = $request->getBool('hidden');
$this->showHidden = $show_hidden;
@@ -32,10 +25,12 @@
$project = id(new PhabricatorProjectQuery())
->setViewer($viewer)
->needImages(true);
- if ($this->slug) {
- $project->withSlugs(array($this->slug));
+ $id = $request->getURIData('id');
+ $slug = $request->getURIData('slug');
+ if ($slug) {
+ $project->withSlugs(array($slug));
} else {
- $project->withIDs(array($this->id));
+ $project->withIDs(array($id));
}
$project = $project->executeOne();
if (!$project) {
@@ -111,7 +106,7 @@
$engine->getQueryResultsPageURI($saved->getQueryKey())));
}
- $query_key = $this->queryKey;
+ $query_key = $request->getURIData('queryKey');
if (!$query_key) {
$query_key = 'open';
}
@@ -133,7 +128,7 @@
$custom_query = $saved;
}
- if ($this->filter) {
+ if ($request->getURIData('filter')) {
$filter_form = id(new AphrontFormView())
->setUser($viewer);
$engine->buildSearchForm($filter_form, $saved);
@@ -303,7 +298,7 @@
$header_link = phutil_tag(
'a',
array(
- 'href' => $this->getApplicationURI('view/'.$project->getID().'/'),
+ 'href' => $this->getApplicationURI('profile/'.$project->getID().'/'),
),
$project->getName());
@@ -312,7 +307,7 @@
->setUser($viewer)
->setNoBackground(true)
->setImage($project->getProfileImageURI())
- ->setImageURL($this->getApplicationURI('view/'.$project->getID().'/'))
+ ->setImageURL($this->getApplicationURI('profile/'.$project->getID().'/'))
->addActionLink($sort_menu)
->addActionLink($filter_menu)
->addActionLink($manage_menu)
@@ -322,10 +317,14 @@
->appendChild($board)
->addClass('project-board-wrapper');
+ $nav = $this->buildIconNavView();
+ $nav->selectFilter("board/{$id}/");
+ $nav->appendChild($header);
+ $nav->appendChild($board_box);
+
return $this->buildApplicationPage(
array(
- $header,
- $board_box,
+ $nav,
),
array(
'title' => pht('%s Board', $project->getName()),
diff --git a/src/applications/project/controller/PhabricatorProjectController.php b/src/applications/project/controller/PhabricatorProjectController.php
--- a/src/applications/project/controller/PhabricatorProjectController.php
+++ b/src/applications/project/controller/PhabricatorProjectController.php
@@ -21,4 +21,19 @@
return $nav;
}
+ public function buildIconNavView() {
+ $user = $this->getRequest()->getUser();
+ $id = $this->getRequest()->getURIData('id');
+
+ $nav = new AphrontSideNavFilterView();
+ $nav->setIconNav(true);
+ $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
+ $nav->addIcon("profile/{$id}/", pht('Details'), 'fa-home');
+ $nav->addIcon("board/{$id}/", pht('Workboard'), 'fa-columns');
+ $nav->addIcon("members/{$id}/", pht('Members'), 'fa-group');
+ $nav->addIcon("edit/{$id}/", pht('Edit'), 'fa-pencil');
+
+ return $nav;
+ }
+
}
diff --git a/src/applications/project/controller/PhabricatorProjectEditDetailsController.php b/src/applications/project/controller/PhabricatorProjectEditDetailsController.php
--- a/src/applications/project/controller/PhabricatorProjectEditDetailsController.php
+++ b/src/applications/project/controller/PhabricatorProjectEditDetailsController.php
@@ -14,7 +14,8 @@
$viewer = $request->getUser();
if ($this->id) {
- $is_new = false;
+ $id = $request->getURIData('id');
+ $is_new = false;
$project = id(new PhabricatorProjectQuery())
->setViewer($viewer)
@@ -149,7 +150,7 @@
if ($is_new) {
$redirect_uri =
- $this->getApplicationURI('view/'.$project->getID().'/');
+ $this->getApplicationURI('profile/'.$project->getID().'/');
} else {
$redirect_uri =
$this->getApplicationURI('edit/'.$project->getID().'/');
@@ -306,16 +307,24 @@
} else {
$crumbs
->addTextCrumb($project->getName(),
- $this->getApplicationURI('view/'.$project->getID().'/'))
+ $this->getApplicationURI('profile/'.$project->getID().'/'))
->addTextCrumb(pht('Edit'),
$this->getApplicationURI('edit/'.$project->getID().'/'))
->addTextCrumb(pht('Details'));
}
+ if (!$is_new) {
+ $nav = $this->buildIconNavView();
+ $nav->selectFilter("edit/{$id}/");
+ $nav->setCrumbs($crumbs);
+ $nav->appendChild($form_box);
+ } else {
+ $nav = array($crumbs, $form_box);
+ }
+
return $this->buildApplicationPage(
array(
- $crumbs,
- $form_box,
+ $nav,
),
array(
'title' => $title,
diff --git a/src/applications/project/controller/PhabricatorProjectEditMainController.php b/src/applications/project/controller/PhabricatorProjectEditMainController.php
--- a/src/applications/project/controller/PhabricatorProjectEditMainController.php
+++ b/src/applications/project/controller/PhabricatorProjectEditMainController.php
@@ -18,6 +18,7 @@
public function processRequest() {
$request = $this->getRequest();
$viewer = $request->getUser();
+ $id = $request->getURIData('id');
$project = id(new PhabricatorProjectQuery())
->setViewer($viewer)
@@ -46,7 +47,7 @@
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(
$project->getName(),
- $this->getApplicationURI('view/'.$project->getID().'/'));
+ $this->getApplicationURI('profile/'.$project->getID().'/'));
$crumbs->addTextCrumb(pht('Edit'));
$crumbs->setActionList($actions);
@@ -59,11 +60,15 @@
new PhabricatorProjectTransactionQuery());
$timeline->setShouldTerminate(true);
+ $nav = $this->buildIconNavView();
+ $nav->selectFilter("edit/{$id}/");
+ $nav->setCrumbs($crumbs);
+ $nav->appendChild($object_box);
+ $nav->appendChild($timeline);
+
return $this->buildApplicationPage(
array(
- $crumbs,
- $object_box,
- $timeline,
+ $nav,
),
array(
'title' => $project->getName(),
diff --git a/src/applications/project/controller/PhabricatorProjectEditPictureController.php b/src/applications/project/controller/PhabricatorProjectEditPictureController.php
--- a/src/applications/project/controller/PhabricatorProjectEditPictureController.php
+++ b/src/applications/project/controller/PhabricatorProjectEditPictureController.php
@@ -12,6 +12,7 @@
public function processRequest() {
$request = $this->getRequest();
$viewer = $request->getUser();
+ $id = $request->getURIData('id');
$project = id(new PhabricatorProjectQuery())
->setViewer($viewer)
@@ -27,7 +28,7 @@
}
$edit_uri = $this->getApplicationURI('edit/'.$project->getID().'/');
- $view_uri = $this->getApplicationURI('view/'.$project->getID().'/');
+ $view_uri = $this->getApplicationURI('profile/'.$project->getID().'/');
$supported_formats = PhabricatorFile::getTransformableImageFormats();
$e_file = true;
@@ -260,11 +261,15 @@
->setHeaderText(pht('Upload New Picture'))
->setForm($upload_form);
+ $nav = $this->buildIconNavView();
+ $nav->selectFilter("edit/{$id}/");
+ $nav->setCrumbs($crumbs);
+ $nav->appendChild($form_box);
+ $nav->appendChild($upload_box);
+
return $this->buildApplicationPage(
array(
- $crumbs,
- $form_box,
- $upload_box,
+ $nav,
),
array(
'title' => $title,
diff --git a/src/applications/project/controller/PhabricatorProjectMembersEditController.php b/src/applications/project/controller/PhabricatorProjectMembersEditController.php
--- a/src/applications/project/controller/PhabricatorProjectMembersEditController.php
+++ b/src/applications/project/controller/PhabricatorProjectMembersEditController.php
@@ -12,6 +12,7 @@
public function processRequest() {
$request = $this->getRequest();
$user = $request->getUser();
+ $id = $request->getURIData('id');
$project = id(new PhabricatorProjectQuery())
->setViewer($user)
@@ -75,6 +76,7 @@
$header_name = pht('Edit Members');
$title = pht('Edit Members');
+ $view_uri = $this->getApplicationURI('profile/'.$project->getID().'/');
$form = new AphrontFormView();
$form
@@ -86,7 +88,7 @@
->setDatasource(new PhabricatorPeopleDatasource()))
->appendChild(
id(new AphrontFormSubmitControl())
- ->addCancelButton('/project/view/'.$project->getID().'/')
+ ->addCancelButton($view_uri)
->setValue(pht('Add Members')));
$member_list = $this->renderMemberList($project, $handles);
@@ -96,16 +98,18 @@
->setForm($form);
$crumbs = $this->buildApplicationCrumbs($this->buildSideNavView())
- ->addTextCrumb(
- $project->getName(),
- '/project/view/'.$project->getID().'/')
- ->addTextCrumb(pht('Edit Members'), $this->getApplicationURI());
+ ->addTextCrumb($project->getName(), $view_uri)
+ ->addTextCrumb(pht('Edit Members'));
+
+ $nav = $this->buildIconNavView();
+ $nav->selectFilter("members/{$id}/");
+ $nav->setCrumbs($crumbs);
+ $nav->appendChild($form_box);
+ $nav->appendChild($member_list);
return $this->buildApplicationPage(
array(
- $crumbs,
- $form_box,
- $member_list,
+ $nav,
),
array(
'title' => $title,
diff --git a/src/applications/project/controller/PhabricatorProjectProfileController.php b/src/applications/project/controller/PhabricatorProjectProfileController.php
--- a/src/applications/project/controller/PhabricatorProjectProfileController.php
+++ b/src/applications/project/controller/PhabricatorProjectProfileController.php
@@ -3,22 +3,11 @@
final class PhabricatorProjectProfileController
extends PhabricatorProjectController {
- private $id;
- private $slug;
-
public function shouldAllowPublic() {
return true;
}
- public function willProcessRequest(array $data) {
- // via /project/view/$id/
- $this->id = idx($data, 'id');
- // via /tag/$slug/
- $this->slug = idx($data, 'slug');
- }
-
- public function processRequest() {
- $request = $this->getRequest();
+ public function handleRequest(AphrontRequest $request) {
$user = $request->getUser();
$query = id(new PhabricatorProjectQuery())
@@ -27,16 +16,18 @@
->needWatchers(true)
->needImages(true)
->needSlugs(true);
- if ($this->slug) {
- $query->withSlugs(array($this->slug));
+ $id = $request->getURIData('id');
+ $slug = $request->getURIData('slug');
+ if ($slug) {
+ $query->withSlugs(array($slug));
} else {
- $query->withIDs(array($this->id));
+ $query->withIDs(array($id));
}
$project = $query->executeOne();
if (!$project) {
return new Aphront404Response();
}
- if ($this->slug && $this->slug != $project->getPrimarySlug()) {
+ if ($slug && $slug != $project->getPrimarySlug()) {
return id(new AphrontRedirectResponse())
->setURI('/tag/'.$project->getPrimarySlug().'/');
}
@@ -53,7 +44,7 @@
$project->getPHID(),
));
$query->setLimit(50);
- $query->setViewer($this->getRequest()->getUser());
+ $query->setViewer($request->getUser());
$stories = $query->execute();
$feed = $this->renderStories($stories);
@@ -94,11 +85,15 @@
->setHeader($header)
->addPropertyList($properties);
+ $nav = $this->buildIconNavView();
+ $nav->selectFilter("profile/{$id}/");
+ $nav->setCrumbs($crumbs);
+ $nav->appendChild($object_box);
+ $nav->appendChild($content);
+
return $this->buildApplicationPage(
array(
- $crumbs,
- $object_box,
- $content,
+ $nav,
),
array(
'title' => $project->getName(),
@@ -218,20 +213,6 @@
$project,
PhabricatorPolicyCapability::CAN_EDIT);
- $view->addAction(
- id(new PhabricatorActionView())
- ->setName(pht('Edit Project'))
- ->setIcon('fa-pencil')
- ->setHref($this->getApplicationURI("edit/{$id}/")));
-
- $view->addAction(
- id(new PhabricatorActionView())
- ->setName(pht('Edit Members'))
- ->setIcon('fa-users')
- ->setHref($this->getApplicationURI("members/{$id}/"))
- ->setDisabled(!$can_edit)
- ->setWorkflow(!$can_edit));
-
$action = null;
if (!$project->isUserMember($viewer->getPHID())) {
$can_join = PhabricatorPolicyFilter::hasCapability(
diff --git a/src/applications/project/controller/PhabricatorProjectUpdateController.php b/src/applications/project/controller/PhabricatorProjectUpdateController.php
--- a/src/applications/project/controller/PhabricatorProjectUpdateController.php
+++ b/src/applications/project/controller/PhabricatorProjectUpdateController.php
@@ -42,7 +42,7 @@
return new Aphront404Response();
}
- $project_uri = '/project/view/'.$project->getID().'/';
+ $project_uri = $this->getApplicationURI('profile/'.$project->getID().'/');
if ($process_action) {
diff --git a/src/applications/project/controller/PhabricatorProjectViewController.php b/src/applications/project/controller/PhabricatorProjectViewController.php
new file mode 100644
--- /dev/null
+++ b/src/applications/project/controller/PhabricatorProjectViewController.php
@@ -0,0 +1,56 @@
+<?php
+
+final class PhabricatorProjectViewController
+ extends PhabricatorProjectController {
+
+ public function shouldAllowPublic() {
+ return true;
+ }
+
+ public function handleRequest(AphrontRequest $request) {
+ $request = $this->getRequest();
+ $user = $request->getUser();
+
+ $query = id(new PhabricatorProjectQuery())
+ ->setViewer($user)
+ ->needMembers(true)
+ ->needWatchers(true)
+ ->needImages(true)
+ ->needSlugs(true);
+ $id = $request->getURIData('id');
+ $slug = $request->getURIData('slug');
+ if ($slug) {
+ $query->withSlugs(array($slug));
+ } else {
+ $query->withIDs(array($id));
+ }
+ $project = $query->executeOne();
+ if (!$project) {
+ return new Aphront404Response();
+ }
+
+
+ $columns = id(new PhabricatorProjectColumnQuery())
+ ->setViewer($user)
+ ->withProjectPHIDs(array($project->getPHID()))
+ ->execute();
+ if ($columns) {
+ $controller = 'board';
+ } else {
+ $controller = 'profile';
+ }
+
+ switch ($controller) {
+ case 'board':
+ $controller_object = new PhabricatorProjectBoardViewController();
+ break;
+ case 'profile':
+ default:
+ $controller_object = new PhabricatorProjectProfileController();
+ break;
+ }
+
+ return $this->delegateToController($controller_object);
+ }
+
+}
diff --git a/src/applications/project/controller/PhabricatorProjectWatchController.php b/src/applications/project/controller/PhabricatorProjectWatchController.php
--- a/src/applications/project/controller/PhabricatorProjectWatchController.php
+++ b/src/applications/project/controller/PhabricatorProjectWatchController.php
@@ -25,7 +25,7 @@
return new Aphront404Response();
}
- $project_uri = '/project/view/'.$project->getID().'/';
+ $project_uri = $this->getApplicationURI('profile/'.$project->getID().'/');
// You must be a member of a project to
if (!$project->isUserMember($viewer->getPHID())) {
diff --git a/src/applications/project/query/PhabricatorProjectSearchEngine.php b/src/applications/project/query/PhabricatorProjectSearchEngine.php
--- a/src/applications/project/query/PhabricatorProjectSearchEngine.php
+++ b/src/applications/project/query/PhabricatorProjectSearchEngine.php
@@ -219,8 +219,15 @@
foreach ($projects as $key => $project) {
$id = $project->getID();
+ $profile_uri = $this->getApplicationURI("profile/{$id}/");
$workboards_uri = $this->getApplicationURI("board/{$id}/");
$members_uri = $this->getApplicationURI("members/{$id}/");
+ $profile_url = phutil_tag(
+ 'a',
+ array(
+ 'href' => $profile_uri,
+ ),
+ pht('Profile'));
$workboards_url = phutil_tag(
'a',
array(
@@ -252,6 +259,7 @@
->setHref($this->getApplicationURI("view/{$id}/"))
->setImageURI($project->getProfileImageURI())
->addAttribute($tag_list)
+ ->addAttribute($profile_url)
->addAttribute($workboards_url)
->addAttribute($members_url);
diff --git a/src/view/layout/AphrontSideNavFilterView.php b/src/view/layout/AphrontSideNavFilterView.php
--- a/src/view/layout/AphrontSideNavFilterView.php
+++ b/src/view/layout/AphrontSideNavFilterView.php
@@ -27,6 +27,7 @@
private $crumbs;
private $classes = array();
private $menuID;
+ private $iconNav;
public function setMenuID($menu_id) {
$this->menuID = $menu_id;
@@ -61,6 +62,11 @@
return $this->crumbs;
}
+ public function setIconNav($nav) {
+ $this->iconNav = $nav;
+ return $this;
+ }
+
public function setActive($active) {
$this->active = $active;
return $this;
@@ -94,6 +100,20 @@
$key, $name, $uri, PHUIListItemView::TYPE_LINK);
}
+ public function addIcon($key, $name, $icon) {
+ $href = clone $this->baseURI;
+ $href->setPath(rtrim($href->getPath().$key, '/').'/');
+ $href = (string)$href;
+
+ $item = id(new PHUIListItemView())
+ ->setKey($key)
+ ->setRenderNameAsTooltip($name)
+ ->setType(PHUIListItemView::TYPE_ICON_NAV)
+ ->setIcon($icon)
+ ->setHref($href);
+ return $this->addMenuItem($item);
+ }
+
public function addButton($key, $name, $uri = null) {
return $this->addThing(
$key, $name, $uri, PHUIListItemView::TYPE_BUTTON);
@@ -109,6 +129,7 @@
->setName($name)
->setType($type);
+
if (strlen($key)) {
$item->setKey($key);
}
@@ -192,6 +213,9 @@
$nav_classes = array();
$nav_classes[] = 'phabricator-nav';
+ if ($this->iconNav) {
+ $nav_classes[] = 'phabricator-icon-nav';
+ }
$nav_id = null;
$drag_id = null;
diff --git a/src/view/phui/PHUIListItemView.php b/src/view/phui/PHUIListItemView.php
--- a/src/view/phui/PHUIListItemView.php
+++ b/src/view/phui/PHUIListItemView.php
@@ -9,6 +9,7 @@
const TYPE_CUSTOM = 'type-custom';
const TYPE_DIVIDER = 'type-divider';
const TYPE_ICON = 'type-icon';
+ const TYPE_ICON_NAV = 'type-icon-nav';
const STATUS_WARN = 'phui-list-item-warn';
const STATUS_FAIL = 'phui-list-item-fail';
diff --git a/webroot/rsrc/css/layout/phabricator-side-menu-view.css b/webroot/rsrc/css/layout/phabricator-side-menu-view.css
--- a/webroot/rsrc/css/layout/phabricator-side-menu-view.css
+++ b/webroot/rsrc/css/layout/phabricator-side-menu-view.css
@@ -43,3 +43,35 @@
text-decoration: none;
background-color: {$hovergrey};
}
+
+.device-desktop .phabricator-icon-nav .phabricator-nav-column-background,
+.device-desktop .phabricator-icon-nav .phabricator-nav-local {
+ width: 40px;
+}
+
+.device-desktop .phabricator-icon-nav .phabricator-nav-content {
+ margin-left: 41px;
+}
+
+.phabricator-icon-nav .phabricator-side-menu .phui-list-item-href {
+ height: 40px;
+ width: 40px;
+ padding: 0;
+}
+
+.phabricator-icon-nav .phabricator-side-menu .phui-list-item-icon {
+ font-size: 20px;
+ width: 40px;
+ line-height: 40px;
+ text-align: center;
+ vertical-align: bottom;
+}
+
+.phabricator-icon-nav .phabricator-side-menu .phui-list-item-selected {
+ border: none;
+}
+
+.phabricator-icon-nav .phabricator-side-menu .phui-list-item-selected
+ .phui-icon-view {
+ color: {$sky};
+}
diff --git a/webroot/rsrc/css/phui/phui-workboard-view.css b/webroot/rsrc/css/phui/phui-workboard-view.css
--- a/webroot/rsrc/css/phui/phui-workboard-view.css
+++ b/webroot/rsrc/css/phui/phui-workboard-view.css
@@ -73,6 +73,15 @@
margin: 0 3px;
}
+.device-desktop .project-board-wrapper .phui-workboard-view-shadow {
+ left: 53px;
+}
+
+.device-desktop .phui-workboard-view .aphront-multi-column-fixed
+ .aphront-multi-column-inner {
+ margin-left: 0;
+}
+
.device-tablet .project-board-wrapper {
margin-left: 8px;
margin-right: 8px;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 27, 4:37 AM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6751873
Default Alt Text
D11272.id27145.diff (26 KB)
Attached To
Mode
D11272: Revamp Projects with new navigation
Attached
Detach File
Event Timeline
Log In to Comment