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

Merged
merged 9 commits into from Dec 6, 2016

Conversation

Projects
None yet
5 participants
@damianlegawiec
Member

damianlegawiec commented Dec 5, 2016

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])

This comment has been minimized.

@houndci-bot

houndci-bot Dec 5, 2016

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

@houndci-bot

houndci-bot Dec 5, 2016

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])

This comment has been minimized.

@houndci-bot

houndci-bot Dec 5, 2016

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

@houndci-bot

houndci-bot Dec 5, 2016

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])

This comment has been minimized.

@houndci-bot

houndci-bot Dec 5, 2016

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

@houndci-bot

houndci-bot Dec 5, 2016

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

@Mafi88

This comment has been minimized.

Show comment
Hide comment
@Mafi88

Mafi88 Dec 6, 2016

Contributor

@damianlegawiec please rebase with current master.

Contributor

Mafi88 commented Dec 6, 2016

@damianlegawiec please rebase with current master.

@damianlegawiec

This comment has been minimized.

Show comment
Hide comment
@damianlegawiec
Member

damianlegawiec commented Dec 6, 2016

@Mafi88 done!

@damianlegawiec damianlegawiec merged commit 2767301 into spree:master Dec 6, 2016

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
hound 3 violations found.

@Mafi88 Mafi88 deleted the spark-solutions:hotfix/admin-per-page-configuration branch Dec 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment