]> source.dussan.org Git - gitblit.git/commitdiff
Added new repository link to user menu
authorJames Moger <james.moger@gitblit.com>
Wed, 19 Jun 2013 02:32:29 +0000 (22:32 -0400)
committerJames Moger <james.moger@gitblit.com>
Wed, 19 Jun 2013 02:32:29 +0000 (22:32 -0400)
src/main/java/com/gitblit/wicket/pages/RootPage.html
src/main/java/com/gitblit/wicket/pages/RootPage.java

index b93c4f53f9db67ffb7c03801f973ee57b6b285ac..69cd5f0a616644d2a1255e90c7bb665c0ed1bc69 100644 (file)
@@ -53,6 +53,7 @@
                <ul class="dropdown-menu">\r
                        <li style="color:#ccc;padding-left:15px;font-weight:bold;"><span wicket:id="displayName"></span></li>\r
                        <li class="divider"></li>\r
+               <li><a wicket:id="newRepository"><wicket:message key="gb.newRepository"></wicket:message></a></li>\r
                <li><a wicket:id="myProfile"><wicket:message key="gb.myProfile"></wicket:message></a></li>\r
                <li><a wicket:id="changePassword"><wicket:message key="gb.changePassword"></wicket:message></a></li>\r
                <li class="divider"></li>\r
index 8c1a56857570a78106711083f0af4fb13b4a171c..8760f5c59ed14e00120b918dc385289eec2969af 100644 (file)
@@ -522,7 +522,10 @@ public abstract class RootPage extends BasePage {
                        }\r
 \r
                        add(new Label("displayName", user.getDisplayName()));\r
-                       \r
+\r
+                       add(new BookmarkablePageLink<Void>("newRepository",\r
+                                       EditRepositoryPage.class).setVisible(user.canAdmin() || user.canCreate()));\r
+\r
                        add(new BookmarkablePageLink<Void>("myProfile", \r
                                        UserPage.class, WicketUtils.newUsernameParameter(user.username)));\r
 \r