25 lines
1.2 KiB
Text
25 lines
1.2 KiB
Text
<%#
|
|
# @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| %>
|
|
<h3>Edit Synapse</h3>
|
|
<% if Topic.visibleToUser(user, nil).count > 0 %>
|
|
<label for="node1_id">Choose First Topic</label>
|
|
<%= select "node1_id", "node1", Topic.order("name ASC").visibleToUser(user, nil).map {|p| [ p.name, p.id ] }, { :selected => @synapse.node1_id } %>
|
|
<% end %>
|
|
<label for="metacode">Directionality of the Connection</label>
|
|
<%= form.select :category, options_for_select(['none', 'both', 'from-to'], @synapse.category) %>
|
|
<label for="topic_desc">Describe The Connection</label>
|
|
<%= form.text_field :desc, class: "description" %>
|
|
<% if Topic.visibleToUser(user, nil).count > 0 %>
|
|
<label for="node2_id">Choose Second Topic</label>
|
|
<%= select "node2_id", "node2", Topic.order("name ASC").visibleToUser(user, nil).map {|p| [ p.name, p.id ] }, { :selected => @synapse.node2_id } %>
|
|
<% end %>
|
|
<label for="synapse_permission">Permission</label>
|
|
<%= form.select :permission, options_for_select(['commons', 'public', 'private'], @synapse.permission) %>
|
|
<%= form.submit "Update", class: "update" %>
|
|
<% end %>
|