metamaps--metamaps/app/views/layouts/application.html.erb
2013-01-07 19:57:04 -05:00

65 lines
2.6 KiB
Text

<!DOCTYPE html>
<html>
<head>
<title>Metamaps</title>
<% if authenticated? %>
<script type="text/javascript">
var userid = "<%= user.id %>";
var username = "<%= user.name %>";
</script>
<% else %>
<script type="text/javascript">
var userid = null;
var username = null;
</script>
<% end %>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
<script type="text/javascript" src="//use.typekit.net/tki2nyo.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<script type="text/javascript" src="//use.typekit.net/obp7wss.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<%= csrf_meta_tags %>
</head>
<body>
<%= content_tag :div, class: authenticated? ? "main authenticated" : "main unauthenticated" do %>
<div class="wrapper" id="wrapper">
<%= yield %>
</div>
<div class="footer">
<div class="logo">
<% unless authenticated? %>
<ul class="menu">
<li class="first"><%= link_to "Console", console_url %></li>
<li><%= link_to "Topics", topics_url %></li>
<li><%= link_to "Synapses", synapses_url %></li>
<li><%= link_to "Maps", maps_url %></li>
<li class="last"><%= link_to "Login", new_session_path, id: "Login" %></li>
</ul>
<% end %>
<% if authenticated? %>
<ul class="menu">
<li class="first"><%= link_to "Console", console_url %></li>
<li><%= link_to "Create Map", new_map_url %></li>
<li><%= link_to "My Topics", user_topics_url(user) %></li>
<li><%= link_to "My Synapses", user_synapses_url(user) %></li>
<li><%= link_to "My Maps", user_maps_url(user) %></li>
<li><%= link_to "My Profile", user_url(user) %></li>
<li><%= link_to "Invite", invite_path %></li>
<li><%= link_to "Settings", edit_user_url(user) %></li>
<% unless Map.first(:conditions => [ "id = ?", 7]).nil? %>
<li><%= link_to "Feedback", map_path(Map.find(7)) %></li>
<% end %>
<li class="last"><%= link_to "Logout", session_path, method: 'delete', id: "Login" %></li>
</ul>
<% end %>
<h1 id="mainTitle"><%= link_to "metamaps", root_url %></h1><div id="beta">beta</div>
</div>
</div>
<% end %>
<%= render :partial => 'layouts/ga' if Rails.env.production? %>
</body>
</html>