Sha256: de814e0a99189d8f3713f3883de78de84e858894999a9d6375d89d682d5ccd62

Contents?: true

Size: 830 Bytes

Versions: 1

Compression:

Stored size: 830 Bytes

Contents

.page-header
  %h1= "#{@item_group.title} Items"
  .btn-toolbar
    .btn-group
      = link_to "New #{@item_group.title} item", cavy_new_item_path(group_id: @item_group.id), id: 'new-item', class: 'button primary small'

- if @items.count >= 1
  %table#item_group_items{ 'data-update-url' => cavy_update_order_item_group_path }
    %thead
      %tr
        - @item_group.params.each do |param|
          %th= param
        %th
        %th
    %tbody
      - @items.each do |item|
        %tr
        - @item_group.params.each do |param|
          %td= item.data[param]
        %td= link_to 'Edit', cavy_edit_item_path(item.id)
        %td= link_to 'Destroy', cavy_delete_item_path(item.id), :method => :delete, :data => { :confirm => 'Are you sure?' }, id: "delete-#{item.id}"

- else
  You don't have any items in this group yet.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cavy-0.1.0.beta1 app/views/cavy/item_groups/show.html.haml