feat(settings): add pagination to imports and exports pages (#598)

* feat(settings): split imports and exports

* feat(security): sanitize pagination params to prevent abuse

* fix(settings): fix syntax in settings nav

* feat(settings): internationalize family_exports and imports UI strings

* fix(settings): fix coderabbit review

* fix(settings): fix coderabbit review

* fix(settings): fix coderabbit review

* Change default per_page value from 20 to 10

Signed-off-by: Juan José Mata <jjmata@jjmata.com>

* Add `/family_export` to navigation

* Consistency with old defaults

* Align `safe_per_page` even if not DRY

---------

Signed-off-by: Julien Orain <julien.orain@gmail.com>
Signed-off-by: Juan José Mata <jjmata@jjmata.com>
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: JulienOrain <your-github-email@example.com>
Co-authored-by: Juan José Mata <jjmata@jjmata.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
Julien Orain
2026-01-20 00:11:22 +01:00
committed by GitHub
parent 3d91e60a8a
commit 777fbdc4ca
51 changed files with 353 additions and 105 deletions

View File

@@ -33,7 +33,7 @@ class FamilyExportsControllerTest < ActionDispatch::IntegrationTest
post family_exports_path
end
assert_redirected_to imports_path
assert_redirected_to family_exports_path
assert_equal "Export started. You'll be able to download it shortly.", flash[:notice]
export = @family.family_exports.last
@@ -67,7 +67,7 @@ class FamilyExportsControllerTest < ActionDispatch::IntegrationTest
export = @family.family_exports.create!(status: "processing")
get download_family_export_path(export)
assert_redirected_to imports_path
assert_redirected_to family_exports_path
assert_equal "Export not ready for download", flash[:alert]
end
@@ -78,7 +78,7 @@ class FamilyExportsControllerTest < ActionDispatch::IntegrationTest
delete family_export_path(export)
end
assert_redirected_to imports_path
assert_redirected_to family_exports_path
assert_equal "Export deleted successfully", flash[:notice]
end
@@ -95,7 +95,7 @@ class FamilyExportsControllerTest < ActionDispatch::IntegrationTest
delete family_export_path(export)
end
assert_redirected_to imports_path
assert_redirected_to family_exports_path
assert_equal "Export deleted successfully", flash[:notice]
end
@@ -112,7 +112,7 @@ class FamilyExportsControllerTest < ActionDispatch::IntegrationTest
delete family_export_path(export)
end
assert_redirected_to imports_path
assert_redirected_to family_exports_path
assert_equal "Export deleted successfully", flash[:notice]
end