Sha256: bd9ee9b550c6beb9204fc5cc07d1d726441c74119a875ca080522a673076b0ad

Contents?: true

Size: 1.18 KB

Versions: 28

Compression:

Stored size: 1.18 KB

Contents

%h2 <%= @name.human.pluralize %>

= link_to 'New <%= @name.human.downcase %>', new_cms_<%= @name.element %>_path

%table.table
  %thead
    %tr
      %th Id
<% @type.attributes.each do |attribute| -%>
      %th <%= attribute.name.humanize %>
<% end -%>
      %th

  %tbody
    - @<%= @name.collection %>.each do |<%= @name.element %>|
      %tr
        %td= <%= @name.element %>.id
<% @type.attributes.each do |attribute| -%>
<% if attribute.reference? -%>
        %td
          - if <%= @name.element %>.<%= attribute.name %>.present?
            = link_to <%= @name.element %>.<%= attribute.name %>.<%= attribute.options['reference_label'] %>, cms_<%= attribute.reference_to.model_name.element %>_path(<%= @name.element %>.<%= attribute.name %>)
<% elsif attribute.format.file? -%>
        %td
          %img{src: <%= @name.element %>.<%= attribute.name %>}
<% else -%>
        %td= <%= @name.element %>.<%= attribute.name %>
<% end -%>
<% end -%>
        %td
          = link_to 'Edit', edit_cms_<%= @name.element %>_path(<%= @name.element %>)
          = link_to 'Destroy', cms_<%= @name.element %>_path(<%= @name.element %>), confirm: 'are you sure?', method: 'delete'

= paginate @<%= @name.collection %>

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
honey-cms-0.4.8 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.4.7 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.4.6 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.4.5 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.4.2 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.4.1 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.4.0 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.3.13 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.3.12 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.3.11 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.3.10 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.3.9 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.3.8 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.3.7 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.3.5 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.3.4 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.3.3 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.3.2 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.3.1 lib/generators/cms/templates/views/index.html.haml
honey-cms-0.3.0 lib/generators/cms/templates/views/index.html.haml