From 3c7e07406c0054d97fa6e037894eeac491f74d1d Mon Sep 17 00:00:00 2001 From: James Moger Date: Wed, 11 Jul 2012 17:11:20 -0400 Subject: [PATCH] Show email addresses on users panel --- src/com/gitblit/wicket/panels/UsersPanel.html | 2 ++ src/com/gitblit/wicket/panels/UsersPanel.java | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/com/gitblit/wicket/panels/UsersPanel.html b/src/com/gitblit/wicket/panels/UsersPanel.html index aaa7870a..8e0ed1f1 100644 --- a/src/com/gitblit/wicket/panels/UsersPanel.html +++ b/src/com/gitblit/wicket/panels/UsersPanel.html @@ -16,6 +16,7 @@ [users] [display name] + [email address] [access level] [team memberships] [repositories] @@ -25,6 +26,7 @@ [username] [display name] + [email address] [access level] [team memberships] [repositories] diff --git a/src/com/gitblit/wicket/panels/UsersPanel.java b/src/com/gitblit/wicket/panels/UsersPanel.java index 39a5963a..6672c407 100644 --- a/src/com/gitblit/wicket/panels/UsersPanel.java +++ b/src/com/gitblit/wicket/panels/UsersPanel.java @@ -71,7 +71,16 @@ public class UsersPanel extends BasePanel { WicketUtils.setHtmlTooltip(editLink, getString("gb.edit") + " " + entry.getDisplayName()); item.add(editLink); } - + + if (StringUtils.isEmpty(entry.emailAddress)) { + item.add(new Label("emailAddress").setVisible(false)); + } else { + editLink = new LinkPanel("emailAddress", "list", entry.emailAddress, + EditUserPage.class, WicketUtils.newUsernameParameter(entry.username)); + WicketUtils.setHtmlTooltip(editLink, getString("gb.edit") + " " + entry.getDisplayName()); + item.add(editLink); + } + item.add(new Label("accesslevel", entry.canAdmin ? "administrator" : "")); item.add(new Label("teams", entry.teams.size() > 0 ? ("" + entry.teams.size()) : "")); item.add(new Label("repositories", -- 2.39.5