-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #149 from pulibrary/140-pagination
Add pagination, sort-by, and date filter
- Loading branch information
Showing
7 changed files
with
290 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
<main class="px-4 py-20 sm:px-6 lg:px-8"> | ||
<div class="mx-auto max-w-2xl"> | ||
<.flash_group flash={@flash} /> | ||
<%= @inner_content %> | ||
</div> | ||
<main class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8"> | ||
<.flash_group flash={@flash} /> | ||
<%= @inner_content %> | ||
</main> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
defmodule DpulCollectionsWeb.Live.Helpers do | ||
# Remove KV pairs with nil or empty string values | ||
def clean_params(params) do | ||
params | ||
|> Enum.reject(fn {_, v} -> v == "" end) | ||
|> Enum.reject(fn {_, v} -> is_nil(v) end) | ||
|> Enum.into(%{}) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.