mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
63 lines
2.1 KiB
Text
63 lines
2.1 KiB
Text
<% content_for :title, "Points" %>
|
|
|
|
<div class="w-full">
|
|
<%= form_with url: points_path, method: :get do |f| %>
|
|
<div class="flex flex-col md:flex-row md:space-x-4 md:items-end">
|
|
<div class="w-full md:w-1/3">
|
|
<div class="flex flex-col space-y-2">
|
|
<%= f.label :start_at, class: "text-sm font-semibold" %>
|
|
<%= f.datetime_local_field :start_at, class: "rounded-md w-full", value: @start_at %>
|
|
</div>
|
|
</div>
|
|
<div class="w-full md:w-1/3">
|
|
<div class="flex flex-col space-y-2">
|
|
<%= f.label :end_at, class: "text-sm font-semibold" %>
|
|
<%= f.datetime_local_field :end_at, class: "rounded-md w-full", value: @end_at %>
|
|
</div>
|
|
</div>
|
|
<div class="w-full md:w-1/3">
|
|
<div class="flex flex-col space-y-2">
|
|
<%= f.submit "Search", class: "px-4 py-2 bg-blue-500 text-white rounded-md" %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class='text-center my-5'>
|
|
<%= will_paginate @points %>
|
|
</div>
|
|
|
|
<div id="points" class="min-w-full">
|
|
<div data-controller='checkbox-select-all'>
|
|
<%= form_with url: bulk_destroy_points_path, method: :delete, id: :bulk_destroy_form do |f| %>
|
|
<%= 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?" } %>
|
|
<table class='table'>
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<%= label_tag do %>
|
|
Select all
|
|
<%= check_box_tag 'Select all',
|
|
id: :select_all_points,
|
|
data: {
|
|
checkbox_select_all_target: 'parent',
|
|
action: 'change->checkbox-select-all#toggleChildren'
|
|
}
|
|
%>
|
|
<% end %>
|
|
</div>
|
|
</th>
|
|
<th>Recorded At</th>
|
|
<th>Coordinates</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @points.each do |point| %>
|
|
<%= render point %>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|