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.

47 lines
1.5 KiB

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