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

Admin Panel pagination preferences cleanup #7730

Conversation

damianlegawiec
Copy link
Member

Previously this was a mess, each list had different settings, some of them weren't even used.

@@ -16,7 +16,7 @@ def collection
@search = @collection.ransack(params[:q])
@collection = @search.result.
page(params[:page]).
per(Spree::Config[:properties_per_page])
per(Spree::Config[:admin_properties_per_page])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Align per with @search.result. on line 17.

@@ -25,7 +25,7 @@ def collection
@collection = @search.result(distinct: true).
includes(promotion_includes).
page(params[:page]).
per(params[:per_page] || Spree::Config[:promotions_per_page])
per(params[:per_page] || Spree::Config[:admin_promotions_per_page])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Align per with @search.result(distinct: true). on line 25.

@@ -41,7 +41,7 @@ def index
# see https://github.com/spree/spree/pull/3919
@orders = @search.result(distinct: true).
page(params[:page]).
per(params[:per_page] || Spree::Config[:orders_per_page])
per(params[:per_page] || Spree::Config[:admin_orders_per_page])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Align per with @search.result(distinct: true). on line 42.

@damianlegawiec damianlegawiec force-pushed the hotfix/admin-per-page-configuration branch from cae9744 to 7335f21 Compare December 5, 2016 16:34
@Mafi88
Copy link
Contributor

Mafi88 commented Dec 6, 2016

@damianlegawiec please rebase with current master.

@damianlegawiec damianlegawiec force-pushed the hotfix/admin-per-page-configuration branch from 7335f21 to 5022f1f Compare December 6, 2016 10:06
@damianlegawiec
Copy link
Member Author

@Mafi88 done!

@damianlegawiec damianlegawiec merged commit 2767301 into spree:master Dec 6, 2016
@Mafi88 Mafi88 deleted the hotfix/admin-per-page-configuration branch December 6, 2016 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants