metamaps--metamaps/app/views/maps/index.html.erb
2014-02-09 23:36:23 -05:00

41 lines
1.3 KiB
Text

<%#
# @file
# Shows a list of all maps, or just a user's maps.
# TODO: What url is this accessible at?
#%>
<% content_for :title, "Explore Maps | Metamaps" %>
<h1 class="index">Explore Maps</h1>
<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 %>
<div class="clearfloat"></div>
</div>
<script>
$(document).ready(function() {
$('.authenticated div.permission.canEdit .best_in_place').best_in_place();
$('.maps').height( (parseInt($('body').height()) - 54) ); /*.mCustomScrollbar();*/
});
</script>