metamaps--metamaps/app/views/main/console.html.erb

136 lines
5.8 KiB
Text
Raw Normal View History

<% if @map %>
<div class="focus">
<div class="focusleft">
<p># of Topics: <%= @map.items.count %></p>
<p># of Synapses: <%= @map.synapses.count %></p>
</div>
<div class="focusmiddle">
<h1 class="title"><%= @map.name %></h1>
<div class="desc">
<p><%= @map.desc %></p>
</div>
</div>
<div class="focusright">
<div class="link"><p>Permissions:<%= @map.permission %></p></div>
</div>
</div>
<div class="clearfloat nodemargin"></div>
<div class="maps" id="container">
<div id="center-container">
<div id="infovis"></div>
</div>
</div>
<div class="clearfloat"></div>
<script>
json = <%= @mapjson %>;
if (json.length > 0) {
$(document).ready(function() {
2012-12-03 23:50:38 +00:00
<% if (@map.arranged) %>
2012-12-14 18:31:39 +00:00
initialize("arranged");
2012-12-03 23:50:38 +00:00
<% else %>
2012-12-14 18:31:39 +00:00
initialize("chaotic");
2012-12-03 23:50:38 +00:00
<% end %>
});
2012-12-04 00:21:06 +00:00
}
</script>
<% elsif authenticated? %>
<div class="maps" id="container">
<div id="center-container">
<div id="infovis"></div>
</div>
2012-12-14 18:31:39 +00:00
</div>
<div class="clearfloat"></div>
<% if authenticated? %>
<%= render :partial => 'items/new' %>
<%= render :partial => 'synapses/new' %>
<% end %>
<script>
2012-12-16 20:00:43 +00:00
//if (json.length > 0) {
2012-12-14 18:31:39 +00:00
$(document).ready(function() {
initialize("chaotic", true);
});
2012-12-16 20:00:43 +00:00
//}
2012-12-14 18:31:39 +00:00
</script>
<% else %>
<h1><br>Shucks, there are no maps.<h1>
<% end %>
2012-12-16 20:00:43 +00:00
<span id="closeFind">close</span>
2012-12-22 08:32:12 +00:00
<form id="findWhere">
<span class="findWhereField"><input type="checkbox" id="onCanvas"><p>On my Canvas</p></span>
<span class="findWhereField"><input type="checkbox" id="inCommons" checked="checked"><p>In the Commons</p></span>
2012-12-22 08:32:12 +00:00
</form>
2012-12-16 20:00:43 +00:00
<div class="sideOption" id="sideOptionFind">
<span class="find_key">Find...</span>
<select class="select_content">
<option value="topics" selected="selected">Topics</option>
<!-- <option value="synapses">Synapses</option> -->
<option value="maps">Maps</option>
<option value="mappers">Mappers</option>
</select>
<span class="spacer">by</span>
<select class="select_type">
2012-12-22 08:32:12 +00:00
<option value="name" selected="selected">name</option>
<option value="metacode">metacode</option>
<option value="map (by name)">map (by name)</option>
<option value="mapper (by name)">mapper (by name)</option>
2012-12-16 20:00:43 +00:00
</select>
<div class="clearfloat"></div>
<%= form_for Item.new, :html => { :class => "find_topic_by_name find find_topic", :id => "find_topic_by_name" } do |f| %>
<%= f.autocomplete_field :name, autocomplete_item_name_items_path, :id => "topic_by_name_input", :placeholder => "Search for topics..." %>
<% end %>
<%= form_for Map.new, :html => { :class => "find_map_by_name find", :id => "find_map_by_name" } do |f| %>
<%= f.autocomplete_field :name, autocomplete_map_name_maps_path, :id => "map_by_name_input", :placeholder => "Search for maps..." %>
<% end %>
<%= form_for User.new, :html => { :class => "find_mapper_by_name find", :id => "find_mapper_by_name" } do |f| %>
<%= f.autocomplete_field :name, autocomplete_user_name_users_path, :id => "mapper_by_name_input", :placeholder => "Search for mappers..." %>
<% end %>
<div class="find_topic_by_metacode find find_topic" id="find_topic_by_metacode">
<ul id="filters-one">
<li id="showAll">Show All</li>
<li><img src="/assets/action.png" alt="Action" /><p>action</p></li>
<li><img src="/assets/activity.png" alt="Activity" /><p>activity</p></li>
<li><img src="/assets/bizarre.png" alt="Bizarre" /><p>bizarre</p></li>
<li><img src="/assets/catalyst.png" alt="Catalyst" /><p>catalyst</p></li>
<li><img src="/assets/closed.png" alt="Closed" /><p>closed</p></li>
<li><img src="/assets/experience.png" alt="Experience" /><p>experience</p></li>
<li><img src="/assets/futuredev.png" alt="Future Dev" /><p>future dev</p></li>
<li><img src="/assets/group.png" alt="Group" /><p>group</p></li>
<li><img src="/assets/idea.png" alt="Idea" /><p>idea</p></li>
</ul>
<ul id="filters-two">
<li id="hideAll">Hide All</li>
<li><img src="/assets/implication.png" alt="Implication" /><p>implication</p></li>
<li><img src="/assets/insight.png" alt="Insight" /><p>insight</p></li>
<li><img src="/assets/intention.png" alt="Intention" /><p>intention</p></li>
<li><img src="/assets/knowledge.png" alt="Knowledge" /><p>knowledge</p></li>
<li><img src="/assets/location.png" alt="Location" /><p>location</p></li>
<li><img src="/assets/openissue.png" alt="Open Issue" /><p>open issue</p></li>
<li><img src="/assets/opinion.png" alt="Opinion" /><p>opinion</p></li>
<li><img src="/assets/opportunity.png" alt="Opportunity" /><p>opportunity</p></li>
<li><img src="/assets/person.png" alt="Person" /><p>person</p></li>
</ul>
<ul id="filters-three">
<li><img src="/assets/platform.png" alt="Platform" /><p>platform</p></li>
<li><img src="/assets/problem.png" alt="Problem" /><p>problem</p></li>
<li><img src="/assets/question.png" alt="Question" /><p>question</p></li>
<li><img src="/assets/reference.png" alt="Reference" /><p>reference</p></li>
<li><img src="/assets/requirement.png" alt="Requirement" /><p>requirement</p></li>
<li><img src="/assets/resource.png" alt="Resource" /><p>resource</p></li>
<li><img src="/assets/role.png" alt="Role" /><p>role</p></li>
<li><img src="/assets/task.png" alt="Task" /><p>task</p></li>
<li><img src="/assets/tool.png" alt="Tool" /><p>tool</p></li>
<li><img src="/assets/trajectory.png" alt="Trajectory" /><p>trajectory</p></li>
</ul>
</div>
<%= form_tag("/search", :method => "get", :id => 'get_topics_form', :class => 'get_topics_form', :remote => true) do %>
<%= text_field_tag(:topics_by_user_id, "", :id => "topicsByUser", :class => "getTopicsInput") %>
<%= text_field_tag(:topics_by_map_id, "", :id => "topicsByMap", :class => "getTopicsInput") %>
<% end %>
2012-12-16 20:00:43 +00:00
</div>