2013-01-11 23:49:59 +00:00
|
|
|
<%#
|
|
|
|
# @file
|
|
|
|
# Synapse creation form
|
|
|
|
# I think this code is no longer in use.
|
|
|
|
# TODO: Am I correct?
|
|
|
|
#%>
|
2012-10-28 18:37:46 +00:00
|
|
|
<div class="newsynapses">
|
2012-12-21 23:07:13 +00:00
|
|
|
<%= form_for @synapse, url: synapses_url do |form| %>
|
2012-10-28 18:37:46 +00:00
|
|
|
<h3>Add Synapse Between Topics</h3>
|
2013-01-01 22:45:35 +00:00
|
|
|
<% if Topic.visibleToUser(user, nil).count > 0 %>
|
2012-11-04 00:14:21 +00:00
|
|
|
<label for="node1_id">Choose First Topic</label>
|
2013-01-01 22:45:35 +00:00
|
|
|
<%= select_tag :node1_id, options_from_collection_for_select(Topic.order("name ASC").visibleToUser(user, nil), "id", "name") %>
|
2012-10-28 18:37:46 +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']) %>
|
2013-01-01 22:45:35 +00:00
|
|
|
<label for="topic_desc">Describe The Connection</label>
|
2012-10-28 18:37:46 +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:14:21 +00:00
|
|
|
<label for="node2_id">Choose Second Topic</label>
|
2013-01-01 22:45:35 +00:00
|
|
|
<%= select_tag :node2_id, options_from_collection_for_select(Topic.order("name ASC").visibleToUser(user, nil), "id", "name") %>
|
2012-10-28 18:37:46 +00:00
|
|
|
<% end %>
|
|
|
|
<label for="synapse_permission">Permission</label>
|
|
|
|
<%= form.select(:permission, options_for_select(['commons', 'public', 'private'])) %>
|
|
|
|
<%= form.submit "Add Synapse", class: "add" %>
|
|
|
|
<% end %>
|
2013-01-11 23:49:59 +00:00
|
|
|
</div>
|