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