Sha256: f099617342149a1fc08ccf864e05284479040323f7e9239f78bb0c1cd2865e70

Contents?: true

Size: 1.87 KB

Versions: 3

Compression:

Stored size: 1.87 KB

Contents

<table>
  <tr>
    <th>Page</th>
    <th>Template</th>
    <th></th>
  </tr>

<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
  <tr>
    <td><strong><%%= link_to <%= singular_table_name %>.title, [:admin, <%= singular_table_name %>], :target => "_blank" %></strong></td>
    <td style="text-align:right;"><%%= link_to 'Edit', edit_admin_<%= singular_table_name %>_path(<%= singular_table_name %>), :class=>"button" %> <%%= link_to 'Destroy', [:admin, <%= singular_table_name %>], :confirm => 'Are you sure?', :method => :delete, :class=>"button" %></td>
  </tr>
  <%% unless <%= singular_table_name %>.menu.blank? %>
  <tr>
    <td><strong>Template:</strong>
    <td><%%= <%= singular_table_name %>.menu.template.titleize unless <%= singular_table_name %>.menu.blank? %></td>
  </tr>
  <%% end %>
  <%% if <%= singular_table_name %>.respond_to?(:blocks) %>
  <tr>
    <td colspan=1>
      <strong>Blocks:</strong>
    </td>      
    <td>
      <%% unless <%= singular_table_name %>.blocks.empty? %>
      <%%= <%= singular_table_name %>.blocks.each do |block| %>
        <strong><%%= link_to block.title, [:admin, block] %></strong> => <%%= block.region.titleize %><br />
        <%% end %>
      <%% end %>
    </td>
  </tr>
  <%% end %>
  
  <%% if <%= singular_table_name %>.respond_to?(:teaser) %>
  <tr>
    <td><strong>Teaser:</strong></td>
    <td><%%= <%= singular_table_name %>.teaser unless <%= singular_table_name %>.teaser.blank? %></td>
  </tr>
  <%% end %>
  <%% unless <%= singular_table_name %>.menu.blank? %>
      <tr>
        <td style="border-bottom:2px solid #333;">
          <strong>URL:</strong>
        </td>
        <td style="border-bottom:2px solid #333;">
          <%%= <%= singular_table_name %>.menu.url unless <%= singular_table_name %>.menu.blank? %></td>
        </td>
      </tr>
  <%% end %>
<%% end %>
</table>
<script>
    $('.button').button();
</script>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cable-0.8.6 lib/generators/cable/resource/templates/erb/scaffold/index.html.erb
cable-0.8.5 lib/generators/cable/resource/templates/erb/scaffold/index.html.erb
cable-0.8.4 lib/generators/cable/resource/templates/erb/scaffold/index.html.erb