]> source.dussan.org Git - gitblit.git/commitdiff
Show email addresses on users panel
authorJames Moger <james.moger@gitblit.com>
Wed, 11 Jul 2012 21:11:20 +0000 (17:11 -0400)
committerJames Moger <james.moger@gitblit.com>
Wed, 11 Jul 2012 21:11:20 +0000 (17:11 -0400)
src/com/gitblit/wicket/panels/UsersPanel.html
src/com/gitblit/wicket/panels/UsersPanel.java

index aaa7870a7ed1e24f1e24330ea02aa4c5b0d61b8b..8e0ed1f1fe0c162a3bd85a498fad3c699c8e0f33 100644 (file)
@@ -16,6 +16,7 @@
                                <wicket:message key="gb.users">[users]</wicket:message>\r
                        </th>\r
                        <th class="hidden-phone hidden-tablet left"><wicket:message key="gb.displayName">[display name]</wicket:message></th>\r
+                       <th class="hidden-phone hidden-tablet left"><wicket:message key="gb.emailAddress">[email address]</wicket:message></th>\r
                        <th class="hidden-phone" style="width:120px;"><wicket:message key="gb.accessLevel">[access level]</wicket:message></th>\r
                        <th class="hidden-phone" style="width:140px;"><wicket:message key="gb.teamMemberships">[team memberships]</wicket:message></th>\r
                        <th class="hidden-phone" style="width:100px;"><wicket:message key="gb.repositories">[repositories]</wicket:message></th>\r
@@ -25,6 +26,7 @@
                        <tr wicket:id="userRow">\r
                                <td class="left" ><span class="list" wicket:id="username">[username]</span></td>\r
                                <td class="hidden-phone hidden-tablet left" ><span class="list" wicket:id="displayName">[display name]</span></td>\r
+                               <td class="hidden-phone hidden-tablet left" ><span class="list" wicket:id="emailAddress">[email address]</span></td>\r
                                <td class="hidden-phone left" ><span class="list" wicket:id="accesslevel">[access level]</span></td>\r
                                <td class="hidden-phone left" ><span class="list" wicket:id="teams">[team memberships]</span></td>\r
                                <td class="hidden-phone left" ><span class="list" wicket:id="repositories">[repositories]</span></td>\r
index 39a5963a3914f07d80921c53c8a153127f04337a..6672c407ba34a09e19370f42b6b5d38568cf5526 100644 (file)
@@ -71,7 +71,16 @@ public class UsersPanel extends BasePanel {
                                        WicketUtils.setHtmlTooltip(editLink, getString("gb.edit") + " " + entry.getDisplayName());\r
                                        item.add(editLink);\r
                                }\r
-                               \r
+\r
+                               if (StringUtils.isEmpty(entry.emailAddress)) {\r
+                                       item.add(new Label("emailAddress").setVisible(false));\r
+                               } else {\r
+                                       editLink = new LinkPanel("emailAddress", "list", entry.emailAddress,\r
+                                               EditUserPage.class, WicketUtils.newUsernameParameter(entry.username));\r
+                                       WicketUtils.setHtmlTooltip(editLink, getString("gb.edit") + " " + entry.getDisplayName());\r
+                                       item.add(editLink);\r
+                               }\r
+\r
                                item.add(new Label("accesslevel", entry.canAdmin ? "administrator" : ""));\r
                                item.add(new Label("teams", entry.teams.size() > 0 ? ("" + entry.teams.size()) : ""));\r
                                item.add(new Label("repositories",\r