mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-10 23:01:04 +01:00
Add clearer saved search options in ApplicationSearch
Summary: Ref T5307, Makes these buttons a little more clear visually and verbosely. Adds white icons for blue buttons. Test Plan: Test saving a search, viewing button changes on various form pages / uiexamples. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T5307 Differential Revision: https://secure.phabricator.com/D17305
This commit is contained in:
parent
d182d7eaf1
commit
dd068a071e
4 changed files with 34 additions and 16 deletions
|
@ -9,7 +9,7 @@ return array(
|
||||||
'names' => array(
|
'names' => array(
|
||||||
'conpherence.pkg.css' => 'e25569a9',
|
'conpherence.pkg.css' => 'e25569a9',
|
||||||
'conpherence.pkg.js' => '6249a1cf',
|
'conpherence.pkg.js' => '6249a1cf',
|
||||||
'core.pkg.css' => '22581832',
|
'core.pkg.css' => '022cdeed',
|
||||||
'core.pkg.js' => '1fa7c0c5',
|
'core.pkg.js' => '1fa7c0c5',
|
||||||
'darkconsole.pkg.js' => 'e7393ebb',
|
'darkconsole.pkg.js' => 'e7393ebb',
|
||||||
'differential.pkg.css' => '4815647b',
|
'differential.pkg.css' => '4815647b',
|
||||||
|
@ -134,7 +134,7 @@ return array(
|
||||||
'rsrc/css/phui/phui-basic-nav-view.css' => '3d4b207b',
|
'rsrc/css/phui/phui-basic-nav-view.css' => '3d4b207b',
|
||||||
'rsrc/css/phui/phui-big-info-view.css' => 'bd903741',
|
'rsrc/css/phui/phui-big-info-view.css' => 'bd903741',
|
||||||
'rsrc/css/phui/phui-box.css' => '269cbc99',
|
'rsrc/css/phui/phui-box.css' => '269cbc99',
|
||||||
'rsrc/css/phui/phui-button.css' => '00ddac15',
|
'rsrc/css/phui/phui-button.css' => '7eaff361',
|
||||||
'rsrc/css/phui/phui-chart.css' => '6bf6f78e',
|
'rsrc/css/phui/phui-chart.css' => '6bf6f78e',
|
||||||
'rsrc/css/phui/phui-cms.css' => 'be43c8a8',
|
'rsrc/css/phui/phui-cms.css' => 'be43c8a8',
|
||||||
'rsrc/css/phui/phui-comment-form.css' => '48fbd65d',
|
'rsrc/css/phui/phui-comment-form.css' => '48fbd65d',
|
||||||
|
@ -841,7 +841,7 @@ return array(
|
||||||
'phui-basic-nav-view-css' => '3d4b207b',
|
'phui-basic-nav-view-css' => '3d4b207b',
|
||||||
'phui-big-info-view-css' => 'bd903741',
|
'phui-big-info-view-css' => 'bd903741',
|
||||||
'phui-box-css' => '269cbc99',
|
'phui-box-css' => '269cbc99',
|
||||||
'phui-button-css' => '00ddac15',
|
'phui-button-css' => '7eaff361',
|
||||||
'phui-calendar-css' => '477acfaa',
|
'phui-calendar-css' => '477acfaa',
|
||||||
'phui-calendar-day-css' => '572b1893',
|
'phui-calendar-day-css' => '572b1893',
|
||||||
'phui-calendar-list-css' => 'eb5c774b',
|
'phui-calendar-list-css' => 'eb5c774b',
|
||||||
|
|
|
@ -169,12 +169,15 @@ final class PhabricatorApplicationSearchController
|
||||||
}
|
}
|
||||||
|
|
||||||
$submit = id(new AphrontFormSubmitControl())
|
$submit = id(new AphrontFormSubmitControl())
|
||||||
->setValue(pht('Execute Query'));
|
->setValue(pht('Search'));
|
||||||
|
|
||||||
if ($run_query && !$named_query && $user->isLoggedIn()) {
|
if ($run_query && !$named_query && $user->isLoggedIn()) {
|
||||||
$submit->addCancelButton(
|
$save_button = id(new PHUIButtonView())
|
||||||
'/search/edit/'.$saved_query->getQueryKey().'/',
|
->setTag('a')
|
||||||
pht('Save Custom Query...'));
|
->setHref('/search/edit/'.$saved_query->getQueryKey().'/')
|
||||||
|
->setText(pht('Save Query'))
|
||||||
|
->setIcon('fa-floppy-o');
|
||||||
|
$submit->addButton($save_button);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: A "Create Dashboard Panel" action goes here somewhere once
|
// TODO: A "Create Dashboard Panel" action goes here somewhere once
|
||||||
|
|
|
@ -2,20 +2,23 @@
|
||||||
|
|
||||||
final class AphrontFormSubmitControl extends AphrontFormControl {
|
final class AphrontFormSubmitControl extends AphrontFormControl {
|
||||||
|
|
||||||
private $cancelButton;
|
private $buttons = array();
|
||||||
|
|
||||||
public function addCancelButton($href, $label = null) {
|
public function addCancelButton($href, $label = null) {
|
||||||
if (!$label) {
|
if (!$label) {
|
||||||
$label = pht('Cancel');
|
$label = pht('Cancel');
|
||||||
}
|
}
|
||||||
|
$button = id(new PHUIButtonView())
|
||||||
|
->setTag('a')
|
||||||
|
->setHref($href)
|
||||||
|
->setText($label)
|
||||||
|
->setColor(PHUIButtonView::GREY);
|
||||||
|
$this->addButton($button);
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
$this->cancelButton = phutil_tag(
|
public function addButton(PHUIButtonView $button) {
|
||||||
'a',
|
$this->buttons[] = $button;
|
||||||
array(
|
|
||||||
'href' => $href,
|
|
||||||
'class' => 'button grey',
|
|
||||||
),
|
|
||||||
$label);
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +41,7 @@ final class AphrontFormSubmitControl extends AphrontFormControl {
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
$submit_button,
|
$submit_button,
|
||||||
$this->cancelButton,
|
$this->buttons,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,18 @@ input[type="submit"] {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button .phui-icon-view,
|
||||||
|
a.button .phui-icon-view,
|
||||||
|
button.green .phui-icon-view,
|
||||||
|
a.button.green .phui-icon-view {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
button.grey .phui-icon-view,
|
||||||
|
a.button.grey .phui-icon-view {
|
||||||
|
color: {$darkbluetext};
|
||||||
|
}
|
||||||
|
|
||||||
/* Buttons with images (full size only) */
|
/* Buttons with images (full size only) */
|
||||||
button.icon,
|
button.icon,
|
||||||
a.icon,
|
a.icon,
|
||||||
|
|
Loading…
Reference in a new issue