started styling map forms
This commit is contained in:
parent
ae46c27bec
commit
47710749a8
9 changed files with 0 additions and 264 deletions
|
@ -1,21 +0,0 @@
|
|||
<%#
|
||||
# @file
|
||||
# Form for editing a map
|
||||
# Located at addresses /maps/:id/edit. In use.
|
||||
#%>
|
||||
|
||||
<% content_for :title, "Edit " + @map.name + " | Metamaps" %>
|
||||
|
||||
<%= form_for @map, url: map_url(@map) do |form| %>
|
||||
<h3>Edit Map</h3>
|
||||
<label for="map_name">Name</label>
|
||||
<%= form.text_field :name %>
|
||||
<label for="map_desc">Description</label>
|
||||
<%= form.text_area :desc, class: "description", :rows => 5 %>
|
||||
<% if @map.user == user %>
|
||||
<label for="map_perm">Permission</label>
|
||||
<%= form.select :permission, options_for_select(['commons', 'public', 'private'], @map.permission) %>
|
||||
<p>Topics and synapses you create newly on this map will be set by default to the permissions of your map.<br>Permissions of already created topics will not be changed to your new map permission.</p>
|
||||
<% end %>
|
||||
<%= form.submit "Update", class: "update" %>
|
||||
<% end %>
|
|
@ -1,21 +0,0 @@
|
|||
<%#
|
||||
# @file
|
||||
# Form to create a new map.
|
||||
# Accessible from /maps/new. Still in use.
|
||||
#%>
|
||||
|
||||
<% content_for :title, "New Map | Metamaps" %>
|
||||
|
||||
<div class="nothidden">
|
||||
<%= form_for @map || Map.new, url: maps_url do |form|%>
|
||||
<h3>Add Map</h3>
|
||||
<label for="map_name">Name</label>
|
||||
<%= form.text_field :name %>
|
||||
<label for="map_desc">Description</label>
|
||||
<%= form.text_area :desc, class: "description", :rows => 5 %>
|
||||
<label for="map_permission">Permission</label>
|
||||
<%= form.select(:permission, options_for_select(['commons', 'public', 'private'])) %>
|
||||
<p>Topics and synapses you create newly on this map will be set by default to the permissions of your map.</p>
|
||||
<%= form.submit "Add Map", class: "add" %>
|
||||
<% end %>
|
||||
</div>
|
|
@ -1,16 +0,0 @@
|
|||
<%#
|
||||
# @file
|
||||
# Render a synapse
|
||||
# TODO: Where is this code used?
|
||||
#%>
|
||||
<%= div_for synapse do %>
|
||||
<div class="synapseTopic1">
|
||||
<p class="topic1desc"><%= link_to synapse.topic1.name, topic_url(synapse.topic1) %></p>
|
||||
<%= image_tag synapse.topic1.metacode.icon, :class => 'icon', :size => '50x50' %>
|
||||
</div>
|
||||
<div class="synapseDesc"><%= synapse.desc %></div>
|
||||
<div class="synapseTopic2">
|
||||
<%= image_tag synapse.topic2.metacode.icon, :class => 'icon', :size => '50x50' %>
|
||||
<p class="topic2desc"><%= link_to synapse.topic2.name, topic_url(synapse.topic2) %></p>
|
||||
</div>
|
||||
<% end %>
|
|
@ -1,27 +0,0 @@
|
|||
<%#
|
||||
# @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 %>
|
||||
<% if @synapse.user == user %>
|
||||
<label for="synapse_permission">Permission</label>
|
||||
<%= form.select :permission, options_for_select(['commons', 'public', 'private'], @synapse.permission) %>
|
||||
<% end %>
|
||||
<%= form.submit "Update", class: "update" %>
|
||||
<% end %>
|
|
@ -1,26 +0,0 @@
|
|||
<%#
|
||||
# @file
|
||||
# Synapse creation form
|
||||
# I think this code is no longer in use.
|
||||
# TODO: Am I correct?
|
||||
#%>
|
||||
<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>
|
|
@ -1,27 +0,0 @@
|
|||
<%#
|
||||
# @file
|
||||
# View all synapses.
|
||||
# TODO: Is this code used?
|
||||
# TODO: What URL is it?
|
||||
#%>
|
||||
<div class="relatives" id="container">
|
||||
<div id="center-container">
|
||||
<div id="infovis"></div>
|
||||
</div>
|
||||
<div id="showcard">
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfloat"></div>
|
||||
|
||||
<script>
|
||||
json = <%= @synapsejson %>;
|
||||
console.log(json);
|
||||
$(document).ready(function() {
|
||||
initialize("chaotic");
|
||||
});
|
||||
</script>
|
||||
|
||||
<% if authenticated? %>
|
||||
<%= render :partial => 'topics/new' %>
|
||||
<%= render :partial => 'synapses/new' %>
|
||||
<% end %>
|
|
@ -1,83 +0,0 @@
|
|||
<%#
|
||||
# @file
|
||||
# This file renders a card showing a topic
|
||||
# TODO: Is this code in use or deprecated? What's it's purpose?
|
||||
#%>
|
||||
|
||||
<%= div_for topic do %>
|
||||
|
||||
<% if topic.authorize_to_edit(user) %>
|
||||
<div class="permission canEdit">
|
||||
<% end %>
|
||||
|
||||
<div class="CardOnGraph"
|
||||
id="topic_<%=topic.id %>">
|
||||
<% if topic.user == user %><%= link_to 'Delete', topic_path(topic), :class => 'delete', :confirm => 'Delete this topic and all synapses linking to it?', :method => :delete, :remote => true%><% end %>
|
||||
<p class="type best_in_place best_in_place_metacode"
|
||||
data-url="/topics/<%=topic.id %>"
|
||||
data-object="topic"
|
||||
data-collection='[["Action","Action"],["Activity","Activity"],["Bizarre","Bizarre"],["Catalyst","Catalyst"],["Closed","Closed"],["Experience","Experience"],["Future Dev","Future Dev"],["Group","Group"],["Idea","Idea"],["Implication","Implication"],["Insight","Insight"],["Intention","Intention"],["Knowledge","Knowledge"],["Location","Location"],["Open Issue","Open Issue"],["Opinion","Opinion"],["Opportunity","Opportunity"],["Person","Person"],["Platform","Platform"],["Problem","Problem"],["Question","Question"],["Reference","Reference"],["Requirement","Requirement"],["Resource","Resource"],["Role","Role"],["Task","Task"],["Tool","Tool"],["Trajectory","Trajectory"]]'
|
||||
data-attribute="metacode"
|
||||
data-type="select"><%= topic.metacode.name %></p>
|
||||
<%= image_tag topic.metacode.icon, :class => 'icon', :size => '50x50' %>
|
||||
<div class="cardSettings">
|
||||
<div class="mapPerm" title="<%= topic.permission %>"><%= topic.mk_permission %></div>
|
||||
<% if topic.user == user %>
|
||||
<div class="permActivator">
|
||||
<div class="editSettings">
|
||||
<span>Permissions: </span>
|
||||
<span title="Click to Edit"><%= best_in_place topic, :permission, :type => :select, :collection => [['commons', 'commons'], ['public','public'], ['private','private']], :classes => 'best_in_place_permission' %></span>
|
||||
<div class="clearfloat"></div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<span class="title">
|
||||
<span class="best_in_place best_in_place_name"
|
||||
data-url="/topics/<%=topic.id %>"
|
||||
data-object="topic"
|
||||
data-attribute="name"
|
||||
data-type="input"><%=topic.name %></span>
|
||||
<a href="/topics/<%=topic.id %>" class="topic-go-arrow" target="_blank">
|
||||
<img class="topic-go-arrow"
|
||||
title="Explore Topic"
|
||||
src="/assets/go-arrow.png" />
|
||||
</a>
|
||||
<div class="clearfloat"></div>
|
||||
</span>
|
||||
<div class="contributor">
|
||||
Added by: <a href="/users/<%=topic.user.id %>" target="_blank"><%=topic.user.name %>
|
||||
</a>
|
||||
</div>
|
||||
<div class="scroll">
|
||||
<div class="desc">
|
||||
<span class="best_in_place best_in_place_desc"
|
||||
data-url="/topics/<%=topic.id %>"
|
||||
data-object="topic"
|
||||
data-nil="<span class='gray'>Click to add description.</span>"
|
||||
data-attribute="desc"
|
||||
data-type="textarea"><%=topic.desc %></span>
|
||||
<div class="clearfloat"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="link">
|
||||
<% if (authenticated? && topic.permission == "commons") || topic.user == user %>
|
||||
<a href="<%=topic.link %>" class="go-link" target="_blank">[go]</a>
|
||||
<span class="best_in_place best_in_place_link"
|
||||
data-url="/topics/<%=topic.id %>"
|
||||
data-object="topic"
|
||||
data-attribute="link"
|
||||
data-nil="<span class='gray'>Click to add link.</span>"
|
||||
data-type="input"><%=topic.link %></span>
|
||||
<% else %>
|
||||
<a href="<%=topic.link %>" target="_blank"><%= topic.link %></a>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="clearfloat"></div>
|
||||
</div>
|
||||
|
||||
<% if topic.authorize_to_edit(user) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
|
@ -1,22 +0,0 @@
|
|||
<%#
|
||||
# @file
|
||||
# This code renders the edit form. It is not used anymore; we use
|
||||
# best_in_place instead.
|
||||
#%>
|
||||
|
||||
<%= form_for @topic, url: topic_url do |form| %>
|
||||
<h3>Edit Topic</h3>
|
||||
<label for="category">Category</label>
|
||||
<%= select "category", "metacode_id", Metacode.order("name ASC").all.collect {|p| [ p.name, p.id ] }, { :selected => @topic.metacode.id } %>
|
||||
<label for="topic_name">Title</label>
|
||||
<%= form.text_field :name %>
|
||||
<label for="topic_desc">Description</label>
|
||||
<%= form.text_area :desc, class: "description", :rows => 5 %>
|
||||
<label for="topic_link">Link</label>
|
||||
<%= form.text_field :link, class: "link" %>
|
||||
<% if @topic.user == user %>
|
||||
<label for="topic_permission">Permission</label>
|
||||
<%= form.select :permission, options_for_select(['commons', 'public', 'private'], @topic.permission) %>
|
||||
<% end %>
|
||||
<%= form.submit "Update", class: "update" %>
|
||||
<% end %>
|
|
@ -1,21 +0,0 @@
|
|||
<%#
|
||||
# @file
|
||||
# This file is a form for creating new topics. It is no longer used.
|
||||
#%>
|
||||
|
||||
<div class="nothidden">
|
||||
<%= form_for @topic || Topic.new, url: topics_path do |form| %>
|
||||
<h3>Add Topic</h3>
|
||||
<label for="category">Category</label>
|
||||
<%= select_tag "category", options_from_collection_for_select(Metacode.order("name ASC").all, "id", "name") %>
|
||||
<label for="topic_name">Title</label>
|
||||
<%= form.text_field :name %>
|
||||
<label for="topic_desc">Description</label>
|
||||
<%= form.text_area :desc, class: "description", :rows => 5 %>
|
||||
<label for="topic_link">Link</label>
|
||||
<%= form.text_field :link, class: "link" %>
|
||||
<label for="topic_permission">Permission</label>
|
||||
<%= form.select(:permission, options_for_select(['commons', 'public', 'private'])) %>
|
||||
<%= form.submit "Add Topic", class: "addTopic", id: "addTopic" %>
|
||||
<% end %>
|
||||
</div>
|
Loading…
Reference in a new issue