mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +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(
|
||||
'conpherence.pkg.css' => 'e25569a9',
|
||||
'conpherence.pkg.js' => '6249a1cf',
|
||||
'core.pkg.css' => '22581832',
|
||||
'core.pkg.css' => '022cdeed',
|
||||
'core.pkg.js' => '1fa7c0c5',
|
||||
'darkconsole.pkg.js' => 'e7393ebb',
|
||||
'differential.pkg.css' => '4815647b',
|
||||
|
@ -134,7 +134,7 @@ return array(
|
|||
'rsrc/css/phui/phui-basic-nav-view.css' => '3d4b207b',
|
||||
'rsrc/css/phui/phui-big-info-view.css' => 'bd903741',
|
||||
'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-cms.css' => 'be43c8a8',
|
||||
'rsrc/css/phui/phui-comment-form.css' => '48fbd65d',
|
||||
|
@ -841,7 +841,7 @@ return array(
|
|||
'phui-basic-nav-view-css' => '3d4b207b',
|
||||
'phui-big-info-view-css' => 'bd903741',
|
||||
'phui-box-css' => '269cbc99',
|
||||
'phui-button-css' => '00ddac15',
|
||||
'phui-button-css' => '7eaff361',
|
||||
'phui-calendar-css' => '477acfaa',
|
||||
'phui-calendar-day-css' => '572b1893',
|
||||
'phui-calendar-list-css' => 'eb5c774b',
|
||||
|
|
|
@ -169,12 +169,15 @@ final class PhabricatorApplicationSearchController
|
|||
}
|
||||
|
||||
$submit = id(new AphrontFormSubmitControl())
|
||||
->setValue(pht('Execute Query'));
|
||||
->setValue(pht('Search'));
|
||||
|
||||
if ($run_query && !$named_query && $user->isLoggedIn()) {
|
||||
$submit->addCancelButton(
|
||||
'/search/edit/'.$saved_query->getQueryKey().'/',
|
||||
pht('Save Custom Query...'));
|
||||
$save_button = id(new PHUIButtonView())
|
||||
->setTag('a')
|
||||
->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
|
||||
|
|
|
@ -2,20 +2,23 @@
|
|||
|
||||
final class AphrontFormSubmitControl extends AphrontFormControl {
|
||||
|
||||
private $cancelButton;
|
||||
private $buttons = array();
|
||||
|
||||
public function addCancelButton($href, $label = null) {
|
||||
if (!$label) {
|
||||
$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(
|
||||
'a',
|
||||
array(
|
||||
'href' => $href,
|
||||
'class' => 'button grey',
|
||||
),
|
||||
$label);
|
||||
public function addButton(PHUIButtonView $button) {
|
||||
$this->buttons[] = $button;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -38,7 +41,7 @@ final class AphrontFormSubmitControl extends AphrontFormControl {
|
|||
|
||||
return array(
|
||||
$submit_button,
|
||||
$this->cancelButton,
|
||||
$this->buttons,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,18 @@ input[type="submit"] {
|
|||
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) */
|
||||
button.icon,
|
||||
a.icon,
|
||||
|
|
Loading…
Reference in a new issue