metamaps--metamaps/app/views/layouts/application.html.erb

82 lines
3.1 KiB
Text
Raw Normal View History

<%#
# @file
# Main application file. Holds scaffolding present on every page.
# Then a certain non-partial view (no _ preceding filename) will be
# displayed within, based on URL
#%>
<!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 %>
<script>
var imgArray = new Object();
<% Metacode.all.each do |m| %>
imgArray['<%= m.name %>'] = new Image(); imgArray['<%= m.name %>'].src = '/assets/<%= m.icon %>';
<% end %>
</script>
<%= 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>
2012-12-16 20:00:43 +00:00
<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>
2012-12-16 20:00:43 +00:00
<div class="footer">
<div class="logo">
<% unless authenticated? %>
<ul class="menu">
<li class="first"><a href="http://blog.metamaps.cc" target="_blank">About</a></li>
<li><a href="/request">Request Invite</a></li>
2013-02-03 18:04:01 +00:00
<li><%= link_to "Explore Maps", maps_url %></li>
<% if Topic.exists?(260) %>
<li><%= link_to "Tour", "/topics/260" %></li>
<% end %>
<li class="last"><%= link_to "Login", new_session_path, id: "Login" %></li>
</ul>
<% end %>
<% if authenticated? %>
<ul class="menu">
<li class="first"><a href="http://blog.metamaps.cc" target="_blank">About</a></li>
<li><%= link_to "Send Invite", invite_path %></li>
2013-02-03 18:04:01 +00:00
<li><%= link_to "Explore Maps", maps_url %></li>
<li><%= link_to "Create Map", new_map_url %></li>
<li><%= link_to "My Maps", user_maps_url(user) %></li>
2013-01-08 00:57:04 +00:00
<li><%= link_to "My Profile", user_url(user) %></li>
<li><%= link_to "Settings", edit_user_url(user) %></li>
<li><%= link_to "Console", console_url %></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 %>
2012-10-30 22:32:48 +00:00
<%= render :partial => 'layouts/ga' if Rails.env.production? %>
</body>
</html>