Sha256: c5fbfc1bee1c3b91948d6523e729ea0a474dd8280b72a520ec436f0a4b631213
Contents?: true
Size: 1.38 KB
Versions: 12
Compression:
Stored size: 1.38 KB
Contents
<% if view_templates.many? %> <%= render Spina::UserInterface::DropdownComponent.new do |dropdown| %> <% dropdown.button(classes: "btn btn-primary w-full") do %> <%= helpers.heroicon("plus", style: :solid, class: "w-7 h-7 -ml-2") %> <%=t 'spina.pages.new' %> <% end %> <% dropdown.menu do %> <% view_templates.each do |template| %> <%= link_to helpers.spina.new_admin_page_path(view_template: template.name, resource_id: @resource&.id), class: "block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900", data: {turbo_frame: "modal", action: "reveal#hide"} do %> <div class="font-medium text-gray-700"> <%= template.title %> <% if template.recommended %> <span class="text-green-500 text-xs"><%=t 'spina.pages.recommended' %></span> <% end %> </div> <div class="text-gray-400"><%= template.description %></div> <% end %> <% end %> <% end %> <% end %> <% else %> <%= link_to helpers.spina.new_admin_page_path(view_template: view_template.name, resource_id: resource&.id), class: "btn btn-primary w-full", data: {turbo_frame: "modal"} do %> <%= helpers.heroicon("plus", style: :solid, class: "w-7 h-7 -ml-2") %> <%=t 'spina.pages.new' %> <% end %> <% end %>
Version data entries
12 entries across 12 versions & 1 rubygems