2013-01-11 23:49:59 +00:00
|
|
|
<%#
|
|
|
|
# @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
|
|
|
|
#%>
|
|
|
|
|
2012-10-10 15:52:50 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Metamaps</title>
|
2012-12-16 00:46:39 +00:00
|
|
|
<% if authenticated? %>
|
|
|
|
<script type="text/javascript">
|
2013-01-23 18:43:01 +00:00
|
|
|
var userid = <%= user.id %>;
|
2012-12-16 00:46:39 +00:00
|
|
|
var username = "<%= user.name %>";
|
|
|
|
</script>
|
2012-12-25 23:29:20 +00:00
|
|
|
<% else %>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var userid = null;
|
|
|
|
var username = null;
|
|
|
|
</script>
|
2012-12-16 00:46:39 +00:00
|
|
|
<% end %>
|
2013-01-26 01:49:40 +00:00
|
|
|
<script>
|
|
|
|
var imgArray = new Object();
|
|
|
|
|
|
|
|
<% Metacode.all.each do |m| %>
|
|
|
|
imgArray['<%= m.name %>'] = new Image(); imgArray['<%= m.name %>'].src = '/assets/<%= m.icon %>';
|
|
|
|
<% end %>
|
|
|
|
</script>
|
2012-10-10 15:52:50 +00:00
|
|
|
<%= stylesheet_link_tag "application", :media => "all" %>
|
|
|
|
<%= javascript_include_tag "application" %>
|
2012-10-26 10:04:52 +00:00
|
|
|
<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>
|
2012-10-10 15:52:50 +00:00
|
|
|
<%= csrf_meta_tags %>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<%= content_tag :div, class: authenticated? ? "main authenticated" : "main unauthenticated" do %>
|
|
|
|
|
2012-12-25 23:29:20 +00:00
|
|
|
<div class="wrapper" id="wrapper">
|
2012-10-10 15:52:50 +00:00
|
|
|
<%= yield %>
|
|
|
|
</div>
|
2012-12-16 03:52:12 +00:00
|
|
|
|
2012-12-16 20:00:43 +00:00
|
|
|
<div class="footer">
|
2012-12-25 23:29:20 +00:00
|
|
|
<div class="logo">
|
|
|
|
<% unless authenticated? %>
|
|
|
|
<ul class="menu">
|
2013-02-03 18:04:01 +00:00
|
|
|
<li class="first"><%= link_to "About", "http://blog.metamaps.cc" %></li>
|
|
|
|
<li><%= link_to "Request Invite", topics_url %></li>
|
|
|
|
<li><%= link_to "Console", console_url %></li>
|
|
|
|
<li><%= link_to "Explore Maps", maps_url %></li>
|
2012-12-25 23:29:20 +00:00
|
|
|
<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>
|
2013-02-03 18:04:01 +00:00
|
|
|
<li><%= link_to "Explore Maps", maps_url %></li>
|
2012-12-25 23:29:20 +00:00
|
|
|
<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>
|
2013-02-03 18:04:01 +00:00
|
|
|
<li><%= link_to "Send Invite", invite_path %></li>
|
2012-12-25 23:29:20 +00:00
|
|
|
<li><%= link_to "Settings", edit_user_url(user) %></li>
|
2012-12-26 04:01:17 +00:00
|
|
|
<% unless Map.first(:conditions => [ "id = ?", 7]).nil? %>
|
|
|
|
<li><%= link_to "Feedback", map_path(Map.find(7)) %></li>
|
2012-12-25 23:29:20 +00:00
|
|
|
<% 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>
|
2012-10-10 15:52:50 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<% end %>
|
2012-10-30 22:32:48 +00:00
|
|
|
<%= render :partial => 'layouts/ga' if Rails.env.production? %>
|
2012-10-10 15:52:50 +00:00
|
|
|
</body>
|
2012-12-31 04:04:30 +00:00
|
|
|
</html>
|