81 lines
3.2 KiB
Text
81 lines
3.2 KiB
Text
<%#
|
|
# @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><%=h yield(:title) %></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>
|
|
<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"><a href="http://blog.metamaps.cc" target="_blank">About</a></li>
|
|
<li><a href="/request">Request Invite</a></li>
|
|
<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>
|
|
<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>
|
|
<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 %>
|
|
<%= render :partial => 'layouts/ga' if Rails.env.production? %>
|
|
</body>
|
|
</html>
|