From a420ba2cfc790e72399d0e5f308d07c35cf53588 Mon Sep 17 00:00:00 2001 From: Thorsten Claus Date: Wed, 24 Mar 2021 20:19:08 +0100 Subject: [PATCH] Formatting post per user fractions closes #8227 --- Changelog.md | 1 + app/views/admins/_stats.haml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index cde7b9caf..9ebebc86c 100644 --- a/Changelog.md +++ b/Changelog.md @@ -10,6 +10,7 @@ * Delete a user's invitation code during account deletion [#8202](https://github.com/diaspora/diaspora/pull/8202) * Bump mimemagic [#8231](https://github.com/diaspora/diaspora/pull/8231) * Removed support for defunct Uni Heidelberg OSM tile server, Mapbox is now required if you want to show maps [#8215](https://github.com/diaspora/diaspora/pull/8215) +* Render only two fractional digits in the posts per user/day admin statistics [#8227](https://github.com/diaspora/diaspora/pull/8227) ## Features * Support and recommend TOML as configuration format [#8132](https://github.com/diaspora/diaspora/pull/8132) diff --git a/app/views/admins/_stats.haml b/app/views/admins/_stats.haml index ad74a7ab6..748eff9ee 100644 --- a/app/views/admins/_stats.haml +++ b/app/views/admins/_stats.haml @@ -38,8 +38,8 @@ .row %p.col-md-12.alert.alert-info.text-center{role: "alert"} != t("admins.stats.current_segment", - post_yest: content_tag(:strong, posts[:yesterday] / user_count), - post_day: content_tag(:strong, posts[:day_before] / user_count)) + post_yest: content_tag(:strong, "%0.2f" % (posts[:yesterday] / user_count)), + post_day: content_tag(:strong, "%0.2f" % (posts[:day_before] / user_count))) .row .col-md-12