Sha256: 227f31ef518e2cf3c1e79ae0cbc1bf9a916f096df9eb06ae09f0f1315d7ac497

Contents?: true

Size: 1011 Bytes

Versions: 4

Compression:

Stored size: 1011 Bytes

Contents

.action-bar.-main.btn-group
  = link_to 'Add <%= model_name(:human) %>', <%= web_ui.path(:new) %>, class: 'btn btn-default'
<% web_ui.custom_actions.select(&:collection?).each do |action| -%>
  = link_to '<%= action.name.humanize.titleize %>', <%= web_ui.path(action) %>, class: 'btn btn-default'
<% end -%>

%h1.title
  <%= model_name(:humans).capitalize %>

- if <%= model_name(:ivars) %>.any?
  <%- object = model_name(:variable) -%>

  = table '<%= web_ui.model.label_attr.name(:human).titleize %>', 'Actions' do
    - <%= model_name(:ivars) %>.each do |<%= object %>|
      %tr(up-expand)
        %td(width='40%')
          = link_to <%= object %>, <%= object %>
        %td
          = link_to 'Edit', <%= web_ui.path(:edit, object) %>
          = link_to 'Destroy', <%= web_ui.path(:destroy, object) %>, method: :delete,
            class: 'text-danger',
            data: { confirm: 'Really destroy?' }, title: "Destroy #{<%= object %>}"

- else
  %p.help-block
    No <%= model_name(:humans) %> found.

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
katapult-0.5.0 lib/generators/katapult/views/templates/index.html.haml
katapult-0.4.1 lib/generators/katapult/views/templates/index.html.haml
katapult-0.4.0 lib/generators/katapult/views/templates/index.html.haml
katapult-0.3.0 lib/generators/katapult/views/templates/index.html.haml