use of com.gitblit.wicket.panels.AvatarImage in project gitblit by gitblit.
the class TicketPage method addUserAttributions.
protected void addUserAttributions(MarkupContainer container, Change entry, int avatarSize) {
UserModel commenter = app().users().getUserModel(entry.author);
if (commenter == null) {
// unknown user
container.add(new AvatarImage("changeAvatar", entry.author, entry.author, null, avatarSize, false).setVisible(avatarSize > 0));
container.add(new Label("changeAuthor", entry.author.toLowerCase()));
} else {
// known user
container.add(new AvatarImage("changeAvatar", commenter.getDisplayName(), commenter.emailAddress, avatarSize > 24 ? "gravatar-round" : null, avatarSize, true).setVisible(avatarSize > 0));
container.add(new LinkPanel("changeAuthor", null, commenter.getDisplayName(), UserPage.class, WicketUtils.newUsernameParameter(commenter.username)));
}
}
Aggregations