mirror of
https://github.com/rickbarrette/redmine_qbo_vehicles.git
synced 2026-11-18 02:40:37 -05:00
Vehicles paged by Redmine instead of will_paginate
The vehicle search, a customer's vehicles and the customer page's vehicle list use Redmine's paginator (will_paginate came from redmine_qbo's Gemfile, which no longer has it). The customer page's list keeps its own page parameter, without per-page links, and lists vehicles by year, make and model. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
53991ed087
commit
d842b9b724
4 files changed
+22
-9
No files matched your search
@@ -40,11 +40,12 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="actions">
|
||||
<%= will_paginate vehicles, param_name: (local_assigns[:page_param] || :page) %>
|
||||
</div>
|
||||
<%# pages: a Redmine::Pagination::Paginator for the list (count: how many in all); per_page_links: false to leave out "Per page" %>
|
||||
<% if local_assigns[:pages] %>
|
||||
<span class="pagination"><%= pagination_links_full pages, count, per_page_links: local_assigns[:per_page_links] %></span>
|
||||
<% end %>
|
||||
|
||||
<%=t(:label_matching)%> <%= vehicles.respond_to?(:total_entries) ? vehicles.total_entries : vehicles.size %> <%=t(:field_vehicles) %>
|
||||
<%=t(:label_matching)%> <%= local_assigns[:count] || vehicles.size %> <%=t(:field_vehicles) %>
|
||||
|
||||
<% else %>
|
||||
<p><%=t(:label_no_vehicles)%> <%= params[:search] %>.</p>
|
||||
|
||||
Reference in new issue
Block a user