Revamp Projects with new navigation
Summary:
A refresh of Projects including a new navigations UI.
- New Navigation UI.
- Auto switch default page if Workboard has been initialized
- Move Feed to it's own page
- Increase 'tasks' on Project Home to 50 over 10
- Fix various display bugs on Workboards
- Remove 'crumbs' from Project portal (unneeded).
Test Plan:
- clicked a link for a project with no workboard and saw the profile
- clicked a link for a project with a workboard and saw the workboard
- navigated around the various edit pages, inspecting links and making sure things linked back to the new profile uri
{F266460}
{F266461}
{F266462}
{F266463}
{F266464}
Reviewers: epriestley, btrahan
Reviewed By: epriestley, btrahan
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11272
This commit is contained in:
@@ -15,16 +15,9 @@ final class PhabricatorProjectBoardViewController
|
||||
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 @@ final class PhabricatorProjectBoardViewController
|
||||
$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 @@ final class PhabricatorProjectBoardViewController
|
||||
$engine->getQueryResultsPageURI($saved->getQueryKey())));
|
||||
}
|
||||
|
||||
$query_key = $this->queryKey;
|
||||
$query_key = $request->getURIData('queryKey');
|
||||
if (!$query_key) {
|
||||
$query_key = 'open';
|
||||
}
|
||||
@@ -133,7 +128,7 @@ final class PhabricatorProjectBoardViewController
|
||||
$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 @@ final class PhabricatorProjectBoardViewController
|
||||
$header_link = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $this->getApplicationURI('view/'.$project->getID().'/'),
|
||||
'href' => $this->getApplicationURI('profile/'.$project->getID().'/'),
|
||||
),
|
||||
$project->getName());
|
||||
|
||||
@@ -312,7 +307,7 @@ final class PhabricatorProjectBoardViewController
|
||||
->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,13 @@ final class PhabricatorProjectBoardViewController
|
||||
->appendChild($board)
|
||||
->addClass('project-board-wrapper');
|
||||
|
||||
$nav = $this->buildIconNavView($project);
|
||||
$nav->appendChild($header);
|
||||
$nav->appendChild($board_box);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$header,
|
||||
$board_box,
|
||||
$nav,
|
||||
),
|
||||
array(
|
||||
'title' => pht('%s Board', $project->getName()),
|
||||
|
||||
Reference in New Issue
Block a user