20 lines
No EOL
1.1 KiB
Text
20 lines
No EOL
1.1 KiB
Text
<div class="newsynapses">
|
|
<%= form_for @synapse, url: synapses_url do |form| %>
|
|
<h3>Add Synapse Between Topics</h3>
|
|
<% if Topic.visibleToUser(user, nil).count > 0 %>
|
|
<label for="node1_id">Choose First Topic</label>
|
|
<%= select_tag :node1_id, options_from_collection_for_select(Topic.order("name ASC").visibleToUser(user, nil), "id", "name") %>
|
|
<% end %>
|
|
<label for="metacode">Directionality of the Connection</label>
|
|
<%= form.select :category, options_for_select(['none', 'both', 'from-to']) %>
|
|
<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_tag :node2_id, options_from_collection_for_select(Topic.order("name ASC").visibleToUser(user, nil), "id", "name") %>
|
|
<% end %>
|
|
<label for="synapse_permission">Permission</label>
|
|
<%= form.select(:permission, options_for_select(['commons', 'public', 'private'])) %>
|
|
<%= form.submit "Add Synapse", class: "add" %>
|
|
<% end %>
|
|
</div> |