Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saved report pagination fix #2258

Merged
merged 1 commit into from
Oct 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions app/assets/stylesheets/patternfly_overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -454,33 +454,22 @@ table.table.table-summary-screen tbody td img {
/// begin paginator styling

@media (min-width: $screen-sm) {
.toolbar-pf#paging_div { /* sets paging_div at bottom of screen and styles */
bottom: 0;
border-top: 1px solid #c7c7c7;
height: 44px;
background-image: linear-gradient(to bottom, #FAFAFA 0%, #EDEDED 100%);
}
#paging_div { /* sets paging_div at bottom of screen and styles */
height: 40px;
border-top: 1px solid #d1d1d1;
margin-top: 0;
top:0;
.col-md-12 {
padding: 0;
}
.content-view-pf-pagination {
border: 0;
height: 44px;
margin: 0;
padding: 0;
padding: 3px 0 0 0;
}
}
}

#paging_div {
border-top: 1px solid #c7c7c7;
background-image: linear-gradient(to bottom, #FAFAFA 0%, #EDEDED 100%);
}



/// end paginator styling

/// begin table view styling
Expand Down
16 changes: 8 additions & 8 deletions app/controllers/mixins/controller_constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ module Mixins
module ControllerConstants
# Per page choices and default
PPCHOICES = [
[N_("5"), 5],
[N_("10"), 10],
[N_("20"), 20],
[N_("50"), 50],
[N_("100"), 100],
[N_("200"), 200],
[N_("500"), 500],
[N_("1000"), 1000]
[N_("5 Items"), 5],
[N_("10 Items"), 10],
[N_("20 Items"), 20],
[N_("50 Items"), 50],
[N_("100 Items"), 100],
[N_("200 Items"), 200],
[N_("500 Items"), 500],
[N_("1000 Items"), 1000]
].freeze
end
end
2 changes: 1 addition & 1 deletion app/views/layouts/_paging_bar.html.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.form-group.pull-right{:style => "border-right: 0"}
%span
%ul.pagination
%li.first
/ first button
Expand Down
19 changes: 9 additions & 10 deletions app/views/layouts/_saved_report_paging_bar.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.col-md-12
.toolbar-pf-actions
.pagination.content-view-pf-pagination
- action_url = "saved_report_paging"
- url = url_for_only_path(:action => action_url)
- @pb_occ ||= 0
Expand All @@ -8,17 +8,16 @@
:current => 1,
:total => @sb[:pages][:total],
:items => @sb[:pages][:items]}
.form-group
.form-group{:id => "rpb_div_#{@pb_occ}", :style => "justify-content: flex-end;"}
= select_tag("ppsetting",
options_for_select(@pp_choices, pages[:perpage]),
"data-width" => "auto",
:class => "selectpicker dropup")

%div{:id => "rpb_div_#{@pb_occ}"}
:javascript
miqSelectPickerEvent("ppsetting", "#{url}", {beforeSend: true, complete: true})
= render :partial => '/layouts/paging_bar',
:locals => {:pages => pages, :action_url => action_url, :action_id => ''}
.form-group.pull-right
= _('Items per page:')
= select_tag("ppsetting",
options_for_select(@pp_choices, pages[:perpage]),
"data-width" => "auto",
:class => "selectpicker dropup")
:javascript
miqSelectPickerEvent("ppsetting", "#{url}", {beforeSend: true, complete: true})
:javascript
miqInitSelectPicker();