metamaps--metamaps/app/views/people/show.html.erb
2012-10-08 23:18:00 -04:00

65 lines
No EOL
1.9 KiB
Text

<div class="focus">
<div class="focusleft">
<p>Person</p>
<%= image_tag "person.png", :class => 'icon', :size => '50x50' %>
</div>
<div class="focusmiddle">
<h1 class="title"><%= @person.name %> <%= link_to "[edit]", edit_person_path(@person) %></h1>
<div class="desc">
<p><%= @person.desc %></p>
</div>
</div>
<div class="focusright">
<p>Location</p>
<Span class="location">
<%= @person.city %><% if @person.city != "" && @person.province != "" %>, <% end %><%= @person.province %><% if (@person.city != "" || @person.province != "") && @person.country != "" %>, <% end %><%= @person.country %>
<% if (@person.city == "" && @person.province == "" && @person.country == "") %>Earth<% end %>
</span>
<p>Link</p>
<%= link_to @person.link, @person.link, :class => 'link', :target => '_blank' %>
</div>
<div class="clearfloat"></div>
</div>
<div class="clearfloat nodemargin"></div>
<div class="groups">
<div class="divider"><%= @person.name %> is included in these groups</div>
<% @gparents.each do |group| %>
<%= render group %>
<% end %>
<% if @gparents.empty? %>
<p class="empty">Shucks, there are no groups.</p>
<% end %>
</div>
<div class="clearfloat"></div>
<div class="relatives" id="container">
<div class="divider"><%= @person.name %> is connected to these people</div>
<div id="center-container">
<div id="infovis"></div>
</div>
<div id="right-container">
<div id="log"></div>
<div id="inner-details"></div>
</div>
</div>
<div class="clearfloat"></div>
<script>
json = <%= @relatives %>;
console.log(json);
$(document).ready(function() {
init();
});
</script>
<div class="items">
<div class="divider"><%= @person.name %> includes these items</div>
<% @ichildren.each do |item| %>
<%= render item %>
<% end %>
<% if @ichildren.empty? %>
<p class="empty">Shucks, there are no items.</p>
<% end %>
</div>
<div class="clearfloat"></div>