Display thousand commas in numeric dashboard
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -66,6 +66,8 @@
|
||||
- Add web links app.
|
||||
- Add support to display column help text
|
||||
as a tooltip.
|
||||
- Update numeric dashboard widget to display
|
||||
thousand commas.
|
||||
|
||||
3.2.6 (2019-07-10)
|
||||
==================
|
||||
|
||||
@@ -81,6 +81,8 @@ Changes
|
||||
- Add web links app.
|
||||
- Add support to display column help text
|
||||
as a tooltip.
|
||||
- Update numeric dashboard widget to display
|
||||
thousand commas.
|
||||
|
||||
Removals
|
||||
--------
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.contrib.humanize.templatetags.humanize import intcomma
|
||||
from django.template import loader
|
||||
|
||||
|
||||
@@ -85,7 +86,8 @@ class DashboardWidgetNumeric(BaseDashboardWidget):
|
||||
|
||||
def get_context(self):
|
||||
return {
|
||||
'count': self.count,
|
||||
'count': intcomma(value=self.count),
|
||||
'count_raw': self.count,
|
||||
'icon_class': self.icon_class,
|
||||
'label': self.label,
|
||||
'link': self.link,
|
||||
|
||||
Reference in New Issue
Block a user