Sha256: 010c0c46ae694cd764ea0bcc570c988e80ef1ee1ff2115037357262b59952987

Contents?: true

Size: 1002 Bytes

Versions: 2

Compression:

Stored size: 1002 Bytes

Contents

<h1><%= @group.display_name %></h1>

<p>
  <% link_to "/admin/groups/#{@group.id}/records/new", class: "ui primary small button" do %>
    <i class="icon plus"></i><%= "New #{@group.display_name.singularize}" %>
  <% end %>
</p>

<table class="ui single line table">
  <thead>
    <tr>
    <% if @group.text_fields.first(3).each do |field| %>
      <th><%= field.capitalize %></th>
    <% end.empty? %>
      <th>Name</th>
      <th>Summary</th>
    <% end %>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <% @group.records.each do |record| %>
    <tr>
    <% if @group.text_fields.first(3).each do |field| %>
      <td><%= record.content[field] %></td>
    <% end.empty? %>
      <td><%= record.display_name %></td>
      <td><%= record.content_summary %></td>
    <% end %>
      <td class="right aligned">
      <% link_to "/admin/groups/#{@group.id}/records/#{record.id}/edit" do %>
        <i class="icon edit"></i>Edit
      <% end %>
      </td>
    </tr>
    <% end %>
  </tbody>
</table>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vapid-0.1.1 lib/vapid/views/admin/records/index.html.erb
vapid-0.1.0 lib/vapid/views/admin/records/index.html.erb