From 33068ed973ab77eac52af38e2af30fe99c0930ac Mon Sep 17 00:00:00 2001 From: James Taylor Date: Fri, 29 Jan 2010 14:50:37 -0500 Subject: [PATCH] Gravatar's on pages, let's see how people react --- lib/galaxy/web/framework/helpers/__init__.py | 10 ++++++++++ templates/display_base.mako | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/lib/galaxy/web/framework/helpers/__init__.py b/lib/galaxy/web/framework/helpers/__init__.py index 0dad68daf63..8f89c94adbc 100644 --- a/lib/galaxy/web/framework/helpers/__init__.py +++ b/lib/galaxy/web/framework/helpers/__init__.py @@ -5,6 +5,7 @@ from webhelpers import * from galaxy.util.json import to_json_string from datetime import datetime, timedelta +import hashlib # If the date is more than one week ago, then display the actual date instead of in words def time_ago( x ): @@ -43,3 +44,12 @@ def js( *args ): """ return "\n".join( [ javascript_include_tag( "/static/scripts/" + name + ".js?v=2" ) for name in args ] ) +# Hashes + +def md5( s ): + """ + Return hex encoded md5 hash of string s + """ + m = hashlib.md5() + m.update( s ) + return m.hexdigest() \ No newline at end of file diff --git a/templates/display_base.mako b/templates/display_base.mako index 303a50ec5db..4521d26f7a1 100644 --- a/templates/display_base.mako +++ b/templates/display_base.mako @@ -152,6 +152,14 @@ %if item.published:
+

Author

+ +

${item.user.username}

+ +
+ + + ## Page meta.

Related ${item_plural}