You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's pretty trivial, but I was thinking this library should included something like this:
iex>Scrivener.HTML.pagination_info(%Scrivener.Page{total_pages: 10,page_number: 5,total_entries: 100,page_size: 10})|>Phoenix.HTML.safe_to_string()"<div class="pagination_info"> Showing 51 to 60 of 100 entries</div>"
It should be as simple as something like:
defpagination_info(paginator,name\\"entries")dotext=withfirst=(paginator.page_number-1)*paginator.page_size+1,last=min(paginator.page_number*paginator.page_size,paginator.total_entries),total=paginator.total_entries,do: "Showing #{first} to #{last} of #{total}#{name}"content_tag(:div,safe(text),class: "pagination_info")end
The text was updated successfully, but these errors were encountered:
But then what if the user wants this to be different text, or international? Its so simple to create my first thought is that this could cause more problems than it solves.
It's pretty trivial, but I was thinking this library should included something like this:
It should be as simple as something like:
The text was updated successfully, but these errors were encountered: