diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php index 6d8bbbeea3..e873381942 100644 --- a/src/__celerity_resource_map__.php +++ b/src/__celerity_resource_map__.php @@ -1436,7 +1436,7 @@ celerity_register_resource_map(array( ), 'maniphest-task-summary-css' => array( - 'uri' => '/res/9d8a5516/rsrc/css/application/maniphest/task-summary.css', + 'uri' => '/res/ddb926e4/rsrc/css/application/maniphest/task-summary.css', 'type' => 'css', 'requires' => array( @@ -1720,6 +1720,15 @@ celerity_register_resource_map(array( ), 'disk' => '/rsrc/css/application/profile/profile-header-view.css', ), + 'phabricator-project-tag-css' => + array( + 'uri' => '/res/c0a3c26b/rsrc/css/application/projects/project-tag.css', + 'type' => 'css', + 'requires' => + array( + ), + 'disk' => '/rsrc/css/application/projects/project-tag.css', + ), 'phabricator-remarkup-css' => array( 'uri' => '/res/43702d3c/rsrc/css/core/remarkup.css', @@ -2124,7 +2133,7 @@ celerity_register_resource_map(array( 'uri' => '/res/pkg/4fbae2af/javelin.pkg.js', 'type' => 'js', ), - '7cc1c9a3' => + '8315b569' => array( 'name' => 'maniphest.pkg.css', 'symbols' => @@ -2134,7 +2143,7 @@ celerity_register_resource_map(array( 2 => 'maniphest-task-detail-css', 3 => 'aphront-attached-file-view-css', ), - 'uri' => '/res/pkg/7cc1c9a3/maniphest.pkg.css', + 'uri' => '/res/pkg/8315b569/maniphest.pkg.css', 'type' => 'css', ), '86fc0b0c' => @@ -2169,7 +2178,7 @@ celerity_register_resource_map(array( ), 'reverse' => array( - 'aphront-attached-file-view-css' => '7cc1c9a3', + 'aphront-attached-file-view-css' => '8315b569', 'aphront-crumbs-view-css' => '61493db4', 'aphront-dialog-view-css' => '61493db4', 'aphront-form-view-css' => '61493db4', @@ -2235,9 +2244,9 @@ celerity_register_resource_map(array( 'javelin-util' => '4fbae2af', 'javelin-vector' => '4fbae2af', 'javelin-workflow' => '21d01ed8', - 'maniphest-task-detail-css' => '7cc1c9a3', - 'maniphest-task-summary-css' => '7cc1c9a3', - 'maniphest-transaction-detail-css' => '7cc1c9a3', + 'maniphest-task-detail-css' => '8315b569', + 'maniphest-task-summary-css' => '8315b569', + 'maniphest-transaction-detail-css' => '8315b569', 'phabricator-app-buttons-css' => '61493db4', 'phabricator-content-source-view-css' => '18be02e0', 'phabricator-core-buttons-css' => '61493db4', diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 1a8a9fae1b..16d954db7e 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -455,6 +455,7 @@ phutil_register_library_map(array( 'ManiphestTaskOwner' => 'applications/maniphest/constants/owner', 'ManiphestTaskPriority' => 'applications/maniphest/constants/priority', 'ManiphestTaskProject' => 'applications/maniphest/storage/taskproject', + 'ManiphestTaskProjectsView' => 'applications/maniphest/view/taskprojects', 'ManiphestTaskQuery' => 'applications/maniphest/query', 'ManiphestTaskStatus' => 'applications/maniphest/constants/status', 'ManiphestTaskSubscriber' => 'applications/maniphest/storage/subscriber', @@ -1311,6 +1312,7 @@ phutil_register_library_map(array( 'ManiphestTaskOwner' => 'ManiphestConstants', 'ManiphestTaskPriority' => 'ManiphestConstants', 'ManiphestTaskProject' => 'ManiphestDAO', + 'ManiphestTaskProjectsView' => 'ManiphestView', 'ManiphestTaskStatus' => 'ManiphestConstants', 'ManiphestTaskSubscriber' => 'ManiphestDAO', 'ManiphestTaskSummaryView' => 'ManiphestView', diff --git a/src/applications/directory/controller/main/PhabricatorDirectoryMainController.php b/src/applications/directory/controller/main/PhabricatorDirectoryMainController.php index bfc4e2d6d6..fb23d40fc7 100644 --- a/src/applications/directory/controller/main/PhabricatorDirectoryMainController.php +++ b/src/applications/directory/controller/main/PhabricatorDirectoryMainController.php @@ -372,7 +372,10 @@ final class PhabricatorDirectoryMainController private function buildTaskListView(array $tasks) { $user = $this->getRequest()->getUser(); - $phids = array_filter(mpull($tasks, 'getOwnerPHID')); + $phids = array_merge( + array_filter(mpull($tasks, 'getOwnerPHID')), + array_mergev(mpull($tasks, 'getProjectPHIDs'))); + $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); $view = new ManiphestTaskListView(); diff --git a/src/applications/maniphest/controller/tasklist/ManiphestTaskListController.php b/src/applications/maniphest/controller/tasklist/ManiphestTaskListController.php index 2e9f88b012..ccd583b7a6 100644 --- a/src/applications/maniphest/controller/tasklist/ManiphestTaskListController.php +++ b/src/applications/maniphest/controller/tasklist/ManiphestTaskListController.php @@ -412,7 +412,8 @@ final class ManiphestTaskListController extends ManiphestController { $xproject_phids, $owner_phids, $author_phids, - $project_group_phids); + $project_group_phids, + array_mergev(mpull($data, 'getProjectPHIDs'))); $handles = id(new PhabricatorObjectHandleData($handle_phids)) ->loadHandles(); diff --git a/src/applications/maniphest/view/taskprojects/ManiphestTaskProjectsView.php b/src/applications/maniphest/view/taskprojects/ManiphestTaskProjectsView.php new file mode 100644 index 0000000000..bbb5624544 --- /dev/null +++ b/src/applications/maniphest/view/taskprojects/ManiphestTaskProjectsView.php @@ -0,0 +1,73 @@ +handles = $handles; + return $this; + } + + public function render() { + require_celerity_resource('phabricator-project-tag-css'); + + + $show = array_slice($this->handles, 0, 2); + + $tags = array(); + foreach ($show as $handle) { + $tags[] = phutil_render_tag( + 'a', + array( + 'href' => $handle->getURI(), + 'class' => 'phabricator-project-tag', + ), + phutil_escape_html($handle->getName())); + } + + if (count($this->handles) > 2) { + require_celerity_resource('aphront-tooltip-css'); + Javelin::initBehavior('phabricator-tooltips'); + + $all = array(); + foreach ($this->handles as $handle) { + $all[] = $handle->getName(); + } + + $tags[] = javelin_render_tag( + 'span', + array( + 'class' => 'phabricator-project-tag', + 'sigil' => 'has-tooltip', + 'meta' => array( + 'tip' => phutil_escape_html(implode(', ', $all)), + 'size' => 200, + ), + ), + "\xE2\x80\xA6"); + } + + return implode("\n", $tags); + } + +} diff --git a/src/applications/maniphest/view/taskprojects/__init__.php b/src/applications/maniphest/view/taskprojects/__init__.php new file mode 100644 index 0000000000..4f67f3baf6 --- /dev/null +++ b/src/applications/maniphest/view/taskprojects/__init__.php @@ -0,0 +1,17 @@ +'; } + $projects_view = new ManiphestTaskProjectsView(); + $projects_view->setHandles( + array_select_keys( + $this->handles, + $task->getProjectPHIDs())); + return javelin_render_tag( 'table', array( @@ -114,11 +120,11 @@ final class ManiphestTaskSummaryView extends ManiphestView { ), phutil_escape_html($task->getTitle())). ''. - '