2012-10-24 06:47:08 +00:00
|
|
|
<div class="anypage">
|
2012-10-26 10:04:52 +00:00
|
|
|
<%= form_for Synapse.new, url: user_synapses_url(user), remote: true do |form| %>
|
2012-10-24 06:47:08 +00:00
|
|
|
<button id="closenewsynapse" onclick="$('#new_synapse').fadeOut('fast'); $('#new_synapse')[0].reset(); return false;">close</button>
|
|
|
|
<h3>Add Synapse Between Topics</h3>
|
|
|
|
<%= hidden_field_tag(:category, "Item") %>
|
|
|
|
<% if Item.all.count > 0 %>
|
|
|
|
<label for="node1_id">Choose First Item</label>
|
|
|
|
<%= select_tag :node1_id, options_from_collection_for_select(Item.order("name ASC").all, "id", "name") %>
|
|
|
|
<% end %>
|
|
|
|
<label for="item_desc">Describe The Connection</label>
|
|
|
|
<%= form.text_field :desc, class: "description" %>
|
|
|
|
<% if Item.all.count > 0 %>
|
|
|
|
<label for="node2_id">Choose Second Item</label>
|
|
|
|
<%= select_tag :node2_id, options_from_collection_for_select(Item.order("name ASC").all, "id", "name") %>
|
|
|
|
<% end %>
|
2012-10-26 10:04:52 +00:00
|
|
|
<label for="synapse_permission">Permission</label>
|
|
|
|
<%= form.select(:permission, options_for_select(['commons', 'public', 'private'])) %>
|
2012-10-24 06:47:08 +00:00
|
|
|
<%= form.submit "Add Synapse", class: "add" %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|