Statistics fixed

This commit is contained in:
Christoph Haas 2016-07-15 20:24:19 +02:00
parent 9024833921
commit f36683f9d4
2 changed files with 3 additions and 11 deletions

View file

@ -6,19 +6,12 @@ class WelcomeController < ApplicationController
# TODO: Use the actually most popular package and not just a random one # TODO: Use the actually most popular package and not just a random one
@most_popular_package = Package.with_screenshots.first @most_popular_package = Package.with_screenshots.first
package_count @package_count = Package.count
end end
def about def about
@package_sources = Rails.configuration.package_sources @package_sources = Rails.configuration.package_sources
package_count
end
private
# TODO: show count depending on virtual host
def package_count
@package_count = Package.count @package_count = Package.count
@screenshot_count = Screenshot.count
end end
end end

View file

@ -137,8 +137,7 @@
' There are currently #{@package_count} software packages in the database. ' There are currently #{@package_count} software packages in the database.
/ ' 3798 of them have screenshots. / ' 3798 of them have screenshots.
/ ' That makes a total of 7.8%. / ' That makes a total of 7.8%.
' #{@screenshot_count} screenshots have been uploaded which means that ' And #{@screenshot_count} screenshots have been uploaded.
' every package has an average number of #{@pkg_avg_screenshots} screenshots.
/ p / p
/ // TODO: Use plot about upload statistics / // TODO: Use plot about upload statistics