pagination: refactor page limits.

Refactor page limits to a) be explicitly listed in the User class (not
hidden away in the Danbooru config) and b) explicitly depend on the
CurrentUser (not implicitly by way of Danbooru.config.max_numbered_pages).
This commit is contained in:
evazion
2021-01-11 20:09:52 -06:00
parent e9464d0ea5
commit ceeed1e692
7 changed files with 45 additions and 32 deletions

View File

@@ -8,7 +8,7 @@
<% if CurrentUser.is_platinum? %>
Try narrowing your search terms.
<% else %>
Try narrowing your search terms, or <%= link_to "upgrade your account", new_user_upgrade_path %> to go beyond page <%= Danbooru.config.max_numbered_pages %>.
Try narrowing your search terms, or <%= link_to "upgrade your account", new_user_upgrade_path %> to go beyond page <%= CurrentUser.user.page_limit %>.
<% end %>
</p>