Sha256: eeb211a2738552458a07fdb10bd40af401b600e0da43c87aa1d7f2ac97c951f9

Contents?: true

Size: 1.53 KB

Versions: 15

Compression:

Stored size: 1.53 KB

Contents

<%= render PandaCms::Admin::ContainerComponent.new do |component| %>
  <% component.with_heading(text: form.name, level: 1) do |heading| %>
  <% end %>

  <div class="overflow-x-auto -mx-4 rounded-lg ring-1 sm:mx-0 sm:rounded-lg ring-mid">
    <table class="min-w-full divide-y divide-gray-300 border-collapse table-auto">
      <thead>
        <tr>
          <% fields.each do |field, title| %>
          <th scope="col" class="py-3.5 px-3 text-sm font-semibold text-left text-gray-900"><%= title %></th>
          <% end %>
          <th scope="col" class="py-3.5 px-3 text-sm font-semibold text-left text-gray-900">Submitted</th>
        </tr>
      </thead>
      <tbody class="bg-white divide-y divide-gray-200">
        <% submissions.each do |submission| %>
        <tr class="relative bg-white cursor-pointer hover:bg-gray-50">
          <% fields.each do |field| %>
          <td class="py-5 px-3 text-sm text-gray-500">
            <% if field[0] == "email" || field[0] == "email_address" %>
              <a href="mailto:<%= submission.data[field[0]] %>" class="border-b border-gray-500 hover:text-gray-900"><%= submission.data[field[0]] %></a>
            <% else %>
              <%= simple_format(submission.data[field[0]]) %>
            <% end %>
          </td>
          <% end %>
          <td class="py-5 px-3 text-sm text-gray-500 whitespace-nowrap">
            <div class="text-gray-500"><%= time_ago_in_words(submission.created_at) %> ago</div>
          </td>
        </tr>
        <% end %>
      </tbody>
    </table>
  </div>
<% end %>

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
panda_cms-0.6.3 app/views/panda_cms/admin/forms/show.html.erb
panda_cms-0.6.2 app/views/panda_cms/admin/forms/show.html.erb
panda_cms-0.6.1 app/views/panda_cms/admin/forms/show.html.erb
panda_cms-0.6.0 app/views/panda_cms/admin/forms/show.html.erb
panda_cms-0.5.10 app/views/panda_cms/admin/forms/show.html.erb
panda_cms-0.5.9 app/views/panda_cms/admin/forms/show.html.erb
panda_cms-0.5.8 app/views/panda_cms/admin/forms/show.html.erb
panda_cms-0.5.7 app/views/panda_cms/admin/forms/show.html.erb
panda_cms-0.5.6 app/views/panda_cms/admin/forms/show.html.erb
panda_cms-0.5.5 app/views/panda_cms/admin/forms/show.html.erb
panda_cms-0.5.4 app/views/panda_cms/admin/forms/show.html.erb
panda_cms-0.5.3 app/views/panda_cms/admin/forms/show.html.erb
panda_cms-0.5.2 app/views/panda_cms/admin/forms/show.html.erb
panda_cms-0.5.1 app/views/panda_cms/admin/forms/show.html.erb
panda_cms-0.5.0 app/views/panda_cms/admin/forms/show.html.erb