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

24 lines
650 B
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?
#%>
<% if @user %>
<% content_for :title, @user.name + "'s Maps | Metamaps" %>
<% else %>
<% content_for :title, "All Maps | Metamaps" %>
<% end %>
<h1 class="index"><% if @user %><%= @user.name %>'s<% end %> Maps</h1>
<div class="maps" id="cards">
<% @maps.each do |map| %>
<%= render map %>
<% end %>
<% if @maps.empty? %>
<p class="empty"><br>Shucks, there are no maps. <% if authenticated? %><%= link_to "Create one if you want.", new_map_url %><% end %></p>
<% end %>
</div>
<div class="clearfloat"></div>