diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php index 013668d29a..910ca068d7 100644 --- a/src/__celerity_resource_map__.php +++ b/src/__celerity_resource_map__.php @@ -680,7 +680,7 @@ celerity_register_resource_map(array( ), 'aphront-list-filter-view-css' => array( - 'uri' => '/res/7402821f/rsrc/css/aphront/list-filter-view.css', + 'uri' => '/res/f6d419df/rsrc/css/aphront/list-filter-view.css', 'type' => 'css', 'requires' => array( @@ -2664,7 +2664,7 @@ celerity_register_resource_map(array( ), 'phabricator-nav-view-css' => array( - 'uri' => '/res/8606cda1/rsrc/css/aphront/phabricator-nav-view.css', + 'uri' => '/res/00ba5b11/rsrc/css/aphront/phabricator-nav-view.css', 'type' => 'css', 'requires' => array( @@ -3268,7 +3268,7 @@ celerity_register_resource_map(array( ), array( 'packages' => array( - '7a47e387' => + '6d57aed2' => array( 'name' => 'core.pkg.css', 'symbols' => @@ -3313,7 +3313,7 @@ celerity_register_resource_map(array( 37 => 'phabricator-object-item-list-view-css', 38 => 'global-drag-and-drop-css', ), - 'uri' => '/res/pkg/7a47e387/core.pkg.css', + 'uri' => '/res/pkg/6d57aed2/core.pkg.css', 'type' => 'css', ), 'b239ff06' => @@ -3502,19 +3502,19 @@ celerity_register_resource_map(array( 'reverse' => array( 'aphront-attached-file-view-css' => 'ac211174', - 'aphront-crumbs-view-css' => '7a47e387', - 'aphront-dialog-view-css' => '7a47e387', - 'aphront-error-view-css' => '7a47e387', - 'aphront-form-view-css' => '7a47e387', + 'aphront-crumbs-view-css' => '6d57aed2', + 'aphront-dialog-view-css' => '6d57aed2', + 'aphront-error-view-css' => '6d57aed2', + 'aphront-form-view-css' => '6d57aed2', 'aphront-headsup-action-list-view-css' => 'ec01d039', - 'aphront-headsup-view-css' => '7a47e387', - 'aphront-list-filter-view-css' => '7a47e387', - 'aphront-pager-view-css' => '7a47e387', - 'aphront-panel-view-css' => '7a47e387', - 'aphront-table-view-css' => '7a47e387', - 'aphront-tokenizer-control-css' => '7a47e387', - 'aphront-tooltip-css' => '7a47e387', - 'aphront-typeahead-control-css' => '7a47e387', + 'aphront-headsup-view-css' => '6d57aed2', + 'aphront-list-filter-view-css' => '6d57aed2', + 'aphront-pager-view-css' => '6d57aed2', + 'aphront-panel-view-css' => '6d57aed2', + 'aphront-table-view-css' => '6d57aed2', + 'aphront-tokenizer-control-css' => '6d57aed2', + 'aphront-tooltip-css' => '6d57aed2', + 'aphront-typeahead-control-css' => '6d57aed2', 'differential-changeset-view-css' => 'ec01d039', 'differential-core-view-css' => 'ec01d039', 'differential-inline-comment-editor' => 'bbd79ca2', @@ -3528,7 +3528,7 @@ celerity_register_resource_map(array( 'differential-table-of-contents-css' => 'ec01d039', 'diffusion-commit-view-css' => 'c8ce2d88', 'diffusion-icons-css' => 'c8ce2d88', - 'global-drag-and-drop-css' => '7a47e387', + 'global-drag-and-drop-css' => '6d57aed2', 'inline-comment-summary-css' => 'ec01d039', 'javelin-aphlict' => 'b239ff06', 'javelin-behavior' => 'fbeded59', @@ -3597,49 +3597,49 @@ celerity_register_resource_map(array( 'javelin-util' => 'fbeded59', 'javelin-vector' => 'fbeded59', 'javelin-workflow' => 'fbeded59', - 'lightbox-attachment-css' => '7a47e387', + 'lightbox-attachment-css' => '6d57aed2', 'maniphest-task-summary-css' => 'ac211174', 'maniphest-transaction-detail-css' => 'ac211174', - 'phabricator-app-buttons-css' => '7a47e387', + 'phabricator-app-buttons-css' => '6d57aed2', 'phabricator-busy' => 'b239ff06', 'phabricator-content-source-view-css' => 'ec01d039', - 'phabricator-core-buttons-css' => '7a47e387', - 'phabricator-core-css' => '7a47e387', - 'phabricator-crumbs-view-css' => '7a47e387', - 'phabricator-directory-css' => '7a47e387', + 'phabricator-core-buttons-css' => '6d57aed2', + 'phabricator-core-css' => '6d57aed2', + 'phabricator-crumbs-view-css' => '6d57aed2', + 'phabricator-directory-css' => '6d57aed2', 'phabricator-drag-and-drop-file-upload' => 'bbd79ca2', 'phabricator-dropdown-menu' => 'b239ff06', 'phabricator-file-upload' => 'b239ff06', - 'phabricator-filetree-view-css' => '7a47e387', - 'phabricator-flag-css' => '7a47e387', - 'phabricator-form-view-css' => '7a47e387', - 'phabricator-header-view-css' => '7a47e387', - 'phabricator-jump-nav' => '7a47e387', + 'phabricator-filetree-view-css' => '6d57aed2', + 'phabricator-flag-css' => '6d57aed2', + 'phabricator-form-view-css' => '6d57aed2', + 'phabricator-header-view-css' => '6d57aed2', + 'phabricator-jump-nav' => '6d57aed2', 'phabricator-keyboard-shortcut' => 'b239ff06', 'phabricator-keyboard-shortcut-manager' => 'b239ff06', - 'phabricator-main-menu-view' => '7a47e387', + 'phabricator-main-menu-view' => '6d57aed2', 'phabricator-menu-item' => 'b239ff06', - 'phabricator-nav-view-css' => '7a47e387', + 'phabricator-nav-view-css' => '6d57aed2', 'phabricator-notification' => 'b239ff06', - 'phabricator-notification-css' => '7a47e387', - 'phabricator-notification-menu-css' => '7a47e387', - 'phabricator-object-item-list-view-css' => '7a47e387', + 'phabricator-notification-css' => '6d57aed2', + 'phabricator-notification-menu-css' => '6d57aed2', + 'phabricator-object-item-list-view-css' => '6d57aed2', 'phabricator-object-selector-css' => 'ec01d039', 'phabricator-paste-file-upload' => 'b239ff06', 'phabricator-prefab' => 'b239ff06', 'phabricator-project-tag-css' => 'ac211174', - 'phabricator-remarkup-css' => '7a47e387', + 'phabricator-remarkup-css' => '6d57aed2', 'phabricator-shaped-request' => 'bbd79ca2', - 'phabricator-side-menu-view-css' => '7a47e387', - 'phabricator-standard-page-view' => '7a47e387', + 'phabricator-side-menu-view-css' => '6d57aed2', + 'phabricator-standard-page-view' => '6d57aed2', 'phabricator-textareautils' => 'b239ff06', 'phabricator-tooltip' => 'b239ff06', - 'phabricator-transaction-view-css' => '7a47e387', - 'phabricator-zindex-css' => '7a47e387', - 'sprite-apps-large-css' => '7a47e387', - 'sprite-gradient-css' => '7a47e387', - 'sprite-icon-css' => '7a47e387', - 'sprite-menu-css' => '7a47e387', - 'syntax-highlighting-css' => '7a47e387', + 'phabricator-transaction-view-css' => '6d57aed2', + 'phabricator-zindex-css' => '6d57aed2', + 'sprite-apps-large-css' => '6d57aed2', + 'sprite-gradient-css' => '6d57aed2', + 'sprite-icon-css' => '6d57aed2', + 'sprite-menu-css' => '6d57aed2', + 'syntax-highlighting-css' => '6d57aed2', ), )); diff --git a/src/applications/maniphest/controller/ManiphestTaskListController.php b/src/applications/maniphest/controller/ManiphestTaskListController.php index 836056022d..98bc933312 100644 --- a/src/applications/maniphest/controller/ManiphestTaskListController.php +++ b/src/applications/maniphest/controller/ManiphestTaskListController.php @@ -281,15 +281,6 @@ final class ManiphestTaskListController extends ManiphestController { } $filter = new AphrontListFilterView(); - $filter->addButton( - phutil_render_tag( - 'a', - array( - 'href' => (string)$create_uri, - 'class' => 'green button', - ), - 'Create New Task')); - if (empty($key)) { $filter->appendChild($form); } @@ -400,10 +391,24 @@ final class ManiphestTaskListController extends ManiphestController { $list_container->appendChild(''); $nav->appendChild($list_container); + $title = pht('Task List'); + + $crumbs = $this->buildApplicationCrumbs($nav) + ->addCrumb( + id(new PhabricatorCrumbView()) + ->setName($title)) + ->addAction( + id(new PhabricatorMenuItemView()) + ->setHref($this->getApplicationURI('/task/create/')) + ->setName(pht('Create Task')) + ->setIcon('create')); + + $nav->setCrumbs($crumbs); + return $this->buildStandardPageResponse( $nav, array( - 'title' => 'Task List', + 'title' => $title, )); } diff --git a/src/applications/owners/controller/PhabricatorOwnersController.php b/src/applications/owners/controller/PhabricatorOwnersController.php index 05a3beeef6..f41ac3f1c2 100644 --- a/src/applications/owners/controller/PhabricatorOwnersController.php +++ b/src/applications/owners/controller/PhabricatorOwnersController.php @@ -23,6 +23,32 @@ abstract class PhabricatorOwnersController extends PhabricatorController { $nav->appendChild($view); $page->appendChild($nav); + $filter = $nav->getSelectedFilter(); + switch ($filter) { + case 'view/owned': + case 'view/all': + $crumbs = $this->buildApplicationCrumbs(); + + if ($filter == 'view/owned') { + $title = pht('Owned Packages'); + } else { + $title = pht('All Packages'); + } + + $crumbs->addCrumb( + id(new PhabricatorCrumbView()) + ->setName($title)); + + $crumbs->addAction( + id(new PhabricatorMenuItemView()) + ->setName(pht('Create Package')) + ->setHref('/owners/new/') + ->setIcon('create')); + + $nav->setCrumbs($crumbs); + break; + } + $response = new AphrontWebpageResponse(); return $response->setContent($page->render()); } diff --git a/src/applications/owners/controller/PhabricatorOwnersDetailController.php b/src/applications/owners/controller/PhabricatorOwnersDetailController.php index e11025ce9a..f8137b977d 100644 --- a/src/applications/owners/controller/PhabricatorOwnersDetailController.php +++ b/src/applications/owners/controller/PhabricatorOwnersDetailController.php @@ -81,7 +81,7 @@ final class PhabricatorOwnersDetailController $path_links = array(); foreach ($paths as $path) { - $repo = $repositories[$path->getRepositoryPHID()]; + $repo = idx($repositories, $path->getRepositoryPHID()); if (!$repo) { continue; } diff --git a/src/applications/owners/controller/PhabricatorOwnersListController.php b/src/applications/owners/controller/PhabricatorOwnersListController.php index f44e03ea44..eff696222c 100644 --- a/src/applications/owners/controller/PhabricatorOwnersListController.php +++ b/src/applications/owners/controller/PhabricatorOwnersListController.php @@ -122,14 +122,6 @@ final class PhabricatorOwnersListController $nodata); $filter = new AphrontListFilterView(); - $filter->addButton( - phutil_render_tag( - 'a', - array( - 'href' => '/owners/new/', - 'class' => 'green button', - ), - 'Create New Package')); $owners_search_value = array(); if ($request->getArr('owner')) { @@ -250,7 +242,7 @@ final class PhabricatorOwnersListController $pkg_paths = idx($paths, $package->getID(), array()); foreach ($pkg_paths as $key => $path) { - $repo = $repositories[$path->getRepositoryPHID()]; + $repo = idx($repositories, $path->getRepositoryPHID()); if ($repo) { $href = DiffusionRequest::generateDiffusionURI( array( diff --git a/src/applications/uiexample/examples/PhabricatorUIListFilterExample.php b/src/applications/uiexample/examples/PhabricatorUIListFilterExample.php index 834f3316b3..2ca377965a 100644 --- a/src/applications/uiexample/examples/PhabricatorUIListFilterExample.php +++ b/src/applications/uiexample/examples/PhabricatorUIListFilterExample.php @@ -14,14 +14,6 @@ final class PhabricatorUIListFilterExample extends PhabricatorUIExample { public function renderExample() { $filter = new AphrontListFilterView(); - $filter->addButton( - phutil_render_tag( - 'a', - array( - 'href' => '#', - 'class' => 'button green', - ), - 'Create New Thing')); $form = new AphrontFormView(); $form->setUser($this->getRequest()->getUser()); diff --git a/src/view/layout/AphrontListFilterView.php b/src/view/layout/AphrontListFilterView.php index d8ed7f22d9..a79d68046b 100644 --- a/src/view/layout/AphrontListFilterView.php +++ b/src/view/layout/AphrontListFilterView.php @@ -2,31 +2,14 @@ final class AphrontListFilterView extends AphrontView { - private $buttons = array(); - - public function addButton($button) { - $this->buttons[] = $button; - return $this; - } - public function render() { require_celerity_resource('aphront-list-filter-view-css'); - - $buttons = null; - if ($this->buttons) { - $buttons = - ''. - implode("\n", $this->buttons). - ''; - } - return ''. ''. ''. - $buttons. ''. '
'. $this->renderChildren(). '
'; } diff --git a/src/view/layout/AphrontSideNavFilterView.php b/src/view/layout/AphrontSideNavFilterView.php index ad6f068475..136e12626f 100644 --- a/src/view/layout/AphrontSideNavFilterView.php +++ b/src/view/layout/AphrontSideNavFilterView.php @@ -209,6 +209,8 @@ final class AphrontSideNavFilterView extends AphrontView { } if ($this->flexible) { + $nav_classes[] = 'has-drag-nav'; + Javelin::initBehavior( 'phabricator-nav', array( diff --git a/webroot/rsrc/css/aphront/list-filter-view.css b/webroot/rsrc/css/aphront/list-filter-view.css index 14795d22f6..c1dad81530 100644 --- a/webroot/rsrc/css/aphront/list-filter-view.css +++ b/webroot/rsrc/css/aphront/list-filter-view.css @@ -9,15 +9,6 @@ margin-bottom: 1em; } -.aphront-list-filter-view-buttons { - padding: 15px 20px; -} - -.aphront-list-filter-view-buttons a.button { - width: 200px; - display: block; -} - .aphront-list-filter-view-controls { width: 100%; }