Sha256: 14a4d49c985d10cff7b78d82688cab6631040eac72c6b5d8b57139a9a858cf8a
Contents?: true
Size: 1.12 KB
Versions: 3
Compression:
Stored size: 1.12 KB
Contents
<% if @layout == :default && @options.present? %> <span class="p-2 flex hover:bg-gray-50 rounded-md"> <span class="w-1/2"><%= @row_title %></span> <span class="w-1/2 text-right"> <% @options.each do |option| %> <label class="px-2 cursor-pointer"> <%= @form.check_box(@method.to_s, { checked: @form.object.try(@method.to_sym)&.include?(option[:id]), multiple: true }, option[:id], nil)%> <span class="capitalize"><%= option[:label] %></span> </label> <% end %> </span> </span> <% end %> <% if @layout == :subsection && @options.present? %> <div class="hover:bg-gray-50 rounded-md"> <div class="font-semibold px-2 py-2 mt-2 mb-1"><%= @row_title %></div> <div class="px-4"> <% @options.each do |option| %> <div class="py-1"> <label class="cursor-pointer"> <%= @form.check_box(@method.to_s, { checked: @form.object.try(@method.to_sym)&.include?(option[:id]), multiple: true }, option[:id], nil)%> <span class="capitalize"><%= option[:label] %></span> </label> </div> <% end %> </div> </div> <% end %>
Version data entries
3 entries across 3 versions & 1 rubygems