mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
Display number of points found on the Points page
This commit is contained in:
parent
3592f46492
commit
f81e119283
2 changed files with 5 additions and 0 deletions
|
|
@ -17,6 +17,8 @@ class PointsController < ApplicationController
|
|||
|
||||
@start_at = Time.zone.at(start_at)
|
||||
@end_at = Time.zone.at(end_at)
|
||||
|
||||
@points_number = @points.except(:limit, :offset).size
|
||||
end
|
||||
|
||||
def bulk_destroy
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@
|
|||
|
||||
<div class="flex justify-between my-5">
|
||||
<%= f.submit "Delete Selected", class: "px-4 py-2 bg-red-500 text-white rounded-md", data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" } %>
|
||||
<div class="flex justify-center">
|
||||
<%= @points_number %> points found
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<span class="mr-2">Order by:</span>
|
||||
<%= link_to 'Newest', points_path(order_by: :desc), class: 'btn btn-xs btn-primary mx-1' %>
|
||||
|
|
|
|||
Loading…
Reference in a new issue