Showing most wanted package on home page properly
This commit is contained in:
parent
10d5bab37c
commit
61cad639a6
2 changed files with 5 additions and 7 deletions
|
|
@ -4,11 +4,11 @@ class WelcomeController < ApplicationController
|
|||
@newest_upload = Screenshot.newest_upload
|
||||
|
||||
# TODO: Use the actually most popular package and not just a random one
|
||||
@most_popular_package = Package.with_screenshots.first
|
||||
@most_popular_package = Package.order(:visits).last
|
||||
|
||||
@package_count = Package.count
|
||||
|
||||
@most_wanted = Package.without_screenshots_most_visits.first
|
||||
@most_wanted_package = Package.without_screenshots_most_visits.first
|
||||
end
|
||||
|
||||
def about
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@
|
|||
|
||||
div.row
|
||||
hr
|
||||
|
||||
div.row
|
||||
div.large-4.medium-12.small-12.columns.text-center
|
||||
h2 Newest upload
|
||||
// TODO: load actual newest upload and cache it
|
||||
|
|
@ -53,9 +51,9 @@ div.row
|
|||
div.large-4.medium-12.small-12.columns.text-center
|
||||
h2 Your help needed
|
||||
// TODO: load actual most popular package without a screenshot and cache it
|
||||
a href=upload_package_by_name_path('firefox')
|
||||
a href=upload_package_by_name_path(@most_wanted_package.name)
|
||||
img src="/images/dummy/no-screenshots-upload-one.svg" width="80%"
|
||||
p
|
||||
' We lack a screenshot for the Firefox package. Can you
|
||||
a href=upload_package_by_name_path('firefox') provide one
|
||||
' We lack a screenshot for the #{@most_wanted_package.name} package. Can you
|
||||
a href=package_path(@most_wanted_package.name) provide one
|
||||
' ?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue