<% cl = cycle('table0', 'table1') %> <%= link_to image_tag(map.upload.url(:thumb)), map %> <%=link_to h(map.title), map %> <% if !map.public? %>Private<% end-%>
<%=h map.description -%> <%- if map.owner -%>Uploaded by <%= link_to(map.owner.login, user_path(map.owner)) -%>.<%-end-%> Last modified <%=h time_ago_in_words(map.last_changed) -%> ago. <%if map.gcps.size > 0 %> <%=pluralize(map.gcps.size, "control point") -%>. <%else-%> Unrectified. <%end-%>
<% if map.tags.count > 0 -%> Tags: <% map.tags.each do | tag | -%> <%= link_to tag.name, { :controller=> :maps, :action => :tag, :id => tag.name } %> <% end %>
<% end -%> <% if logged_in? %> <% if current_user.maps.include?(map) %> <%= link_to 'Remove from My Maps', destroy_my_map_path(:user_id => current_user, :map_id => map), :method => :post, :confirm => "really remove this map from your list?" -%> | <% else %> <%= link_to 'Save to My Maps', add_my_map_path(:user_id => current_user, :map_id => map), :method => :post -%> | <% end #if mymaps -%> <% end #if logged in-%> <%= link_to "View Map",map -%> | <%= link_to "Edit/Rectify Map", warp_map_path(:id=>map) -%> | <%= link_to "Export", :controller=>"maps", :action=>"export", :id=>map %> | <% if map.status == :warped %> <% if admin_authorized? %> | <%= link_to "publish",{:controller => "maps", :action => "publish", :id => map}, :confirm => "Really publish this map? This will mean that no further editing can be done" -%> | <% end -%> <%end -%>