2012-12-21 18:07:13 -05:00
|
|
|
<%= form_for @synapse, url: synapse_url do |form| %>
|
2012-10-09 20:23:45 -04:00
|
|
|
<h3>Edit Synapse</h3>
|
2013-01-01 17:45:35 -05:00
|
|
|
<% if Topic.visibleToUser(user, nil).count > 0 %>
|
2012-11-03 20:43:05 -04:00
|
|
|
<label for="node1_id">Choose First Topic</label>
|
2013-01-01 17:45:35 -05:00
|
|
|
<%= select "node1_id", "node1", Topic.order("name ASC").visibleToUser(user, nil).map {|p| [ p.name, p.id ] }, { :selected => @synapse.node1_id } %>
|
2012-10-09 20:23:45 -04:00
|
|
|
<% end %>
|
2013-01-01 17:45:35 -05:00
|
|
|
<label for="metacode">Directionality of the Connection</label>
|
2012-11-23 11:00:00 -08:00
|
|
|
<%= form.select :category, options_for_select(['none', 'both', 'from-to'], @synapse.category) %>
|
2013-01-01 17:45:35 -05:00
|
|
|
<label for="topic_desc">Describe The Connection</label>
|
2012-10-09 20:23:45 -04:00
|
|
|
<%= form.text_field :desc, class: "description" %>
|
2013-01-01 17:45:35 -05:00
|
|
|
<% if Topic.visibleToUser(user, nil).count > 0 %>
|
2012-11-03 20:43:05 -04:00
|
|
|
<label for="node2_id">Choose Second Topic</label>
|
2013-01-01 17:45:35 -05:00
|
|
|
<%= select "node2_id", "node2", Topic.order("name ASC").visibleToUser(user, nil).map {|p| [ p.name, p.id ] }, { :selected => @synapse.node2_id } %>
|
2012-10-09 20:23:45 -04:00
|
|
|
<% end %>
|
2012-10-26 06:04:52 -04:00
|
|
|
<label for="synapse_permission">Permission</label>
|
2012-10-27 04:30:56 -04:00
|
|
|
<%= form.select :permission, options_for_select(['commons', 'public', 'private'], @synapse.permission) %>
|
2012-10-09 20:23:45 -04:00
|
|
|
<%= form.submit "Update", class: "update" %>
|
|
|
|
<% end %>
|