Permalink
Browse files

Tried to make sure photos on taxa/show are sorted correctly.

  • Loading branch information...
1 parent ce46500 commit 3b6931b58d63414238e30300060b99980534d456 @kueda kueda committed Mar 17, 2012
Showing with 11 additions and 10 deletions.
  1. +11 −10 app/views/taxa/_photos.html.erb
@@ -1,6 +1,7 @@
<%-
taxon ||= @taxon
photos ||= taxon.photos.all(:limit => 24)
+ photos = photos.sort_by{|p| p.id}
-%>
<% unless photos.size == 0 %>
<% if taxon.species_or_lower? %>
@@ -41,17 +42,17 @@
<% end %>
<% end %>
<% else %>
-
-<div class="description">
- <h3 class="description">
- No Creative Commons Flickr Photos Tagged "<%= taxon.name %>"
- </h3>
- <a href="http://flickr.com/search/?w=all&q=<%= taxon.name.gsub(' ', '') %>&m=tags">
- View all photos tagged "<%=h taxon.name %>" on <nobr>Flickr &raquo;</nobr>
- </a><br/>
- (not just Creative Commons-licensed)
-</div>
+ <div class="description">
+ <h3 class="description">
+ No Creative Commons Flickr Photos Tagged "<%= taxon.name %>"
+ </h3>
+ <a href="http://flickr.com/search/?w=all&q=<%= taxon.name.gsub(' ', '') %>&m=tags">
+ View all photos tagged "<%=h taxon.name %>" on <nobr>Flickr &raquo;</nobr>
+ </a><br/>
+ (not just Creative Commons-licensed)
+ </div>
<% end %>
+
<% if photos.size > 0 && taxon.species_or_lower? %>
<div style="margin-top: 10px">
<% unless photos[1..-1].size == 0 %>

0 comments on commit 3b6931b

Please sign in to comment.