Sha256: 7b161ce5319a1436996765e5484f9564934937722abcc34b51f323bcd12c567f

Contents?: true

Size: 1.38 KB

Versions: 5

Compression:

Stored size: 1.38 KB

Contents

<div class="row">
  <div class="small-12 columns">
    <h1><%= @type.title.pluralize 2 %></h1>
    <%= link_to("New #{@type.title}", new_content_path(type: @type.slug), class: 'button') if can? :create, Guts::Content %>
  </div>
</div>

<% if notice %>
  <div class="row">
    <div class="small-12 columns">
      <div class="callout success notice">
        <p><%= notice %></p>
      </div>
    </div>
  </div>
<% end %>

<div class="row">
  <div class="small-12 columns">
    <% if @contents.size > 0 %>
      <table>
        <tbody>
          <% @contents.each do |content| %>
            <tr>
              <td><%= content.title %><% if content.visible == 0 %>&nbsp;&nbsp;<i class="fa fa-eye-slash"></i><% end %></td>
              <td><small>Created on <%= content.created_at.strftime("%b #{content.created_at.day.ordinalize}, %Y") %></small></td>
              <td><small>Updated at <%= content.updated_at.strftime("%b #{content.updated_at.day.ordinalize}, %Y") %></small></td>
              <td align="right" class="action_links">
                <%= link_to('Edit', edit_content_path(content)) if can? :update, Guts::Content %>
                <%= link_to_destroy('Destroy', content) if can? :delete, Guts::Content %>
              </td>
            </tr>
          <% end %>
        </tbody>
      </table>
    <% else %>
      <p>No permissions have been assigned.</p>
    <% end %>
  </div>
</div>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
guts-2.1.0 app/views/guts/contents/index.html.erb
guts-2.0.2 app/views/guts/contents/index.html.erb
guts-2.0.1 app/views/guts/contents/index.html.erb
guts-2.0.0 app/views/guts/contents/index.html.erb
guts-1.4.0 app/views/guts/contents/index.html.erb