Skip to content

Commit

Permalink
fixed pagination #165
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperionel authored and Chocksy committed Jul 7, 2016
1 parent 4e96f5c commit 9d2cd20
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions app/assets/stylesheets/pages/_errors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,11 @@
margin: 4px 0;
}
}
.pagination-buttons{
ul{
margin-bottom: 5px;
}
}
}
}
#grouped-issuedetails {
Expand Down
3 changes: 1 addition & 2 deletions app/controllers/errors_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ class ErrorsController < ApplicationController
def index
@filter = params[:filter] || "recent"
errors_per_page = params[:error_count].to_i || 10
current_error = params[:current_issue]
@page = params[:page] || 1 if current_error
@page = params[:page] || 1
case @filter
when "recent"
@errors = current_website.grouped_issues.order('last_seen DESC').page(@page).per(errors_per_page)
Expand Down
3 changes: 2 additions & 1 deletion app/views/errors/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
.row
.col-xs-4.side
.col-xs-5.buttons
= paginate @errors, theme: 'next_prev_theme'
.pagination-buttons
= paginate @errors, theme: 'next_prev_theme'
%span.pagination-text= page_entries_info @errors, entry_name: 'error'
%br/
- if @errors.blank?
Expand Down

0 comments on commit 9d2cd20

Please sign in to comment.