summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
diff options
context:
space:
mode:
authorBelen Barros Pena <belen.barros.pena@linux.intel.com>2014-11-24 18:30:58 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-11-28 14:02:59 +0000
commitc31f30918b6c221531535297c5604cb61849b544 (patch)
tree80a51be42765ebf6befb68cc05c8f51cb283fece /bitbake/lib/toaster/toastergui/templatetags/projecttags.py
parentbe2475b409ce4d959cba9dbde56f3e3de903a94a (diff)
downloadpoky-c31f30918b6c221531535297c5604cb61849b544.tar.gz
bitbake: 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 (Bitbake rev: 99ac7379e5df6c5cc491c2be591b15ad7ec04caa) Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templatetags/projecttags.py')
-rw-r--r--bitbake/lib/toaster/toastergui/templatetags/projecttags.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
index 99fd4cf287..f564edfe49 100644
--- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
@@ -268,3 +268,11 @@ def get_dict_value(dictionary, key):
268 return dictionary[key] 268 return dictionary[key]
269 except (KeyError, IndexError): 269 except (KeyError, IndexError):
270 return '' 270 return ''
271
272@register.filter
273def format_build_date(completed_on):
274 now = timezone.now()
275 delta = now - completed_on
276
277 if delta.days >= 1:
278 return True