]> source.dussan.org Git - gitblit.git/commitdiff
More Bootstrap improvements.
authorJames Moger <james.moger@gitblit.com>
Fri, 30 Sep 2011 21:20:15 +0000 (17:20 -0400)
committerJames Moger <james.moger@gitblit.com>
Fri, 30 Sep 2011 21:20:15 +0000 (17:20 -0400)
* Strip leading group name from repositories page.
* Put topbars on all pages.
* Properly sort repositories in all locations.
* White Gitblit logo.

24 files changed:
docs/gitblit_logo_white.xcf [new file with mode: 0644]
resources/bootstrap.gb.css
resources/gitblt2_white.png [new file with mode: 0644]
resources/gitblt_25_white.png [new file with mode: 0644]
src/com/gitblit/FederationServlet.java
src/com/gitblit/models/FederationModel.java
src/com/gitblit/models/RepositoryModel.java
src/com/gitblit/utils/JGitUtils.java
src/com/gitblit/utils/StringUtils.java
src/com/gitblit/wicket/WicketUtils.java
src/com/gitblit/wicket/pages/BasePage.html
src/com/gitblit/wicket/pages/BasePage.java
src/com/gitblit/wicket/pages/BlamePage.html
src/com/gitblit/wicket/pages/ChangePasswordPage.html
src/com/gitblit/wicket/pages/ChangePasswordPage.java
src/com/gitblit/wicket/pages/EditRepositoryPage.html
src/com/gitblit/wicket/pages/RepositoriesPage.java
src/com/gitblit/wicket/pages/RepositoryPage.html
src/com/gitblit/wicket/pages/RepositoryPage.java
src/com/gitblit/wicket/pages/RootPage.html
src/com/gitblit/wicket/pages/StandardPage.html
src/com/gitblit/wicket/pages/StandardPage.java
src/com/gitblit/wicket/panels/RepositoriesPanel.html
src/com/gitblit/wicket/panels/RepositoriesPanel.java

diff --git a/docs/gitblit_logo_white.xcf b/docs/gitblit_logo_white.xcf
new file mode 100644 (file)
index 0000000..d0d397c
Binary files /dev/null and b/docs/gitblit_logo_white.xcf differ
index 2ea2b5c21a94f2dcb2f2669b5dba6670f3149e85..f7c2f8ee7d2272b559f48492065b5b0ac2601a3f 100644 (file)
@@ -1,7 +1,33 @@
-.topbar{\r
+body, input, select {\r
+       color: #202020;\r
+}\r
+\r
+ul, ol {\r
+       margin:0 !important;\r
+}\r
+\r
+hr {\r
+       margin-top: 10px;\r
+       margin-bottom: 10px;\r
+}\r
+\r
+.page-header h1, .page-header h2 {\r
+       color: #0069D6;\r
+}\r
+\r
+.topbar {\r
        height:40px !important;\r
 }\r
 \r
+.topbar a {\r
+       color: white; \r
+       text-shadow: none;\r
+}\r
+\r
+.nav a:hover {\r
+       color: #abd4ff !important;\r
+}\r
+\r
 .topbar-inner,.topbar .fill{\r
        height:40px !important;\r
        background-color:#000050;\r
@@ -85,7 +111,7 @@ pre.prettyprint ol {
 \r
 a.list {\r
        text-decoration: none;\r
-       color: #000000;\r
+       color: inherit;\r
 }\r
 \r
 a.list.subject {\r
@@ -489,8 +515,8 @@ table.repositories tr.group td {
        color: black;\r
        background-color: #ddd;\r
        padding-left: 5px;\r
-       border-top: 1px solid #ccc;\r
-       border-bottom: 1px solid #ccc;\r
+       border-top: 1px solid #aaa;     \r
+       border-bottom: 1px solid #aaa; \r
 }\r
 \r
 table.palette { border:0; width: 0 !important; }\r
@@ -534,8 +560,6 @@ table.gitnotes td.message {
 }\r
 \r
 table.annotated {\r
-       width: 100%;\r
-       border: 1px solid #bbb;\r
 }\r
 \r
 table.annotated tr.even {\r
@@ -543,7 +567,7 @@ table.annotated tr.even {
 }\r
 \r
 table.annotated tr.odd {\r
-       background-color: #fdfbdf;\r
+       background-color: #f5f5f5;\r
 }\r
 \r
 table.annotated td {\r
@@ -551,6 +575,11 @@ table.annotated td {
        border: 0;\r
 }\r
 \r
+tr th a { background-position: right; padding-right: 15px; background-repeat:no-repeat; }\r
+tr th.wicket_orderDown a {background-image: url(arrow_down.png); }\r
+tr th.wicket_orderUp a { background-image: url(arrow_up.png); }\r
+tr th.wicket_orderNone a { background-image: url(arrow_off.png); }\r
+\r
 tr.light {\r
        background-color: #ffffff;\r
 }\r
@@ -661,6 +690,7 @@ span .localBranch {
 \r
 .feedbackPanelERROR, .feedbackPanelINFO {      \r
        list-style: none;\r
+       line-height: 35px;\r
 }\r
 \r
 .feedbackPanelINFO span, .feedbackPanelERROR span {\r
diff --git a/resources/gitblt2_white.png b/resources/gitblt2_white.png
new file mode 100644 (file)
index 0000000..f4c5463
Binary files /dev/null and b/resources/gitblt2_white.png differ
diff --git a/resources/gitblt_25_white.png b/resources/gitblt_25_white.png
new file mode 100644 (file)
index 0000000..eeea021
Binary files /dev/null and b/resources/gitblt_25_white.png differ
index 7dc5d6a911a2c45f6feb2487f258a31a7f0a76cf..2726a8ac4694de429d3f7987e89a56a0ff3d723c 100644 (file)
@@ -33,7 +33,6 @@ import com.gitblit.Constants.FederationRequest;
 import com.gitblit.Constants.FederationToken;\r
 import com.gitblit.models.FederationModel;\r
 import com.gitblit.models.FederationProposal;\r
-import com.gitblit.models.RepositoryModel;\r
 import com.gitblit.models.UserModel;\r
 import com.gitblit.utils.FederationUtils;\r
 import com.gitblit.utils.HttpUtils;\r
index d67ae561bba2f71379d32fc00f8a46d35926b33e..61c8576b1c566868d9c3f749bd93cf0908de5fd5 100644 (file)
@@ -198,22 +198,7 @@ public class FederationModel implements Serializable, Comparable<FederationModel
                @Override\r
                public int compareTo(RepositoryStatus o) {\r
                        if (status.equals(o.status)) {\r
-                               // sort root repositories first, alphabetically\r
-                               // then sort grouped repositories, alphabetically\r
-                               int s1 = name.indexOf('/');\r
-                               int s2 = o.name.indexOf('/');\r
-                               if (s1 == -1 && s2 == -1) {\r
-                                       // neither grouped\r
-                                       return name.compareTo(o.name);\r
-                               } else if (s1 > -1 && s2 > -1) {\r
-                                       // both grouped\r
-                                       return name.compareTo(o.name);\r
-                               } else if (s1 == -1) {\r
-                                       return -1;\r
-                               } else if (s2 == -1) {\r
-                                       return 1;\r
-                               }\r
-                               return 0;\r
+                               return StringUtils.compareRepositoryNames(name, o.name);\r
                        }\r
                        return status.compareTo(o.status);\r
                }\r
index e85fd6a5982475974a5089ef524cbc39cee19335..d70866fbbfd1391c13d3afc0da1066151e2b4fca 100644 (file)
@@ -22,6 +22,7 @@ import java.util.List;
 \r
 import com.gitblit.Constants.AccessRestrictionType;\r
 import com.gitblit.Constants.FederationStrategy;\r
+import com.gitblit.utils.StringUtils;\r
 \r
 /**\r
  * RepositoryModel is a serializable model class that represents a Gitblit\r
@@ -74,6 +75,6 @@ public class RepositoryModel implements Serializable, Comparable<RepositoryModel
 \r
        @Override\r
        public int compareTo(RepositoryModel o) {\r
-               return name.compareTo(o.name);\r
+               return StringUtils.compareRepositoryNames(name, o.name);\r
        }\r
 }
\ No newline at end of file
index bfbc62400f86a17bdd9363500c4348e3f6372a63..80147d4660b0bf82208e0525abcaea54ef294e89 100644 (file)
@@ -299,7 +299,7 @@ public class JGitUtils {
                }\r
                list.addAll(getRepositoryList(repositoriesFolder.getAbsolutePath(), repositoriesFolder,\r
                                exportAll, searchSubfolders));\r
-               Collections.sort(list);\r
+               StringUtils.sortRepositorynames(list);\r
                return list;\r
        }\r
 \r
index 77d3cbbc2d1801bde76e34e2ecc10d52ab6e2896..f4e9256f6c8a5f4117a7e724c7853d3c0a09a428 100644 (file)
@@ -19,6 +19,8 @@ import java.io.UnsupportedEncodingException;
 import java.security.MessageDigest;\r
 import java.security.NoSuchAlgorithmException;\r
 import java.util.ArrayList;\r
+import java.util.Collections;\r
+import java.util.Comparator;\r
 import java.util.List;\r
 import java.util.regex.PatternSyntaxException;\r
 \r
@@ -395,4 +397,44 @@ public class StringUtils {
                }\r
                return false;\r
        }\r
+\r
+       /**\r
+        * Compare two repository names for proper group sorting.\r
+        * \r
+        * @param r1\r
+        * @param r2\r
+        * @return\r
+        */\r
+       public static int compareRepositoryNames(String r1, String r2) {\r
+               // sort root repositories first, alphabetically\r
+               // then sort grouped repositories, alphabetically\r
+               int s1 = r1.indexOf('/');\r
+               int s2 = r2.indexOf('/');\r
+               if (s1 == -1 && s2 == -1) {\r
+                       // neither grouped\r
+                       return r1.compareTo(r2);\r
+               } else if (s1 > -1 && s2 > -1) {\r
+                       // both grouped\r
+                       return r1.compareTo(r2);\r
+               } else if (s1 == -1) {\r
+                       return -1;\r
+               } else if (s2 == -1) {\r
+                       return 1;\r
+               }\r
+               return 0;\r
+       }\r
+\r
+       /**\r
+        * Sort grouped repository names.\r
+        * \r
+        * @param list\r
+        */\r
+       public static void sortRepositorynames(List<String> list) {\r
+               Collections.sort(list, new Comparator<String>() {\r
+                       @Override\r
+                       public int compare(String o1, String o2) {\r
+                               return compareRepositoryNames(o1, o2);\r
+                       }\r
+               });\r
+       }\r
 }\r
index 36f74a1595b501a2e526479dae80087688a9351a..3ffd6cd75dfc13c3a99caca26d8f10d4bc8a19b6 100644 (file)
@@ -102,7 +102,7 @@ public class WicketUtils {
        }\r
 \r
        public static void setAlternatingBackground(Component c, int i) {\r
-               String clazz = i % 2 == 0 ? "dark" : "light";\r
+               String clazz = i % 2 == 0 ? "light" : "dark";\r
                setCssClass(c, clazz);\r
        }\r
 \r
index 3fa1a4d5971fc2e4dc024b6acf1090469167b86d..a089e2a9a719252be094e9f3f7d24eac9e42e5a4 100644 (file)
@@ -22,7 +22,9 @@
                <!-- page footer -->\r
                <div class="page_footer">\r
                        <div style="float:right">\r
-                               <span wicket:id="gbVersion"></span> \r
+                               <a title="gitblit homepage" href="http://gitblit.com/">\r
+                                       <span wicket:id="gbVersion"></span>\r
+                               </a> \r
                        </div>\r
                        <div wicket:id="userPanel">[user panel]</div>\r
                </div>\r
index 0cb91d57ba853d8ecad365e2c301f9bd8a43c7aa..d31979ddf9e128eb518de4ec8d08dc1bd94bec8c 100644 (file)
@@ -29,6 +29,7 @@ import org.apache.wicket.RestartResponseException;
 import org.apache.wicket.markup.html.WebPage;\r
 import org.apache.wicket.markup.html.basic.Label;\r
 import org.apache.wicket.markup.html.link.BookmarkablePageLink;\r
+import org.apache.wicket.markup.html.link.ExternalLink;\r
 import org.apache.wicket.markup.html.panel.FeedbackPanel;\r
 import org.apache.wicket.markup.html.panel.Fragment;\r
 import org.apache.wicket.protocol.http.WebRequest;\r
@@ -44,6 +45,7 @@ import com.gitblit.GitBlit;
 import com.gitblit.Keys;\r
 import com.gitblit.models.UserModel;\r
 import com.gitblit.wicket.GitBlitWebSession;\r
+import com.gitblit.wicket.WicketUtils;\r
 import com.gitblit.wicket.panels.LinkPanel;\r
 \r
 public abstract class BasePage extends WebPage {\r
@@ -92,6 +94,10 @@ public abstract class BasePage extends WebPage {
                        add(new Label("title", getServerName()));\r
                }\r
 \r
+               ExternalLink rootLink = new ExternalLink("rootLink", urlFor(RepositoriesPage.class, null).toString());\r
+               WicketUtils.setHtmlTooltip(rootLink, GitBlit.getString(Keys.web.siteName, Constants.NAME));\r
+               add(rootLink);\r
+\r
                // Feedback panel for info, warning, and non-fatal error messages\r
                add(new FeedbackPanel("feedback"));\r
 \r
index 2e20c189a8814e779d8fca819b55fc193d224bfb..ccbfcecb7fdf3a979b7d8cea43aa650b341f62ae 100644 (file)
        <div wicket:id="breadcrumbs">[breadcrumbs]</div>\r
                \r
        <!--  blame content -->\r
-       <table class="annotated" style="border-top: 0px; margin-bottom:5px;">\r
+       <table class="annotated" style="margin-bottom:5px;">\r
                <tbody>\r
                        <tr>\r
                                <th>Commit</th>\r
                                <th>Line</th>\r
-                               <th>Data</th>\r
+                               <th>Content</th>\r
                        </tr>\r
                        <tr wicket:id="annotation">\r
                                <td><span class="sha1" wicket:id="commit"></span></td>\r
index 031352ebe770e38b188b6ca34e40f05bc34b42be..938e0eca3a360118cc51a211f68aaf911ff4e1a6 100644 (file)
@@ -4,20 +4,9 @@
       xml:lang="en"  \r
       lang="en"> \r
       \r
-       <!-- Head with Wicket-controlled resources in this package -->\r
-       <wicket:head>\r
-               <title wicket:id="title">[page title]</title>\r
-               <link rel="stylesheet" type="text/css" href="gitblit.css"/>\r
-               <link rel="shortcut icon" href="gitblt-favicon.png" type="image/png" />\r
-       </wicket:head>\r
-       \r
+       <wicket:extend>\r
        <body onload="document.getElementById('password').focus();">\r
                <div>\r
-                       <div style="padding-top: 10px;text-align:center;">\r
-                               <img src="gitblt_25.png" alt="Gitblit"/><br/>\r
-                               <div style="padding-top:30px;font-weight:bold;" wicket:id="name"></div>\r
-                       </div>\r
-                       <p/>\r
                        <form style="text-align:center;" wicket:id="passwordForm">\r
                                <center>\r
                                        <table class="plain">\r
                                                <td class="edit"><input type="password" wicket:id="confirmPassword" size="30" tabindex="2" /></td>\r
                                        </tr>\r
                                        </table>\r
-                                       <input type="submit" wicket:message="value:gb.save" wicket:id="save" tabindex="3" />\r
-                                       <input type="submit" wicket:message="value:gb.cancel" wicket:id="cancel" tabindex="4" />\r
-                                       <div style="padding-top:10px;" wicket:id="feedback"></div>\r
+                                       <input class="btn" type="submit" wicket:message="value:gb.cancel" wicket:id="cancel" tabindex="3" />\r
+                                       <input class="btn primary" type="submit" wicket:message="value:gb.save" wicket:id="save" tabindex="4" />\r
                                </center>\r
                        </form>                 \r
                </div>\r
        </body>\r
+       </wicket:extend>\r
 </html>
\ No newline at end of file
index 054b343078d1b0c48f180321337272e69b918a23..660a813101b9c725122f5c154eb19ef14bbf4ef2 100644 (file)
@@ -18,17 +18,13 @@ package com.gitblit.wicket.pages;
 import java.text.MessageFormat;\r
 \r
 import org.apache.wicket.RestartResponseException;\r
-import org.apache.wicket.markup.html.WebPage;\r
-import org.apache.wicket.markup.html.basic.Label;\r
 import org.apache.wicket.markup.html.form.Button;\r
 import org.apache.wicket.markup.html.form.PasswordTextField;\r
 import org.apache.wicket.markup.html.form.StatelessForm;\r
-import org.apache.wicket.markup.html.panel.FeedbackPanel;\r
 import org.apache.wicket.model.IModel;\r
 import org.apache.wicket.model.Model;\r
 import org.apache.wicket.protocol.http.WebResponse;\r
 \r
-import com.gitblit.Constants;\r
 import com.gitblit.GitBlit;\r
 import com.gitblit.GitBlitException;\r
 import com.gitblit.Keys;\r
@@ -36,7 +32,7 @@ import com.gitblit.models.UserModel;
 import com.gitblit.utils.StringUtils;\r
 import com.gitblit.wicket.GitBlitWebSession;\r
 \r
-public class ChangePasswordPage extends WebPage {\r
+public class ChangePasswordPage extends StandardPage {\r
 \r
        IModel<String> password = new Model<String>("");\r
        IModel<String> confirmPassword = new Model<String>("");\r
@@ -54,10 +50,7 @@ public class ChangePasswordPage extends WebPage {
                        // no authentication enabled\r
                        throw new RestartResponseException(getApplication().getHomePage());\r
                }\r
-\r
-               add(new Label("title", GitBlit.getString(Keys.web.siteName, Constants.NAME)));\r
-               add(new Label("name", getString("gb.changePassword") + ": "\r
-                               + GitBlitWebSession.get().getUser().username));\r
+               setupPage(getString("gb.changePassword"), GitBlitWebSession.get().getUser().username);\r
 \r
                StatelessForm<Void> form = new StatelessForm<Void>("passwordForm") {\r
 \r
@@ -115,7 +108,6 @@ public class ChangePasswordPage extends WebPage {
                                confirmPassword);\r
                confirmPasswordField.setResetPassword(false);\r
                form.add(confirmPasswordField);\r
-               form.add(new FeedbackPanel("feedback"));\r
 \r
                form.add(new Button("save"));\r
                Button cancel = new Button("cancel") {\r
index f9a0f7933d0f47860fdf60efd2ed93ac1765a83d..7f09f75c363f20f11c866d2e3e64c1dc28c28057 100644 (file)
                        <tbody>\r
                                <tr><th><wicket:message key="gb.name"></wicket:message></th><td class="edit"><input class="span6" type="text" wicket:id="name" id="name" size="40" tabindex="1" /> &nbsp;<i><wicket:message key="gb.nameDescription"></wicket:message></i></td></tr>\r
                                <tr><th><wicket:message key="gb.description"></wicket:message></th><td class="edit"><input class="span6" type="text" wicket:id="description" size="40" tabindex="2" /></td></tr>\r
-                               <tr><th><wicket:message key="gb.origin"></wicket:message></th><td class="edit"><input class="span6" type="text" wicket:id="origin" size="80" tabindex="3" /></td></tr>\r
+                               <tr><th><wicket:message key="gb.origin"></wicket:message></th><td class="edit"><input class="span7" type="text" wicket:id="origin" size="80" tabindex="3" /></td></tr>\r
                                <tr><th><wicket:message key="gb.owner"></wicket:message></th><td class="edit"><select wicket:id="owner" tabindex="4" /> &nbsp;<i><wicket:message key="gb.ownerDescription"></wicket:message></i></td></tr>\r
                                <tr><th><wicket:message key="gb.enableTickets"></wicket:message></th><td class="edit"><input type="checkbox" wicket:id="useTickets" tabindex="5" /> &nbsp;<i><wicket:message key="gb.useTicketsDescription"></wicket:message></i></td></tr>\r
                                <tr><th><wicket:message key="gb.enableDocs"></wicket:message></th><td class="edit"><input type="checkbox" wicket:id="useDocs" tabindex="6" /> &nbsp;<i><wicket:message key="gb.useDocsDescription"></wicket:message></i></td></tr>\r
                                <tr><th><wicket:message key="gb.showRemoteBranches"></wicket:message></th><td class="edit"><input type="checkbox" wicket:id="showRemoteBranches" tabindex="7" /> &nbsp;<i><wicket:message key="gb.showRemoteBranchesDescription"></wicket:message></i></td></tr>\r
                                <tr><th><wicket:message key="gb.showReadme"></wicket:message></th><td class="edit"><input type="checkbox" wicket:id="showReadme" tabindex="8" /> &nbsp;<i><wicket:message key="gb.showReadmeDescription"></wicket:message></i></td></tr>\r
                                <tr><th><wicket:message key="gb.isFrozen"></wicket:message></th><td class="edit"><input type="checkbox" wicket:id="isFrozen" tabindex="9" /> &nbsp;<i><wicket:message key="gb.isFrozenDescription"></wicket:message></i></td></tr>\r
-                               <tr><td style="padding-top:10px;" colspan="2"><hr></hr></td></tr>\r
+                               <tr><td colspan="2"><hr></hr></td></tr>\r
                                <tr><th><wicket:message key="gb.accessRestriction"></wicket:message></th><td class="edit"><select class="span6" wicket:id="accessRestriction" tabindex="10" /></td></tr>                                \r
                                <tr><th style="vertical-align: top;"><wicket:message key="gb.permittedUsers"></wicket:message></th><td style="padding:2px;"><span wicket:id="users"></span></td></tr>\r
-                               <tr><td style="padding-top:10px;" colspan="2"><hr></hr></td></tr>                               \r
+                               <tr><td colspan="2"><hr></hr></td></tr>         \r
                                <tr><th><wicket:message key="gb.federationStrategy"></wicket:message></th><td class="edit"><select class="span6" wicket:id="federationStrategy" tabindex="11" /></td></tr>\r
-                               <tr><th style="vertical-align: top;"><wicket:message key="gb.federationSets"></wicket:message></th><td style="padding:2px;"><span wicket:id="federationSets"></span></td></tr>                          \r
+                               <tr><th style="vertical-align: top;"><wicket:message key="gb.federationSets"></wicket:message></th><td style="padding:2px;"><span wicket:id="federationSets"></span></td></tr>\r
                                <tr><th></th><td class="editButton"><input class="btn" type="submit" value="Cancel" wicket:message="value:gb.cancel" wicket:id="cancel" tabindex="12" /> &nbsp; <input class="btn primary" type="submit" value="Save" wicket:message="value:gb.save" wicket:id="save" tabindex="13" /> </td></tr>\r
                        </tbody>\r
                </table>\r
index ce532a767164b5167756a9c23e572aaeef7762f5..5339760e83a09ec05c4abb5c2c576e9e2a225de0 100644 (file)
@@ -34,11 +34,11 @@ import com.gitblit.wicket.panels.RepositoriesPanel;
 public class RepositoriesPage extends RootPage {\r
 \r
        public RepositoriesPage() {\r
-               super();                \r
+               super();\r
 \r
                // Load the markdown welcome message\r
                String messageSource = GitBlit.getString(Keys.web.repositoriesMessage, "gitblit");\r
-               String message = "<br/>";\r
+               String message = "";\r
                if (messageSource.equalsIgnoreCase("gitblit")) {\r
                        // Read default welcome message\r
                        try {\r
@@ -69,8 +69,15 @@ public class RepositoriesPage extends RootPage {
                        }\r
                }\r
                Component repositoriesMessage = new Label("repositoriesMessage", message)\r
-                               .setEscapeModelStrings(false);\r
+                               .setEscapeModelStrings(false).setVisible(message.length() > 0);\r
                add(repositoriesMessage);\r
-               add(new RepositoriesPanel("repositoriesPanel", showAdmin, null, getAccessRestrictions()));              \r
+               RepositoriesPanel repositories = new RepositoriesPanel("repositoriesPanel", showAdmin,\r
+                               null, getAccessRestrictions());\r
+               // push the panel down if we are hiding the admin controls and the\r
+               // welcome message\r
+               if (!showAdmin && !repositoriesMessage.isVisible()) {\r
+                       WicketUtils.setCssStyle(repositories, "padding-top:5px;");\r
+               }\r
+               add(repositories);\r
        }\r
 }\r
index 8a8b177e214f1918cf16e7de1c134a79bd9b4780..100016f1545ddce1a869d24cc683328e5b197897 100644 (file)
@@ -12,8 +12,8 @@
                        <div class="topbar">\r
                        <div class="fill">\r
                        <div class="container">\r
-                               <a class="brand" title="gitblit homepage" href="http://gitblit.com/">\r
-                                       <img src="gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/>\r
+                               <a class="brand" wicket:id="rootLink">\r
+                                       <img src="gitblt_25_white.png" width="79" height="25" alt="gitblit" class="logo"/>\r
                                </a>\r
                                <ul class="nav">                                \r
                                        <li><a wicket:id="repositories"><wicket:message key="gb.repositories"></wicket:message></a></li>\r
index af29f591f282874d7af603ec9e343aad451005b0..777401a11bc267fb8a0296eb48d06367f71f63f1 100644 (file)
@@ -137,7 +137,7 @@ public abstract class RepositoryPage extends BasePage {
                                PageRegistration pageReg = registeredPages.get(extra);\r
                                item.add(new LinkPanel("extraLink", null, getString(pageReg.translationKey),\r
                                                pageReg.pageClass, WicketUtils.newRepositoryParameter(repositoryName))\r
-                                               .setEnabled(!extra.equals(pageWicketId)));\r
+                                               /*.setEnabled(!extra.equals(pageWicketId))*/);\r
                        }\r
                };\r
                add(extrasView);\r
@@ -182,8 +182,8 @@ public abstract class RepositoryPage extends BasePage {
                if (!StringUtils.isEmpty(wicketId)) {\r
                        Component c = get(wicketId);\r
                        if (c != null) {\r
-                               //c.setEnabled(false);\r
-                               WicketUtils.setCssClass(c, "active");\r
+//                             c.setEnabled(false);\r
+//                             WicketUtils.setCssClass(c, "selected");\r
                        }\r
                }\r
        }\r
index 59a0fe142c5587be5adb4650834d5f911787a56e..0fa6cfc6e58a4724789ad1c1937b7d69779d62b1 100644 (file)
@@ -8,8 +8,8 @@
        <div class="topbar">\r
                <div class="fill">\r
                        <div class="container">\r
-                               <a class="brand" title="gitblit homepage" href="http://gitblit.com/">\r
-                                       <img src="gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/>                            \r
+                               <a class="brand" wicket:id="rootLink">\r
+                                       <img src="gitblt_25_white.png" width="79" height="25" alt="gitblit" class="logo"/>\r
                                </a>\r
                                \r
                                <ul class="nav">                                \r
index cb6dcd5cc67a9820ed63f567290c322e50fcf926..14ec15c8b53fd38672546a3916781881eb9a1331 100644 (file)
@@ -10,9 +10,9 @@
        <div class="topbar">\r
                <div class="fill">\r
                        <div class="container">\r
-                               <a class="brand" title="gitblit homepage" href="http://gitblit.com/">\r
-                                       <img src="gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/>                            \r
-                               </a>                            \r
+                               <a class="brand" wicket:id="rootLink">\r
+                                       <img src="gitblt_25_white.png" width="79" height="25" alt="gitblit" class="logo"/>\r
+                               </a>\r
                        </div>\r
                </div>\r
        </div>\r
index ff16b631041cf3792dc184c832e14b5b3b02e8a8..45989317e79ca343a38f620189fe1b83aeef901d 100644 (file)
@@ -18,6 +18,8 @@ package com.gitblit.wicket.pages;
 import org.apache.wicket.PageParameters;\r
 import org.apache.wicket.markup.html.basic.Label;\r
 \r
+import com.gitblit.utils.StringUtils;\r
+\r
 public abstract class StandardPage extends BasePage {\r
        \r
        public StandardPage() {\r
@@ -34,7 +36,10 @@ public abstract class StandardPage extends BasePage {
 \r
        protected void setupPage(String pageName, String subName) {             \r
                add(new Label("pageName", pageName));\r
-               add(new Label("pageSubName", "/ " + subName));\r
+               if (!StringUtils.isEmpty(subName)) {\r
+                       subName = "/ " + subName;\r
+               }\r
+               add(new Label("pageSubName", subName));\r
                super.setupPage("", pageName);\r
        }\r
 }\r
index 11484e23e88525e2a143ac98a42faf157aa31412..41741e8998e6e02d848264f08ea64628923a5619 100644 (file)
@@ -71,7 +71,7 @@
        </wicket:fragment>\r
                \r
        <wicket:fragment wicket:id="repositoryRow">\r
-        <td class="left"><div class="list" wicket:id="repositoryName">[repository name]</div></td>\r
+        <td class="left" style="padding-left:10px;" ><div class="list" wicket:id="repositoryName">[repository name]</div></td>\r
         <td><div class="list" wicket:id="repositoryDescription">[repository description]</div></td>\r
         <td class="author"><span wicket:id="repositoryOwner">[repository owner]</span></td>\r
         <td style="text-align: right;padding-right:10px;"><img class="inlineIcon" wicket:id="ticketsIcon" /><img class="inlineIcon" wicket:id="docsIcon" /><img class="inlineIcon" wicket:id="frozenIcon" /><img class="inlineIcon" wicket:id="federatedIcon" /><img class="inlineIcon" wicket:id="accessRestrictionIcon" /></td>\r
index 63b512c2750db4923cadaba9ee1754ed6fbe44f0..e51497611684774a6ac5e232a17aaf8e26e5c189 100644 (file)
@@ -125,12 +125,13 @@ public class RepositoriesPanel extends BasePanel {
                } else {\r
                        dp = new SortableRepositoriesProvider(models);\r
                }\r
-               \r
+\r
                final String baseUrl = WicketUtils.getGitblitURL(getRequest());\r
 \r
                DataView<RepositoryModel> dataView = new DataView<RepositoryModel>("row", dp) {\r
                        private static final long serialVersionUID = 1L;\r
                        int counter;\r
+                       String currGroupName;\r
 \r
                        @Override\r
                        protected void onBeforeRender() {\r
@@ -141,23 +142,32 @@ public class RepositoriesPanel extends BasePanel {
                        public void populateItem(final Item<RepositoryModel> item) {\r
                                final RepositoryModel entry = item.getModelObject();\r
                                if (entry instanceof GroupRepositoryModel) {\r
+                                       currGroupName = entry.name;\r
                                        Fragment row = new Fragment("rowContent", "groupRepositoryRow", this);\r
                                        item.add(row);\r
                                        row.add(new Label("groupName", entry.toString()));\r
                                        WicketUtils.setCssClass(item, "group");\r
+                                       // reset counter so that first row is light background\r
+                                       counter = 0;\r
                                        return;\r
                                }\r
                                Fragment row = new Fragment("rowContent", "repositoryRow", this);\r
                                item.add(row);\r
+                               \r
+                               // try to strip group name for less cluttered list\r
+                               String repoName = entry.name;\r
+                               if (!StringUtils.isEmpty(currGroupName) && (repoName.indexOf('/') > -1)) {\r
+                                       repoName = repoName.substring(currGroupName.length() + 1);\r
+                               }\r
+                               \r
                                if (entry.hasCommits && linksActive) {\r
                                        PageParameters pp = WicketUtils.newRepositoryParameter(entry.name);\r
-                                       row.add(new LinkPanel("repositoryName", "list", entry.name, SummaryPage.class,\r
-                                                       pp));\r
+                                       row.add(new LinkPanel("repositoryName", "list", repoName, SummaryPage.class, pp));\r
                                        row.add(new LinkPanel("repositoryDescription", "list", entry.description,\r
                                                        SummaryPage.class, pp));\r
                                } else {\r
                                        // new/empty repository OR proposed repository\r
-                                       row.add(new Label("repositoryName", entry.name));\r
+                                       row.add(new Label("repositoryName", repoName));\r
                                        row.add(new Label("repositoryDescription", entry.description));\r
                                }\r
 \r