metamaps--metamaps/app/views/maps/index.html.erb

42 lines
1.3 KiB
Text
Raw Normal View History

<%#
# @file
# Shows a list of all maps, or just a user's maps.
# TODO: What url is this accessible at?
#%>
2014-02-05 03:03:24 +00:00
<% content_for :title, "Explore Maps | Metamaps" %>
2014-02-05 03:03:24 +00:00
<h1 class="index">Explore Maps</h1>
2014-02-10 04:36:23 +00:00
<div class="mapOrder">
<span class="displaying">Displaying:</span>
<div class="whichMaps">
<% if @request == "other" %>
<a href="/maps/mappers/<%= @user.id %>" class="active">By <%= @user.name %></a> /
<% end %>
<a href="/maps/active" class="<%= @request == "active" ? "active" : "" %>">Recently Active</a> /
<a href="/maps/featured" class="<%= @request == "featured" ? "active" : "" %>">Featured</a> /
<a href="/maps/new" class="<%= @request == "new" ? "active" : "" %>">Newest First</a>
<% if authenticated? %>
/ <a href="/maps/mappers/<%= @current.id %>" class="<%= @request == "you" ? "active" : "" %>">Yours</a>
<% end %>
</div>
<div class="clearfloat"></div>
</div>
<div class="maps" id="cards">
<% @maps.each do |map| %>
<%= render map %>
<% end %>
2014-02-10 04:36:23 +00:00
<div class="clearfloat"></div>
</div>
2014-02-10 04:36:23 +00:00
<script>
$(document).ready(function() {
$('.authenticated div.permission.canEdit .best_in_place').best_in_place();
$('.maps').height( (parseInt($('body').height()) - 54) ); /*.mCustomScrollbar();*/
});
</script>