Sha256: 6d72dbf98538f0c622ad7aabf44c6cac0777dfb8f661ab0dc1514f9700a65566

Contents?: true

Size: 1.08 KB

Versions: 4

Compression:

Stored size: 1.08 KB

Contents

<% pl_table_name = plural_table_name.gsub('cms_','') -%>
<% sg_table_name = singular_table_name.gsub('cms_','') -%>
%h1= t('cms.<%= pl_table_name %>')

.row-fluid.actions
  .pull-right.padded
    = link_to new_cms_<%= sg_table_name %>_path, :class => 'btn btn-primary' do
      %i.icon-plus-sign.icon-white
      #{ t('cms.new') } <%= human_name %>

%table.table.table-bordered.table-striped
  %tr
<% for attribute in attributes -%>
    %th= t('cms.<%= attribute.human_name %>')
<% end -%>
    %th
    %th
    %th

  - @<%= plural_table_name %>.each do |<%= singular_table_name %>|
    %tr
<% for attribute in attributes -%>
      %td= <%= singular_table_name %>.<%= attribute.name %>
<% end -%>
      %td= link_to t('cms.show'), <%= singular_table_name %>_path(<%= singular_table_name %>)
      %td= link_to t('cms.edit'), edit_<%= singular_table_name %>_path(<%= singular_table_name %>)
      %td= link_to t('cms.destroy'), <%= singular_table_name %>_path(<%= singular_table_name %>), <%= key_value :method, ":delete" %>, <%= key_value :data, "{ #{key_value :confirm, "t('cms.are_you_sure')"} }" %>

%br

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
shoestrap-0.0.4 templates/haml/scaffold/index.html.haml
shoestrap-0.0.3 templates/haml/scaffold/index.html.haml
shoestrap-0.0.2 templates/haml/scaffold/index.html.haml
shoestrap-0.0.2.pre templates/haml/scaffold/index.html.haml