Sha256: 61fd3da36c70cff7f0ee0fc3b6e217b83d4e2f6cea16e98438bdf9a79d139a89

Contents?: true

Size: 1.99 KB

Versions: 5

Compression:

Stored size: 1.99 KB

Contents

<div>
  <div>
    <%%= render "components/alert" %>
  </div>
  <div class="flow-root class-card-container">
    <div class="flex items-center p-2 mb-10">
      <div class="flex-auto">
        <h1 class="font-semibold text-gray-900">List <%= @subject_class %></h1>
        <p class="mt-2 text-sm text-gray-700">A list of all the <%= @subject_class %>.</p>
      </div>
      <div class="mt-4 sm:ml-16 sm:mt-0 sm:flex-none">
        <%%= link_to new_<%= [@route_scope_path, @scope_path.singularize].reject { |c| c.empty? }.join("_") %>_path do %>
          <button type="button" class="block class-button">Add user</button>
        <%% end %>
      </div>
    </div>
    <div class="overflow-x-auto sm:flex-auto">
      <div class="inline-block min-w-full align-middle">
        <table class="min-w-full divide-y divide-gray-300">
          <thead>
          <tr>
            <%% <%= @controllers.list_fields.map { |tc| [tc.titleize.to_s, ''] + [["Action", "text-center"]]}%>.each do |title, attr_class| %>
              <th scope="col" class="class-tr attr-class"><%%= title %></th>
            <%% end %>
            </th>
          </tr>
          </thead>
          <tbody class="divide-y bg-white">
          <%% @<%= @scope_path %>.response.each do |<%= @variable_subject %>| %>
            <tr>
<%@controllers.list_fields.each do |field| -%>
              <td class="class-td">
                <div class="flex items-center">
                  <div>
                    <div class="text-sm text-gray-900"><%%= <%= @variable_subject %>.<%=field %> %></div>
                  </div>
                </div>
              </td>
<%end-%>
              <td class="class-td text-center">
                <%%= render "components/link_action", key: "<%= [@route_scope_path, @variable_subject].reject { |c| c.empty? }.join("_") %>", value: <%= @variable_subject %>, actions: [:show, :edit, :destroy] %>
              </td>
            </tr>
          <%% end %>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</div>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sun-sword-0.0.6 lib/generators/sun_sword/templates_scaffold/views/index.html.erb.tt
sun-sword-0.0.5 lib/generators/sun_sword/templates_scaffold/views/index.html.erb.tt
sun-sword-0.0.4 lib/generators/sun_sword/templates_scaffold/views/index.html.erb.tt
sun-sword-0.0.3 lib/generators/sun_sword/templates_scaffold/views/index.html.erb.tt
sun-sword-0.0.2 lib/generators/sun_sword/templates_scaffold/views/index.html.erb.tt