metamaps--metamaps/app/views/synapses/new.html.erb

17 lines
720 B
Text
Raw Normal View History

<div class="newsynapses">
2012-10-18 00:51:54 +00:00
<%= form_for @synapse, url: synapses_url do |form| %>
<h3>Add Synapse Between Items</h3>
<%= hidden_field_tag(:category, "Item") %>
<% if @allitems.count > 0 %>
<label for="node1_id">Choose First Item</label>
<%= select_tag :node1_id, options_from_collection_for_select(@allitems, "id", "name") %>
<% end %>
<label for="item_desc">Describe The Connection</label>
<%= form.text_field :desc, class: "description" %>
<% if @allitems.count > 0 %>
<label for="node2_id">Choose Second Item</label>
<%= select_tag :node2_id, options_from_collection_for_select(@allitems, "id", "name") %>
<% end %>
<%= form.submit "Add Synapse", class: "add" %>
<% end %>
</div>