]> source.dussan.org Git - gitblit.git/commitdiff
Strike-through missing owners on summary/overview page
authorJames Moger <james.moger@gitblit.com>
Mon, 17 Jun 2013 20:41:47 +0000 (16:41 -0400)
committerJames Moger <james.moger@gitblit.com>
Mon, 17 Jun 2013 20:41:47 +0000 (16:41 -0400)
src/main/java/com/gitblit/wicket/GitBlitWebApp.properties
src/main/java/com/gitblit/wicket/pages/OverviewPage.java
src/main/java/com/gitblit/wicket/pages/SummaryPage.java

index 0383ee4a8fcee3e7fbfe87f30b05329fdabbbdbd..2e17e605f1a094a4c25344767106313d1af7c106 100644 (file)
@@ -491,4 +491,5 @@ gb.myRepositories = my repositories
 gb.noActivity = there has been no recent commit activity
 gb.findSomeRepositories = find some repositories
 gb.metricAuthorExclusions = author metric exclusions
-gb.myDashboard = my dashboard
\ No newline at end of file
+gb.myDashboard = my dashboard
+gb.failedToFindAccount = failed to find user account ''{0}''
\ No newline at end of file
index 6fd389152bb4a3ad08ca8cb9282fe4bc0e45f016..42d20c5bb0b512b98b332ce52318290f73d69c43 100644 (file)
@@ -78,12 +78,16 @@ public class OverviewPage extends RepositoryPage {
                        private static final long serialVersionUID = 1L;\r
                        int counter = 0;\r
                        public void populateItem(final Item<String> item) {\r
-                               UserModel ownerModel = GitBlit.self().getUserModel(item.getModelObject());\r
+                               String ownername = item.getModelObject();\r
+                               UserModel ownerModel = GitBlit.self().getUserModel(ownername);\r
                                if (ownerModel != null) {\r
                                        item.add(new LinkPanel("owner", null, ownerModel.getDisplayName(), UserPage.class,\r
                                                        WicketUtils.newUsernameParameter(ownerModel.username)).setRenderBodyOnly(true));\r
                                } else {\r
-                                       item.add(new Label("owner").setVisible(false));\r
+                                       Label owner = new Label("owner", ownername);\r
+                                       WicketUtils.setCssStyle(owner, "text-decoration: line-through;");\r
+                                       WicketUtils.setHtmlTooltip(owner,  MessageFormat.format(getString("gb.failedToFindAccount"), ownername));\r
+                                       item.add(owner);\r
                                }\r
                                counter++;\r
                                item.add(new Label("comma", ",").setVisible(counter < owners.size()));\r
index d4ce0f0aab3324b0304b5c63fe73580e61b150ea..19346826ffafcf891288657eb05917764710a1ff 100644 (file)
@@ -96,12 +96,16 @@ public class SummaryPage extends RepositoryPage {
                        private static final long serialVersionUID = 1L;\r
                        int counter = 0;\r
                        public void populateItem(final Item<String> item) {\r
-                               UserModel ownerModel = GitBlit.self().getUserModel(item.getModelObject());\r
+                               String ownername = item.getModelObject();\r
+                               UserModel ownerModel = GitBlit.self().getUserModel(ownername);\r
                                if (ownerModel != null) {\r
                                        item.add(new LinkPanel("owner", null, ownerModel.getDisplayName(), UserPage.class,\r
                                                        WicketUtils.newUsernameParameter(ownerModel.username)).setRenderBodyOnly(true));\r
                                } else {\r
-                                       item.add(new Label("owner").setVisible(false));\r
+                                       Label owner = new Label("owner", ownername);\r
+                                       WicketUtils.setCssStyle(owner, "text-decoration: line-through;");\r
+                                       WicketUtils.setHtmlTooltip(owner,  MessageFormat.format(getString("gb.failedToFindAccount"), ownername));\r
+                                       item.add(owner);\r
                                }\r
                                counter++;\r
                                item.add(new Label("comma", ",").setVisible(counter < owners.size()));\r