Sha256: 3b692263bd652f32c2a331e43a036275109399396dc4800cec2cb54003de1a28

Contents?: true

Size: 1.22 KB

Versions: 1

Compression:

Stored size: 1.22 KB

Contents

%h1
  <%= model_name(:human_plural).capitalize %>

.tools
  = link_to 'Add <%= model_name(:human) %>', <%= wui.path(:new) %>, class: 'tools__button is_primary'
<% wui.custom_actions.select(&:collection?).each do |action| -%>
  = link_to '<%= action.name.humanize.titleize %>', <%= wui.path(action) %>, class: 'tools__button'
<% end -%>

- if <%= model_name(:ivars) %>.any?
  %table.items
    <%- object_name = model_name(:variable) -%>
    - <%= model_name(:ivars) %>.each do |<%= object_name %>|
      %tr
        %td
          = link_to <%= object_name %>.to_s, <%= object_name %>, class: 'hyperlink'
        %td
          .items__actions
            = link_to 'Edit', <%= wui.path(:edit, object_name) %>, class: 'items__action'
            = link_to 'Destroy', <%= wui.path(:destroy, object_name) %>, method: :delete, class: 'items__action', confirm: 'Really destroy?'
          <%- wui.custom_actions.select(&:member?).each do |action| -%>
            = link_to '<%= action.name.humanize.titleize %>', <%= wui.path(action, object_name) %>, class: 'items__action'<%=
                ", method: :#{action.method}" unless action.get?
              %>
          <%- end -%>

- else
  %p.help-block
    There are no <%= model_name(:human_plural) %> yet.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
katapult-0.1.0 lib/generators/katapult/haml/templates/index.html.haml