<%= form_for @synapse, url: user_synapses_url do |form| %>
Add Synapse Between Topics
<% if Item.visibleToUser(user, nil).count > 0 %>
<%= select_tag :node1_id, options_from_collection_for_select(Item.order("name ASC").visibleToUser(user, nil), "id", "name") %>
<% end %>
<%= form.select :category, options_for_select(['none', 'both', 'from-to']) %>
<%= form.text_field :desc, class: "description" %>
<% if Item.visibleToUser(user, nil).count > 0 %>
<%= select_tag :node2_id, options_from_collection_for_select(Item.order("name ASC").visibleToUser(user, nil), "id", "name") %>
<% end %>
<%= form.select(:permission, options_for_select(['commons', 'public', 'private'])) %>
<%= form.submit "Add Synapse", class: "add" %>
<% end %>