mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-05 11:28:25 +01:00
Prompt to adding a project if none in Maniphest
Summary: Adds 'Add Project...' if no projects present on Maniphest items. Also - I can't seem to get a dialog to pop, what am I missing? Fixes T3308 Test Plan: Click add project, get edit form. Reviewers: epriestley, btrahan Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T3308 Differential Revision: https://secure.phabricator.com/D6121
This commit is contained in:
parent
03b1ecbcdd
commit
989c7748e9
4 changed files with 38 additions and 19 deletions
|
@ -3275,7 +3275,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'phabricator-project-tag-css' =>
|
||||
array(
|
||||
'uri' => '/res/1b5efcb2/rsrc/css/application/projects/project-tag.css',
|
||||
'uri' => '/res/383b8c30/rsrc/css/application/projects/project-tag.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
|
@ -4199,7 +4199,7 @@ celerity_register_resource_map(array(
|
|||
'uri' => '/res/pkg/a9f14d76/javelin.pkg.js',
|
||||
'type' => 'js',
|
||||
),
|
||||
'6b1fccc6' =>
|
||||
'03ab92cf' =>
|
||||
array(
|
||||
'name' => 'maniphest.pkg.css',
|
||||
'symbols' =>
|
||||
|
@ -4209,7 +4209,7 @@ celerity_register_resource_map(array(
|
|||
2 => 'aphront-attached-file-view-css',
|
||||
3 => 'phabricator-project-tag-css',
|
||||
),
|
||||
'uri' => '/res/pkg/6b1fccc6/maniphest.pkg.css',
|
||||
'uri' => '/res/pkg/03ab92cf/maniphest.pkg.css',
|
||||
'type' => 'css',
|
||||
),
|
||||
'1621e522' =>
|
||||
|
@ -4229,7 +4229,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'reverse' =>
|
||||
array(
|
||||
'aphront-attached-file-view-css' => '6b1fccc6',
|
||||
'aphront-attached-file-view-css' => '03ab92cf',
|
||||
'aphront-dialog-view-css' => '8e459ff2',
|
||||
'aphront-error-view-css' => '8e459ff2',
|
||||
'aphront-form-view-css' => '8e459ff2',
|
||||
|
@ -4328,8 +4328,8 @@ celerity_register_resource_map(array(
|
|||
'javelin-vector' => 'a9f14d76',
|
||||
'javelin-workflow' => 'a9f14d76',
|
||||
'lightbox-attachment-css' => '8e459ff2',
|
||||
'maniphest-task-summary-css' => '6b1fccc6',
|
||||
'maniphest-transaction-detail-css' => '6b1fccc6',
|
||||
'maniphest-task-summary-css' => '03ab92cf',
|
||||
'maniphest-transaction-detail-css' => '03ab92cf',
|
||||
'phabricator-action-list-view-css' => '8e459ff2',
|
||||
'phabricator-application-launch-view-css' => '8e459ff2',
|
||||
'phabricator-busy' => '98f60e3f',
|
||||
|
@ -4358,7 +4358,7 @@ celerity_register_resource_map(array(
|
|||
'phabricator-object-selector-css' => 'dd27a69b',
|
||||
'phabricator-phtize' => '98f60e3f',
|
||||
'phabricator-prefab' => '98f60e3f',
|
||||
'phabricator-project-tag-css' => '6b1fccc6',
|
||||
'phabricator-project-tag-css' => '03ab92cf',
|
||||
'phabricator-property-list-view-css' => '8e459ff2',
|
||||
'phabricator-remarkup-css' => '8e459ff2',
|
||||
'phabricator-shaped-request' => '9488bb69',
|
||||
|
|
|
@ -86,15 +86,13 @@ final class ManiphestTaskListView extends ManiphestView {
|
|||
$item->addSigil('maniphest-task');
|
||||
}
|
||||
|
||||
if ($task->getProjectPHIDs()) {
|
||||
$projects_view = new ManiphestTaskProjectsView();
|
||||
$projects_view->setHandles(
|
||||
array_select_keys(
|
||||
$handles,
|
||||
$task->getProjectPHIDs()));
|
||||
$projects_view = new ManiphestTaskProjectsView();
|
||||
$projects_view->setHandles(
|
||||
array_select_keys(
|
||||
$handles,
|
||||
$task->getProjectPHIDs()));
|
||||
|
||||
$item->addAttribute($projects_view);
|
||||
}
|
||||
$item->addAttribute($projects_view);
|
||||
|
||||
$item->setMetadata(
|
||||
array(
|
||||
|
|
|
@ -20,14 +20,25 @@ final class ManiphestTaskProjectsView extends ManiphestView {
|
|||
$show = array_slice($this->handles, 0, 2);
|
||||
|
||||
$tags = array();
|
||||
foreach ($show as $handle) {
|
||||
if ($show) {
|
||||
foreach ($show as $handle) {
|
||||
$tags[] = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $handle->getURI(),
|
||||
'class' => 'phabricator-project-tag',
|
||||
),
|
||||
phutil_utf8_shorten($handle->getName(), 24));
|
||||
}
|
||||
} else {
|
||||
$tags[] = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $handle->getURI(),
|
||||
'class' => 'phabricator-project-tag',
|
||||
'class' => 'phabricator-project-tag phabricator-project-tag-grey',
|
||||
'href' => '/maniphest/view/all/?s&projects='.
|
||||
ManiphestTaskOwner::PROJECT_NO_PROJECT
|
||||
),
|
||||
phutil_utf8_shorten($handle->getName(), 24));
|
||||
pht('No Project'));
|
||||
}
|
||||
|
||||
if (count($this->handles) > 2) {
|
||||
|
|
|
@ -23,6 +23,16 @@
|
|||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.phabricator-project-tag.phabricator-project-tag-grey {
|
||||
border: 1px solid #ccc;
|
||||
background: #f7f7f7;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.phabricator-project-tag.phabricator-project-tag-grey:hover {
|
||||
background: #e7e7e7;
|
||||
}
|
||||
|
||||
.phabricator-project-tag:last-child {
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue