%h1= "Template for #{@bag.name}" %hr - unless @template.parsed_data.empty? %table %thead %tr %td Field Name %td Field Type %td %tbody - @template.parsed_data.each do |key, value| %tr %td= key %td= value %td %form.tabled{ action: delete_data_bag_template_item_path, method: 'post' } %input{ type: 'hidden', name: 'data_bag_template_item[name]', value: key } %button.button.alert.tiny{ type: 'submit' } Delete - else No Fields %hr %h3 New Field %form{ action: create_data_bag_template_item_path, method: 'post' } .row .large-2.columns %label.right.inline{ for: 'data_bag_template_item_name' } Name .large-10.columns %input{ type: 'text', id: 'data_bag_template_item_name', name: 'data_bag_template_item[name]', placeholder: 'Name' } .row .large-2.columns %label.right.inline{ for: 'data_bag_template_item_type' } Type .large-10.columns %select{ id: 'data_bag_template_item_type', name: 'data_bag_template_item[type]'} %option{value: "text"} Text %option{value: "array"} Array %option{value: "password"} Password .row .large-2.columns .large-10.columns %button.button.small{ type: 'submit' } Submit