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())). ''. - ''. - ManiphestTaskPriority::getTaskPriorityName($task->getPriority()). + ''. + $projects_view->render(). ''. ''. - phabricator_datetime($task->getDateModified(), $this->user). + phabricator_date($task->getDateModified(), $this->user). ''. ''); } diff --git a/src/applications/maniphest/view/tasksummary/__init__.php b/src/applications/maniphest/view/tasksummary/__init__.php index bf6b16559a..abf75eb1eb 100644 --- a/src/applications/maniphest/view/tasksummary/__init__.php +++ b/src/applications/maniphest/view/tasksummary/__init__.php @@ -9,6 +9,7 @@ phutil_require_module('phabricator', 'applications/maniphest/constants/priority'); phutil_require_module('phabricator', 'applications/maniphest/constants/status'); phutil_require_module('phabricator', 'applications/maniphest/view/base'); +phutil_require_module('phabricator', 'applications/maniphest/view/taskprojects'); phutil_require_module('phabricator', 'infrastructure/celerity/api'); phutil_require_module('phabricator', 'infrastructure/javelin/markup'); phutil_require_module('phabricator', 'view/utils'); diff --git a/webroot/rsrc/css/application/maniphest/task-summary.css b/webroot/rsrc/css/application/maniphest/task-summary.css index 7edb405a9b..fee43baf10 100644 --- a/webroot/rsrc/css/application/maniphest/task-summary.css +++ b/webroot/rsrc/css/application/maniphest/task-summary.css @@ -7,13 +7,13 @@ margin: 4px 0; border-collapse: collapse; - font-size: 13px; + font-size: 12px; color: #222222; } .maniphest-task-summary td { - padding: 4px 6px; - background: #f6f6f6; + padding: 5px 3px; + background: #f9f9f9; white-space: nowrap; border-style: solid; @@ -22,6 +22,10 @@ border-width: 1px 0; } +.maniphest-task-summary td em { + color: #888888; +} + .maniphest-batch-selected td { background: #f6ff88; } @@ -35,7 +39,8 @@ } .maniphest-task-summary td.maniphest-task-batch { - width: 30px; + padding-right: 0px; + width: 16px; text-align: center; } @@ -44,14 +49,19 @@ cursor: pointer; } +.maniphest-task-summary td.maniphest-task-batch input { + margin: 0; +} + .maniphest-task-summary td.maniphest-task-number { font-weight: bold; color: #444444; - width: 60px; + width: 70px; + text-align: right; } .maniphest-task-summary td.maniphest-task-status { - width: 80px; + width: 60px; text-align: center; } @@ -65,13 +75,16 @@ white-space: normal; } -.maniphest-task-summary td.maniphest-task-priority { - width: 100px; +.maniphest-task-summary td.maniphest-task-projects { + width: 180px; + text-align: right; + white-space: normal; } .maniphest-task-summary td.maniphest-task-updated { - text-align: left; - width: 180px; + text-align: right; + width: 85px; + padding-right: 8px; border-right-width: 1px; border-right-style: solid; border-right-color: #787878; diff --git a/webroot/rsrc/css/application/projects/project-tag.css b/webroot/rsrc/css/application/projects/project-tag.css new file mode 100644 index 0000000000..1696cb8c67 --- /dev/null +++ b/webroot/rsrc/css/application/projects/project-tag.css @@ -0,0 +1,25 @@ +/** + * @provides phabricator-project-tag-css + */ + +.phabricator-project-tag, +.phabricator-project-tag:link, +.phabricator-project-tag:visited { + font-weight: normal; + border: 1px solid #bfcfef; + padding: 1px 4px 2px; + background: #f9f9ff; + color: #667799; + text-decoration: none; + font-size: 11px; + display: inline; + cursor: pointer; + + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.phabricator-project-tag:hover { + background: #dfdfef; +}