You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.9 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
  1. INPUT:
  2. <input data-controller="hot-search" type='text' data-action='input->hot-search#debouncedSearch'/>
  3. <hr/>
  4. <%= pagy_search_field(@q, :name_cont, class: "text-sm w-full h-8 text-gray-800 dark:text-gray-400 bg-gray-200 dark:bg-gray-700") %>
  5. <%= search_form_for @q do |f| %>
  6. <%= f.label :name_cont %>
  7. <%= f.search_field :name_cont %>
  8. <%= f.submit %>
  9. <% end %>
  10. <%=turbo_frame_tag :scores do %>
  11. <table class="min-w-full divide-gray-300 dark:divide-gray-500 divide-y-4 border-gray-200 dark:border-gray-600 border-2 dark:bg-gray-600">
  12. <thead>
  13. <tr class="whitespace-nowrap text-md text-left font-semibold text-gray-800 dark:text-gray-200 bg-gray-100 dark:bg-gray-700">
  14. <th scope="col" class="p-2">
  15. <%= pagy_sort_link(@q, :name) %>
  16. </th>
  17. <th scope="col" class="p-2">
  18. <%= pagy_sort_link(@q, :grade) %>
  19. </th>
  20. <th scope="col" class="p-2">
  21. <%= pagy_sort_link(@q, :created_at) %>
  22. </th>
  23. <th scope="col" class="p-2 m-5 flex justify-end">
  24. Actions
  25. </th>
  26. </tr>
  27. <tr class="text-gray-800 bg-gray-100 dark:bg-gray-600 dark:text-gray-200">
  28. <th class='p-1'>
  29. <%= pagy_search_field(@q, :name_cont, class: "text-sm w-full h-8 text-gray-800 dark:text-gray-400 bg-gray-200 dark:bg-gray-700") %>
  30. <input data-controller="hot-search" type='text' data-action='keypress->hot-search#debouncedSearch'/>
  31. </th>
  32. <th class='p-1'>
  33. </th>
  34. <th class='p-1'>
  35. </th>
  36. <th class='p-1'>
  37. </th>
  38. </tr>
  39. </thead>
  40. <tbody class="bg-gray-100 dark:bg-gray-700 divide-y divide-gray-200 dark:divide-gray-500 ">
  41. <%= render @scores %>
  42. </tbody>
  43. </table>
  44. <div class="flex flex-col items-center justify-center text-sm text-gray-500 my-5 gap-2">
  45. <%== pagy_nav @pagy %>
  46. <%== pagy_info @pagy %>
  47. </div>
  48. <%end%>