Fix handling of the added query parameter everywhere

This commit is contained in:
SeinopSys 2020-07-19 21:00:43 +02:00 committed by byte[]
parent 39ff35c089
commit 2c121c80c8
4 changed files with 8 additions and 4 deletions

View file

@ -3,7 +3,8 @@ h1
= @fingerprint
- route = fn p -> Routes.fingerprint_profile_tag_change_path(@conn, :index, @fingerprint, p) end
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn
- params = if @conn.params["added"] do [added: @conn.params["added"]] else nil end
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: params
.block
.block__header

View file

@ -3,7 +3,8 @@ h1
= @ip
- route = fn p -> Routes.ip_profile_tag_change_path(@conn, :index, to_string(@ip), p) end
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn
- params = if @conn.params["added"] do [added: @conn.params["added"]] else nil end
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: params
.block
.block__header

View file

@ -4,7 +4,8 @@ h1
= @user.name
- route = fn p -> Routes.profile_tag_change_path(@conn, :index, @user, p) end
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: [added: @conn.params["added"]]
- params = if @conn.params["added"] do [added: @conn.params["added"]] else nil end
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: params
.block
.block__header

View file

@ -4,7 +4,8 @@ h1
= @tag.name
- route = fn p -> Routes.tag_tag_change_path(@conn, :index, @tag, p) end
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: [added: @conn.params["added"]]
- params = if @conn.params["added"] do [added: @conn.params["added"]] else nil end
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: params
.block
.block__header