mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-17 11:04:22 +01:00
add missing gallery section
This commit is contained in:
parent
7de9c69434
commit
d3972f728f
2 changed files with 25 additions and 1 deletions
|
@ -82,7 +82,13 @@ defmodule PhilomenaWeb.StatController do
|
|||
|
||||
defp galleries do
|
||||
gallery_count = Repo.aggregate(Gallery, :count, :id)
|
||||
gallery_size = Float.round(Repo.aggregate(Gallery, :avg, :image_count) || 0.0, 2)
|
||||
|
||||
gallery_size =
|
||||
Repo.aggregate(Gallery, :avg, :image_count)
|
||||
|> Kernel.||(Decimal.new(0))
|
||||
|> Decimal.to_float()
|
||||
|> trunc()
|
||||
|
||||
distinct_creators =
|
||||
Gallery
|
||||
|> distinct(:creator_id)
|
||||
|
|
|
@ -75,6 +75,24 @@ elixir:
|
|||
= number_with_delimiter(@users_24h)
|
||||
' have joined in the last 24 hours.
|
||||
|
||||
h3 Galleries
|
||||
p
|
||||
' There are
|
||||
span.stat>
|
||||
= number_with_delimiter(@gallery_count)
|
||||
' existing image galleries on the site, created by
|
||||
span.stat>
|
||||
= number_with_delimiter(@distinct_creators)
|
||||
' distinct creators. There are, on average,
|
||||
span.stat>
|
||||
= number_with_delimiter(@gallery_size)
|
||||
' images in each gallery.
|
||||
p
|
||||
' In total, images have been added to galleries
|
||||
span.stat>
|
||||
= number_with_delimiter(@images_in_galleries)
|
||||
' times.
|
||||
|
||||
h3 Commissions
|
||||
p
|
||||
' There are
|
||||
|
|
Loading…
Reference in a new issue