only display top oneness for hall of famers
parent
dcc7e2ff82
commit
25e7cf9024
|
@ -9,7 +9,6 @@ class Home < Application
|
||||||
|
|
||||||
def hall_of_fame
|
def hall_of_fame
|
||||||
@top_oneness = Photo.find :all, :order => 'oneness DESC, id DESC', :limit => 10, :conditions => 'oneness > 0'
|
@top_oneness = Photo.find :all, :order => 'oneness DESC, id DESC', :limit => 10, :conditions => 'oneness > 0'
|
||||||
@top_voted = Photo.find :all, :order => 'votes_count DESC, id DESC', :limit => 10, :conditions => 'votes_count > 0'
|
|
||||||
render
|
render
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,9 @@
|
||||||
p
|
p
|
||||||
:text-align center
|
:text-align center
|
||||||
|
|
||||||
%h2 Top oneness
|
%h1 Top oneness
|
||||||
|
|
||||||
%ol
|
%ol.no_list_style.centered
|
||||||
- @top_oneness.each_with_index do |p, index|
|
- @top_oneness.each_with_index do |p, index|
|
||||||
%li
|
%li
|
||||||
%a{ :href => url(:photo, p) }
|
%a{ :href => url(:photo, p) }
|
||||||
|
@ -18,14 +18,3 @@
|
||||||
%p== <strong>Oneness:</strong> #{p.oneness}% <strong>Votes 0:</strong> #{p.zero_votes} <strong>Votes 1:</strong> #{p.one_votes} <strong>Total Votes:</strong> #{p.votes_count}
|
%p== <strong>Oneness:</strong> #{p.oneness}% <strong>Votes 0:</strong> #{p.zero_votes} <strong>Votes 1:</strong> #{p.one_votes} <strong>Total Votes:</strong> #{p.votes_count}
|
||||||
|
|
||||||
%br{ :style => 'clear: both' }
|
%br{ :style => 'clear: both' }
|
||||||
|
|
||||||
%h2 Top voted
|
|
||||||
|
|
||||||
%ol
|
|
||||||
- @top_voted.each_with_index do |p, index|
|
|
||||||
%li
|
|
||||||
%a{ :href => url(:photo, p) }
|
|
||||||
%img{ :src => photo_url(p, dim, dim) }
|
|
||||||
%p== <strong>Oneness:</strong> #{p.oneness}% <strong>Votes 0:</strong> #{p.zero_votes} <strong>Votes 1:</strong> #{p.one_votes} <strong>Total Votes:</strong> #{p.votes_count}
|
|
||||||
|
|
||||||
%br{ :style => 'clear: both' }
|
|
Reference in New Issue