resolve gravatar on blame

This commit is contained in:
nazoking
2015-03-09 23:42:04 +09:00
parent e408eb43bb
commit 3e0a50926f

View File

@@ -117,8 +117,8 @@ object helpers extends AvatarImageProvider with LinkConverter with RequestCache
* Returns <img> which displays the avatar icon for the given user name.
* This method looks up Gravatar if avatar icon has not been configured in user settings.
*/
def avatar(userName: String, size: Int, tooltip: Boolean = false)(implicit context: Context): Html =
getAvatarImageHtml(userName, size, "", tooltip)
def avatar(userName: String, size: Int, tooltip: Boolean = false, mailAddress: String = "")(implicit context: Context): Html =
getAvatarImageHtml(userName, size, mailAddress, tooltip)
/**
* Returns <img> which displays the avatar icon for the given mail address.
@@ -198,7 +198,7 @@ object helpers extends AvatarImageProvider with LinkConverter with RequestCache
* If user does not exist or disabled, this method returns avatar image without link.
*/
def avatarLink(userName: String, size: Int, mailAddress: String = "", tooltip: Boolean = false)(implicit context: Context): Html =
userWithContent(userName, mailAddress)(avatar(userName, size, tooltip))
userWithContent(userName, mailAddress)(avatar(userName, size, tooltip, mailAddress))
private def userWithContent(userName: String, mailAddress: String = "", styleClass: String = "")(content: Html)(implicit context: Context): Html =
(if(mailAddress.isEmpty){