%#
# @file
# Synapse creation form. OOOOOLD!
# TODO: Is it actually old, or is it in use?
# Can probably be removed, otherwise:
# TODO: What URL is this?
#%>
<%= form_for @synapse, url: synapse_url do |form| %>
Edit Synapse
<% if Topic.visibleToUser(user, nil).count > 0 %>
Choose First Topic
<%= select "node1_id", "node1", Topic.order("name ASC").visibleToUser(user, nil).map {|p| [ p.name, p.id ] }, { :selected => @synapse.node1_id } %>
<% end %>
Directionality of the Connection
<%= form.select :category, options_for_select(['none', 'both', 'from-to'], @synapse.category) %>
Describe The Connection
<%= form.text_field :desc, class: "description" %>
<% if Topic.visibleToUser(user, nil).count > 0 %>
Choose Second Topic
<%= select "node2_id", "node2", Topic.order("name ASC").visibleToUser(user, nil).map {|p| [ p.name, p.id ] }, { :selected => @synapse.node2_id } %>
<% end %>
<% if @synapse.user == user %>
Permission
<%= form.select :permission, options_for_select(['commons', 'public', 'private'], @synapse.permission) %>
<% end %>
<%= form.submit "Update", class: "update" %>
<% end %>