Browse Source

search_field seems ok

main
pvincent 4 months ago
parent
commit
f0ae0eef99
  1. 2
      app/views/scores/_score.html.erb
  2. 9
      app/views/scores/_scores.html.erb

2
app/views/scores/_score.html.erb

@ -1,6 +1,6 @@
<tr class="text-sm even:bg-gray-100 dark:even:bg-gray-600 dark:text-gray-200">
<td class="px-2 w-1/2">
<%= score.name %>
<%= highlight(score.name, params.dig(:q,:name_cont)) %>
</td>
<td class="px-2 ">
<%= score.grade %>

9
app/views/scores/_scores.html.erb

@ -1,4 +1,13 @@
<%= turbo_frame_tag :scores do %>
<%= search_form_for @q do |f| %>
<%= f.label :name_cont %>
<%= f.search_field :name_cont %>
<%= f.submit %>
<% end %>
<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">
<thead>
<tr class="whitespace-nowrap text-md text-left font-semibold text-gray-800 dark:text-gray-200 bg-gray-100 dark:bg-gray-700">

Loading…
Cancel
Save