Sha256: d6741c56fe1475df14c46ce95652b551b5c1d9efa9c60c0741e7fcbd381b33bb
Contents?: true
Size: 1.53 KB
Versions: 19
Compression:
Stored size: 1.53 KB
Contents
<thead class="bg-white border-b border-gray-200 pb-1"> <% if @resource.record_selector %> <th class="rounded-lg"> <%== item_select_all_input %> </th> <% end %> <% fields.each_with_index do |field, index| %> <% if params[:sort_by] == field.id.to_s if params[:sort_direction] == 'asc' sort_by = nil else sort_by = field.id end if sort_by.present? case params[:sort_direction] when nil sort_direction = 'desc' when 'desc' sort_direction = 'asc' when 'asc' sort_direction = nil end else sort_direction = nil end else sort_by = field.id sort_direction = 'desc' end classes = "text-gray-500 tracking-tight leading-tight text-sm font-semibold" %> <th class="text-left uppercase px-3 py-4 whitespace-nowrap rounded-l"> <% if field.sortable %> <%= link_to params.permit!.merge(sort_by: sort_by, sort_direction: sort_direction), class: "flex items-center #{classes} #{'cursor-pointer' if field.sortable}", 'data-turbo-frame': params[:turbo_frame] do %> <%= field.name %> <%= render partial: 'avo/partials/sortable_component', locals: {field: field} %> <% end %> <% else %> <div class="flex items-center <%= classes %>"> <%= field.name %> </div> <% end %> </th> <% end %> <th class="w-24"> <!-- Item controls cell --> </th> </thead>
Version data entries
19 entries across 19 versions & 1 rubygems