2013-01-11 23:49:59 +00:00
|
|
|
<%#
|
|
|
|
# @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?
|
|
|
|
#%>
|
2012-12-21 23:07:13 +00:00
|
|
|
<%= form_for @synapse, url: synapse_url do |form| %>
|
2012-10-10 00:23:45 +00:00
|
|
|
<h3>Edit Synapse</h3>
|
2013-01-01 22:45:35 +00:00
|
|
|
<% if Topic.visibleToUser(user, nil).count > 0 %>
|
2012-11-04 00:43:05 +00:00
|
|
|
<label for="node1_id">Choose First Topic</label>
|
2013-01-01 22:45:35 +00:00
|
|
|
<%= select "node1_id", "node1", Topic.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 %>
|
2013-01-01 22:45:35 +00:00
|
|
|
<label for="metacode">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) %>
|
2013-01-01 22:45:35 +00:00
|
|
|
<label for="topic_desc">Describe The Connection</label>
|
2012-10-10 00:23:45 +00:00
|
|
|
<%= form.text_field :desc, class: "description" %>
|
2013-01-01 22:45:35 +00:00
|
|
|
<% if Topic.visibleToUser(user, nil).count > 0 %>
|
2012-11-04 00:43:05 +00:00
|
|
|
<label for="node2_id">Choose Second Topic</label>
|
2013-01-01 22:45:35 +00:00
|
|
|
<%= select "node2_id", "node2", Topic.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 %>
|
2013-01-23 18:43:01 +00:00
|
|
|
<% if @synapse.user == user %>
|
|
|
|
<label for="synapse_permission">Permission</label>
|
|
|
|
<%= form.select :permission, options_for_select(['commons', 'public', 'private'], @synapse.permission) %>
|
|
|
|
<% end %>
|
2012-10-10 00:23:45 +00:00
|
|
|
<%= form.submit "Update", class: "update" %>
|
2013-01-11 23:49:59 +00:00
|
|
|
<% end %>
|