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

When pagers aren't connected to an ObjectItemListView, put them in a little box

Summary: Pagers in Maniphest (and, to some degree, apps like Pholio) get lost a bit. Put them in a little box.

Test Plan: Looked at Maniphest and Pholio, pager was more obvious and less un-designed-looking.

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6987
This commit is contained in:
epriestley 2013-09-13 14:43:33 -07:00
parent 639bab3f89
commit a26d3cc3c8
4 changed files with 63 additions and 45 deletions

View file

@ -881,7 +881,7 @@ celerity_register_resource_map(array(
),
'aphront-pager-view-css' =>
array(
'uri' => '/res/43fb79f0/rsrc/css/aphront/pager-view.css',
'uri' => '/res/ea81aec0/rsrc/css/aphront/pager-view.css',
'type' => 'css',
'requires' =>
array(
@ -4171,7 +4171,7 @@ celerity_register_resource_map(array(
), array(
'packages' =>
array(
'1200d176' =>
'606d1ed1' =>
array(
'name' => 'core.pkg.css',
'symbols' =>
@ -4218,7 +4218,7 @@ celerity_register_resource_map(array(
39 => 'phabricator-property-list-view-css',
40 => 'phabricator-tag-view-css',
),
'uri' => '/res/pkg/1200d176/core.pkg.css',
'uri' => '/res/pkg/606d1ed1/core.pkg.css',
'type' => 'css',
),
'8977e356' =>
@ -4409,15 +4409,15 @@ celerity_register_resource_map(array(
),
'reverse' =>
array(
'aphront-dialog-view-css' => '1200d176',
'aphront-error-view-css' => '1200d176',
'aphront-list-filter-view-css' => '1200d176',
'aphront-pager-view-css' => '1200d176',
'aphront-panel-view-css' => '1200d176',
'aphront-table-view-css' => '1200d176',
'aphront-tokenizer-control-css' => '1200d176',
'aphront-tooltip-css' => '1200d176',
'aphront-typeahead-control-css' => '1200d176',
'aphront-dialog-view-css' => '606d1ed1',
'aphront-error-view-css' => '606d1ed1',
'aphront-list-filter-view-css' => '606d1ed1',
'aphront-pager-view-css' => '606d1ed1',
'aphront-panel-view-css' => '606d1ed1',
'aphront-table-view-css' => '606d1ed1',
'aphront-tokenizer-control-css' => '606d1ed1',
'aphront-tooltip-css' => '606d1ed1',
'aphront-typeahead-control-css' => '606d1ed1',
'differential-changeset-view-css' => '44bfe40c',
'differential-core-view-css' => '44bfe40c',
'differential-inline-comment-editor' => '5e9e5c4e',
@ -4431,7 +4431,7 @@ celerity_register_resource_map(array(
'differential-table-of-contents-css' => '44bfe40c',
'diffusion-commit-view-css' => 'c8ce2d88',
'diffusion-icons-css' => 'c8ce2d88',
'global-drag-and-drop-css' => '1200d176',
'global-drag-and-drop-css' => '606d1ed1',
'inline-comment-summary-css' => '44bfe40c',
'javelin-aphlict' => '8977e356',
'javelin-behavior' => 'f32597c9',
@ -4504,55 +4504,55 @@ celerity_register_resource_map(array(
'javelin-util' => 'f32597c9',
'javelin-vector' => 'f32597c9',
'javelin-workflow' => 'f32597c9',
'lightbox-attachment-css' => '1200d176',
'lightbox-attachment-css' => '606d1ed1',
'maniphest-task-summary-css' => 'ad2ed1da',
'maniphest-transaction-detail-css' => 'ad2ed1da',
'phabricator-action-list-view-css' => '1200d176',
'phabricator-application-launch-view-css' => '1200d176',
'phabricator-action-list-view-css' => '606d1ed1',
'phabricator-application-launch-view-css' => '606d1ed1',
'phabricator-busy' => '8977e356',
'phabricator-content-source-view-css' => '44bfe40c',
'phabricator-core-css' => '1200d176',
'phabricator-crumbs-view-css' => '1200d176',
'phabricator-core-css' => '606d1ed1',
'phabricator-crumbs-view-css' => '606d1ed1',
'phabricator-drag-and-drop-file-upload' => '5e9e5c4e',
'phabricator-dropdown-menu' => '8977e356',
'phabricator-file-upload' => '8977e356',
'phabricator-filetree-view-css' => '1200d176',
'phabricator-flag-css' => '1200d176',
'phabricator-header-view-css' => '1200d176',
'phabricator-filetree-view-css' => '606d1ed1',
'phabricator-flag-css' => '606d1ed1',
'phabricator-header-view-css' => '606d1ed1',
'phabricator-hovercard' => '8977e356',
'phabricator-jump-nav' => '1200d176',
'phabricator-jump-nav' => '606d1ed1',
'phabricator-keyboard-shortcut' => '8977e356',
'phabricator-keyboard-shortcut-manager' => '8977e356',
'phabricator-main-menu-view' => '1200d176',
'phabricator-main-menu-view' => '606d1ed1',
'phabricator-menu-item' => '8977e356',
'phabricator-nav-view-css' => '1200d176',
'phabricator-nav-view-css' => '606d1ed1',
'phabricator-notification' => '8977e356',
'phabricator-notification-css' => '1200d176',
'phabricator-notification-menu-css' => '1200d176',
'phabricator-notification-css' => '606d1ed1',
'phabricator-notification-menu-css' => '606d1ed1',
'phabricator-object-selector-css' => '44bfe40c',
'phabricator-phtize' => '8977e356',
'phabricator-prefab' => '8977e356',
'phabricator-project-tag-css' => 'ad2ed1da',
'phabricator-property-list-view-css' => '1200d176',
'phabricator-remarkup-css' => '1200d176',
'phabricator-property-list-view-css' => '606d1ed1',
'phabricator-remarkup-css' => '606d1ed1',
'phabricator-shaped-request' => '5e9e5c4e',
'phabricator-side-menu-view-css' => '1200d176',
'phabricator-standard-page-view' => '1200d176',
'phabricator-tag-view-css' => '1200d176',
'phabricator-side-menu-view-css' => '606d1ed1',
'phabricator-standard-page-view' => '606d1ed1',
'phabricator-tag-view-css' => '606d1ed1',
'phabricator-textareautils' => '8977e356',
'phabricator-tooltip' => '8977e356',
'phabricator-transaction-view-css' => '1200d176',
'phabricator-zindex-css' => '1200d176',
'phui-button-css' => '1200d176',
'phui-form-css' => '1200d176',
'phui-form-view-css' => '1200d176',
'phui-icon-view-css' => '1200d176',
'phui-object-item-list-view-css' => '1200d176',
'phui-spacing-css' => '1200d176',
'sprite-apps-large-css' => '1200d176',
'sprite-gradient-css' => '1200d176',
'sprite-icons-css' => '1200d176',
'sprite-menu-css' => '1200d176',
'syntax-highlighting-css' => '1200d176',
'phabricator-transaction-view-css' => '606d1ed1',
'phabricator-zindex-css' => '606d1ed1',
'phui-button-css' => '606d1ed1',
'phui-form-css' => '606d1ed1',
'phui-form-view-css' => '606d1ed1',
'phui-icon-view-css' => '606d1ed1',
'phui-object-item-list-view-css' => '606d1ed1',
'phui-spacing-css' => '606d1ed1',
'sprite-apps-large-css' => '606d1ed1',
'sprite-gradient-css' => '606d1ed1',
'sprite-icons-css' => '606d1ed1',
'sprite-menu-css' => '606d1ed1',
'syntax-highlighting-css' => '606d1ed1',
),
));

View file

@ -207,7 +207,14 @@ final class PhabricatorApplicationSearchController
$list->setNoDataString(pht("No results found for this query."));
$list->setPager($pager);
} else {
$nav->appendChild($pager);
if ($pager->willShowPagingControls()) {
$pager_box = id(new PHUIBoxView())
->addPadding(PHUI::PADDING_MEDIUM)
->addMargin(PHUI::MARGIN_LARGE)
->setShadow(true)
->appendChild($pager);
$nav->appendChild($pager_box);
}
}
}

View file

@ -79,6 +79,13 @@ final class AphrontCursorPagerView extends AphrontView {
return $results;
}
public function willShowPagingControls() {
return $this->prevPageID ||
$this->nextPageID ||
$this->afterID ||
($this->beforeID && $this->moreResults);
}
public function render() {
if (!$this->uri) {
throw new Exception(

View file

@ -9,6 +9,10 @@
font-weight: bold;
}
.phui-box .aphront-pager-view {
padding: 0;
}
.aphront-pager-view a {
padding: 2px 3px;
}