Sha256: 9d3fc7ad5f1933c3f967f4785df797fd22964e34dc598d8c0aba6c570d1a14b8

Contents?: true

Size: 1.21 KB

Versions: 11

Compression:

Stored size: 1.21 KB

Contents

<%# locals: (details:) -%>

<%=
  render_component :toolbar, resource: details.record,
                             actions: details.actions.record_actions.permitted_for(policy(details.record))
%>

<%= render_component :block, rounded: :all do %>
  <div class="p-4">
    <dl class="divide-y divide-gray-100">
      <% details.fields.each do |name, renderer| %>
        <%#
          TODO:
          For now, we are hacking around the need to call #with before #label
          This proves there's an issue with the rendering api.
          While I think of an elegant solution, this works for now.
        %>
        <% renderer.with(record: details.record) %>
        <div class="py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
          <dt class="text-sm font-medium leading-6 text-gray-900 dark:text-gray-300">
            <%= renderer.label %>
          </dt>
          <dd class="mt-1 text-sm leading-6 text-gray-700 dark:text-gray-200 sm:col-span-2 sm:mt-0">
            <%= render renderer %>
          </dd>
        </div>
      <% end %>
    </dl>
  </div>
<% end %>

<% if present_associations? %>
  <% details.associations.each do |name, renderer| %>
    <%= render renderer.with(record: details.record) %>
  <% end %>
<% end %>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
plutonium-0.14.1 app/views/resource/_resource_details.html.erb
plutonium-0.14.0 app/views/resource/_resource_details.html.erb
plutonium-0.13.3 app/views/resource/_resource_details.html.erb
plutonium-0.13.2 app/views/resource/_resource_details.html.erb
plutonium-0.13.1 app/views/resource/_resource_details.html.erb
plutonium-0.13.0 app/views/resource/_resource_details.html.erb
plutonium-0.12.14 app/views/resource/_resource_details.html.erb
plutonium-0.12.13 app/views/resource/_resource_details.html.erb
plutonium-0.12.12 app/views/resource/_resource_details.html.erb
plutonium-0.12.11 app/views/resource/_resource_details.html.erb
plutonium-0.12.10 app/views/resource/_resource_details.html.erb