diff options
author | Belen Barros Pena <belen.barros.pena@linux.intel.com> | 2014-11-24 18:30:58 +0000 |
---|---|---|
committer | Alexandru DAMIAN <alexandru.damian@intel.com> | 2014-11-27 17:04:52 +0000 |
commit | 99ac7379e5df6c5cc491c2be591b15ad7ec04caa (patch) | |
tree | 4f6f887c0994a2b9a0dbdf568f0caef35fe810b9 /lib/toaster/toastergui/templatetags | |
parent | 3f6b33472820e339c0f057c2e30f25ec2a04366b (diff) | |
download | bitbake-99ac7379e5df6c5cc491c2be591b15ad7ec04caa.tar.gz |
toaster: make 'latest builds' section consistent across pages
Make sure that the 'latest builds' sections in the all builds
page and the project page are identical:
* no icon to represent build outcome
* remove machine name
* show date only when the build is more than 24 hours old
* same date and time format
Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Diffstat (limited to 'lib/toaster/toastergui/templatetags')
-rw-r--r-- | lib/toaster/toastergui/templatetags/projecttags.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/toaster/toastergui/templatetags/projecttags.py b/lib/toaster/toastergui/templatetags/projecttags.py index 99fd4cf28..f564edfe4 100644 --- a/lib/toaster/toastergui/templatetags/projecttags.py +++ b/lib/toaster/toastergui/templatetags/projecttags.py @@ -268,3 +268,11 @@ def get_dict_value(dictionary, key): return dictionary[key] except (KeyError, IndexError): return '' + +@register.filter +def format_build_date(completed_on): + now = timezone.now() + delta = now - completed_on + + if delta.days >= 1: + return True |