1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Make similar/subtask actions clickable

Summary: Adding better CSS and set correct tag and examples.

Test Plan: Test UIExamples, creating and click on similar task, empty task in Maniphest.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7423

Differential Revision: https://secure.phabricator.com/D11932
This commit is contained in:
Chad Little 2015-03-02 09:01:04 -08:00
parent a0e9762968
commit c6a7bf8729
5 changed files with 19 additions and 15 deletions

View file

@ -7,7 +7,7 @@
*/
return array(
'names' => array(
'core.pkg.css' => 'cb58febe',
'core.pkg.css' => 'cd54f10c',
'core.pkg.js' => '23d653bb',
'darkconsole.pkg.js' => '8ab24e01',
'differential.pkg.css' => '4c3242f8',
@ -135,7 +135,7 @@ return array(
'rsrc/css/phui/phui-icon.css' => 'd35aa857',
'rsrc/css/phui/phui-image-mask.css' => '5a8b09c8',
'rsrc/css/phui/phui-info-panel.css' => '27ea50a1',
'rsrc/css/phui/phui-info-view.css' => '0c8e5d50',
'rsrc/css/phui/phui-info-view.css' => '6c6cc4dd',
'rsrc/css/phui/phui-list.css' => '53deb25c',
'rsrc/css/phui/phui-object-box.css' => 'd68ce5dc',
'rsrc/css/phui/phui-object-item-list-view.css' => '9db65899',
@ -789,7 +789,7 @@ return array(
'phui-icon-view-css' => 'd35aa857',
'phui-image-mask-css' => '5a8b09c8',
'phui-info-panel-css' => '27ea50a1',
'phui-info-view-css' => '0c8e5d50',
'phui-info-view-css' => '6c6cc4dd',
'phui-list-view-css' => '53deb25c',
'phui-object-box-css' => 'd68ce5dc',
'phui-object-item-list-view-css' => '9db65899',

View file

@ -94,6 +94,7 @@ final class ManiphestTaskDetailController extends ManiphestController {
$info_view->setSeverity(PHUIInfoView::SEVERITY_NOTICE);
$info_view->addButton(
id(new PHUIButtonView())
->setTag('a')
->setHref('/maniphest/task/create/?parent='.$parent_task->getID())
->setText(pht('Create Another Subtask')));
@ -105,10 +106,12 @@ final class ManiphestTaskDetailController extends ManiphestController {
$info_view->setSeverity(PHUIInfoView::SEVERITY_NOTICE);
$info_view->addButton(
id(new PHUIButtonView())
->setTag('a')
->setHref('/maniphest/task/create/?template='.$task->getID())
->setText(pht('Similar Task')));
$info_view->addButton(
id(new PHUIButtonView())
->setTag('a')
->setHref('/maniphest/task/create/')
->setText(pht('Empty Task')));
$info_view->appendChild(pht('New task created. Create another?'));

View file

@ -26,7 +26,7 @@ final class PHUIInfoExample extends PhabricatorUIExample {
$button = id(new PHUIButtonView())
->setTag('a')
->setText('Resolve Issue')
->addClass('grey');
->setHref('#');
$views = array();
// Only Title

View file

@ -34,7 +34,8 @@ final class PHUIInfoView extends AphrontView {
return $this;
}
public function addButton($button) {
public function addButton(PHUIButtonView $button) {
$this->buttons[] = $button;
return $this;
}

View file

@ -60,52 +60,52 @@ h1.phui-info-view-head {
}
.phui-info-severity-error,
.phui-info-severity-error .button {
.phui-info-severity-error a.button {
border-color: {$red};
background: {$lightred};
}
.phui-info-severity-error .button {
.phui-info-severity-error a.button {
color: {$red};
}
.phui-info-severity-warning,
.phui-info-severity-warning .button {
.phui-info-severity-warning a.button {
border-color: {$yellow};
background: {$lightyellow};
}
.phui-info-severity-warning .button {
.phui-info-severity-warning a.button {
color: #bc7837;
}
.phui-info-severity-notice,
.phui-info-severity-notice .button {
.phui-info-severity-notice a.button {
border-color: {$blue};
background: {$lightblue};
}
.phui-info-severity-notice .button {
.phui-info-severity-notice a.button {
color: {$blue};
}
.phui-info-severity-nodata,
.phui-info-severity-nodata .button {
.phui-info-severity-nodata a.button {
border-color: {$lightgreyborder};
background: #fff;
}
.phui-info-severity-nodata .button {
.phui-info-severity-nodata a.button {
color: {$greytext};
}
.phui-info-severity-success,
.phui-info-severity-success .button {
.phui-info-severity-success a.button {
border-color: {$green};
background: {$lightgreen};
}
.phui-info-severity-success .button {
.phui-info-severity-success a.button {
color: {$green};
}