Skip to content

Commit

Permalink
only show one set of pagination controls and only show them when ther…
Browse files Browse the repository at this point in the history
…e is more than once page
  • Loading branch information
Spencer Alger committed Jun 4, 2014
1 parent bce528e commit 6b5295e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/kibana/directives/paginate.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ define(function (require) {
return {
restrict: 'E',
transclude: true,
template: '<paginate-controls></paginate-controls>' +
'<div class="paginate-content" ng-transclude></div>' +
'<paginate-controls></paginate-controls>'
template: '<div class="paginate-content" ng-transclude></div>' +
'<paginate-controls ng-if="page.count > 1"></paginate-controls>'
,
link: function ($scope, $el, attrs) {
var perPage = _.parseInt(attrs.perPage);
Expand Down
2 changes: 1 addition & 1 deletion src/kibana/styles/_pagination.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ paginate {

paginate-controls {
.flex-display();
padding: 5px;
padding: 5px 5px 10px;

.paginate-other-pages {
.flex(1, 1, 100%);
Expand Down
2 changes: 1 addition & 1 deletion src/kibana/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -6976,7 +6976,7 @@ paginate paginate-controls {
display: -ms-box;
display: -webkit-flex;
display: flex;
padding: 5px;
padding: 5px 5px 10px;
}
paginate paginate-controls .paginate-other-pages {
-webkit-flex-grow: 1;
Expand Down

0 comments on commit 6b5295e

Please sign in to comment.