diff --git a/realms/modules/wiki/models.py b/realms/modules/wiki/models.py index d50d755..6d41c53 100644 --- a/realms/modules/wiki/models.py +++ b/realms/modules/wiki/models.py @@ -289,9 +289,10 @@ class Wiki(HookMixin): change_type = change.type elif change.new.path == file_path: change_type = change.type - author_name, author_email = entry.commit.author.split('<') + author_name, author_email = entry.commit.author.rstrip('>').split('<') versions.append(dict( author=author_name.strip(), + author_email=author_email, time=entry.commit.author_time, message=entry.commit.message, sha=entry.commit.id, diff --git a/realms/modules/wiki/views.py b/realms/modules/wiki/views.py index 2d5025d..7c02c0a 100644 --- a/realms/modules/wiki/views.py +++ b/realms/modules/wiki/views.py @@ -2,7 +2,7 @@ import itertools import sys from flask import abort, g, render_template, request, redirect, Blueprint, flash, url_for, current_app from flask.ext.login import login_required, current_user -from realms.lib.util import to_canonical, remove_ext +from realms.lib.util import to_canonical, remove_ext, gravatar_url from .models import PageNotFound blueprint = Blueprint('wiki', __name__) @@ -66,7 +66,10 @@ def history(name): if current_app.config.get('PRIVATE_WIKI') and current_user.is_anonymous(): return current_app.login_manager.unauthorized() - return render_template('wiki/history.html', name=name, history=g.current_wiki.get_history(name)) + hist = g.current_wiki.get_history(name) + for item in hist: + item['gravatar'] = gravatar_url(item['author_email']) + return render_template('wiki/history.html', name=name, history=hist) @blueprint.route("/_edit/") diff --git a/realms/static/css/style.css b/realms/static/css/style.css index fffdea6..f4dc59e 100644 --- a/realms/static/css/style.css +++ b/realms/static/css/style.css @@ -83,9 +83,7 @@ float: right; } -.user-avatar a img { - width: 24px; - height: 24px; +.avatar { -webkit-box-shadow: 0 1px 3px #1e1e1e; -moz-box-shadow: 0 1px 3px #1e1e1e; box-shadow: 0 1px 3px #1e1e1e; diff --git a/realms/templates/layout.html b/realms/templates/layout.html index aa8a41a..d80b94c 100644 --- a/realms/templates/layout.html +++ b/realms/templates/layout.html @@ -62,7 +62,7 @@