]> source.dussan.org Git - gitblit.git/commitdiff
Login message option. More Bootstrap updates. All docs converted.
authorJames Moger <james.moger@gitblit.com>
Sat, 1 Oct 2011 03:58:26 +0000 (23:58 -0400)
committerJames Moger <james.moger@gitblit.com>
Sat, 1 Oct 2011 03:58:26 +0000 (23:58 -0400)
21 files changed:
NOTICE
build.xml
distrib/gitblit.properties
docs/00_index.mkd
docs/02_federation.mkd
docs/04_design.mkd
docs/04_releases.mkd
docs/doc_footer.html
docs/doc_header.html
docs/site_footer.html
docs/site_header.html
resources/bootstrap.gb.css
resources/login.mkd [new file with mode: 0644]
src/com/gitblit/build/BuildSite.java
src/com/gitblit/wicket/AuthorizationStrategy.java
src/com/gitblit/wicket/GitBlitWebApp.properties
src/com/gitblit/wicket/pages/EditUserPage.java
src/com/gitblit/wicket/pages/RepositoriesPage.java
src/com/gitblit/wicket/pages/RepositoryPage.java
src/com/gitblit/wicket/pages/RootPage.html
src/com/gitblit/wicket/pages/RootPage.java

diff --git a/NOTICE b/NOTICE
index 41b61f12cca691f90312c1d62f3d6d638d35331a..5e498037abb6293030c46b5b1b3eb141fb079ec4 100644 (file)
--- a/NOTICE
+++ b/NOTICE
@@ -7,6 +7,14 @@ The Apache Software Foundation (http://www.apache.org/).
 This is an aggregated NOTICE file for the projects included\r
 in this distribution or linked to by this distribution.\r
 \r
+---------------------------------------------------------------------------\r
+Bootstrap\r
+---------------------------------------------------------------------------\r
+   Bootstrap, released under the\r
+   Apache Software License, Version 2.0.\r
+\r
+   http://twitter.github.com/bootstrap\r
+\r
 ---------------------------------------------------------------------------\r
 google-code-prettify\r
 ---------------------------------------------------------------------------\r
index e803d11791c7d97fc1f4873c81483483f1cc30a4..9a589711dbe91da6c5a230bbee574a1805a22856 100644 (file)
--- a/build.xml
+++ b/build.xml
                        <copy todir="${docs.output.dir}">\r
                                <!-- Copy selected Gitblit resources -->\r
                                <fileset dir="${project.resources.dir}">\r
-                                       <include name="background.png" />\r
-                                       <include name="gitblit.css" />\r
+                                       <include name="bootstrap.130.css" />\r
+                                       <include name="bootstrap.gb.css" />\r
                                        <include name="markdown.css" />\r
-                                       <include name="gitblt_25.png" />\r
+                                       <include name="gitblt_25_white.png" />\r
                                        <include name="gitblt-favicon.png" />\r
                                        <include name="lock_go_16x16.png" />\r
                                        <include name="lock_pull_16x16.png" />\r
                <copy todir="${project.site.dir}">\r
                        <!-- Copy selected Gitblit resources -->\r
                        <fileset dir="${project.resources.dir}">\r
-                               <include name="background.png" />\r
-                               <include name="gitblit.css" />\r
+                               <include name="bootstrap.130.css" />\r
+                               <include name="bootstrap.gb.css" />\r
                                <include name="markdown.css" />\r
-                               <include name="gitblt_25.png" />\r
+                               <include name="gitblt_25_white.png" />\r
                                <include name="gitblt-favicon.png" />\r
                                <include name="lock_go_16x16.png" />\r
                                <include name="lock_pull_16x16.png" />\r
index 5493b25b4b37274de45447309c7da5347d93bbd9..5b2b576a567f20f6ca5835d6ef71e119c3d9bfa0 100644 (file)
@@ -110,7 +110,14 @@ web.showRepositorySizes = true
 # SINCE 0.6.0\r
 web.showFederationRegistrations = false\r
 \r
-# This is the message display above the repositories table.\r
+# This is the message displayed when *web.authenticateViewPages=true*.\r
+# This can point to a file with Markdown content.\r
+# Specifying "gitblit" uses the internal login message.\r
+#\r
+# SINCE 0.6.1\r
+web.loginMessage = gitblit\r
+\r
+# This is the message displayed above the repositories table.\r
 # This can point to a file with Markdown content.\r
 # Specifying "gitblit" uses the internal welcome message.\r
 #\r
index 2c40e1ef0c37acdc1ac48a638950167b0cb0b8c0..fde2d3498b5ec4ce1c5b254614706d64caa2912c 100644 (file)
@@ -28,6 +28,8 @@ Gitblit requires a Java 6 Runtime Environment (JRE) or a Java 6 Development Kit
 \r
 **%VERSION%** ([go](http://code.google.com/p/gitblit/downloads/detail?name=%GO%)|[war](http://code.google.com/p/gitblit/downloads/detail?name=%WAR%)|[fedclient](http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%)) based on [%JGIT%][jgit] &nbsp; *released %BUILDDATE%*\r
 \r
+- improved: updated ui with Twitter's Bootstrap CSS toolkit\r
+<br/>**New:** *web.loginMessage = gitblit*\r
 - fixed: Null pointer exception if did not set federation strategy (issue 20)\r
 - fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later\r
 - added: IUserService.setup(IStoredSettings) for custom user service implementations\r
index f77d7034f50aa3747a701749780864ce2ddd2992..abf171e3701689f7f10070df0b562c902a1b4864 100644 (file)
@@ -175,7 +175,7 @@ By default, federated repositories can not be pushed to, they are read-only by t
 \r
 ## Federation Pull Registration Keys\r
 \r
-<table class="text">\r
+<table>\r
 <tr><th>federation.N.url</th>\r
 <td>string</td>\r
 <td>the url of the origin Gitblit instance *(required)*</td>\r
index 523d31b938daf6c1fb53fe8a6f66954dd56ff41d..fe22674d3e722e335f827b738df6514d373379ad 100644 (file)
@@ -10,6 +10,7 @@
 ### Bundled Dependencies\r
 The following dependencies are bundled with Gitblit.\r
 \r
+- [Bootstrap](http://twitter.github.com/bootstrap) (Apache 2.0)\r
 - [google-code-prettify](http://code.google.com/p/google-code-prettify) (Apache 2.0)\r
 - [Commons Daemon](http://commons.apache.org/daemon) (Apache 2.0)\r
 - magnifying glass search icon courtesy of [Gnome](http://gnome.org) (Creative Commons CC-BY)\r
index 667e5f2e0a0b282be6b8184ef145a288654fd53d..cb1f898d910cc5678e70d0dfed143937aa7e1220 100644 (file)
@@ -3,6 +3,8 @@
 ### Current Release\r
 **%VERSION%** ([go](http://code.google.com/p/gitblit/downloads/detail?name=%GO%)|[war](http://code.google.com/p/gitblit/downloads/detail?name=%WAR%)|[fedclient](http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%)) based on [%JGIT%][jgit] &nbsp; *released %BUILDDATE%*\r
 \r
+- improved: updated ui with Twitter's Bootstrap CSS toolkit\r
+<br/>**New:** *web.loginMessage = gitblit*\r
 - fixed: Null pointer exception if did not set federation strategy (issue 20)\r
 - fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later\r
 - added: IUserService.setup(IStoredSettings) for custom user service implementations\r
index e1a57381656ecebdf80c0a3946874a57a22b7b17..ab2d7ee8eb62d4a3316c97562df1e2eefc658b22 100644 (file)
@@ -1,7 +1,9 @@
-       </div>\r
-       <div style="margin-top:10px" class="page_footer">\r
-               <div style="float:right;">{0}</div>\r
-       The content of this page is licensed under the <a href="http://creativecommons.org/licenses/by/3.0">Creative Commons Attribution 3.0 License</a>.\r
-       </div>\r
+                       </div> <!-- markdown -->\r
+                       <div style="margin-top:10px" class="page_footer">\r
+                               <div style="float:right;">{0}</div>\r
+                       The content of this page is licensed under the <a href="http://creativecommons.org/licenses/by/3.0">Creative Commons Attribution 3.0 License</a>.\r
+                       </div>                  \r
+               </div> <!-- content -->\r
+       </div> <!-- container -->       \r
 </body>\r
 </html>
\ No newline at end of file
index 71ba841581a0decc15565efe481bcd854e23ad2d..802f950e47176941c3be21ef18425121667a010f 100644 (file)
@@ -2,7 +2,8 @@
 <html>\r
        <head>\r
                <title>Gitblit</title>\r
-               <link rel="stylesheet" type="text/css" href="./gitblit.css"/>\r
+               <link rel="stylesheet" type="text/css" href="./bootstrap.130.css"/>\r
+               <link rel="stylesheet" type="text/css" href="./bootstrap.gb.css"/>\r
                <link rel="stylesheet" type="text/css" href="./markdown.css"/>\r
                <link rel="shortcut icon" type="image/png" href="./gitblt-favicon.png" />\r
                <meta name="ROBOTS" content="INDEX, NOFOLLOW">\r
                <script type="text/javascript" src="prettify/prettify.js"></script>\r
                <link href="prettify/prettify.css" type="text/css" rel="stylesheet" />          \r
        </head>\r
-       <body style="width:900px"  onload="prettyPrint()">\r
-               <div class="page_header">\r
-                       <a title="gitblit homepage" href="http://gitblit.com/">\r
-                               <img src="./gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/>\r
-                       </a>\r
-                       <span style="color:black;">{0}</span>\r
+       <body style="padding-top:40px;"  onload="prettyPrint()">\r
+               <div class="topbar">\r
+                       <div class="fill">\r
+                               <div class="container">\r
+                                       <a class="brand" href="http://gitblit.com" title="gitblit homepage">\r
+                                               <img src="gitblt_25_white.png" width="79" height="25" alt="gitblit" class="logo"/>\r
+                                       </a>\r
+                                       <ul class="nav">\r
+                                               {1}             \r
+                                       </ul>\r
+                               </div>\r
+                       </div>\r
                </div>\r
-               <div class="page_nav">{1}</div>\r
-               <div class="markdown">
\ No newline at end of file
+               <div class="container">\r
+                       <div class="content">\r
+                               <div class="markdown">
\ No newline at end of file
index e1a57381656ecebdf80c0a3946874a57a22b7b17..ab2d7ee8eb62d4a3316c97562df1e2eefc658b22 100644 (file)
@@ -1,7 +1,9 @@
-       </div>\r
-       <div style="margin-top:10px" class="page_footer">\r
-               <div style="float:right;">{0}</div>\r
-       The content of this page is licensed under the <a href="http://creativecommons.org/licenses/by/3.0">Creative Commons Attribution 3.0 License</a>.\r
-       </div>\r
+                       </div> <!-- markdown -->\r
+                       <div style="margin-top:10px" class="page_footer">\r
+                               <div style="float:right;">{0}</div>\r
+                       The content of this page is licensed under the <a href="http://creativecommons.org/licenses/by/3.0">Creative Commons Attribution 3.0 License</a>.\r
+                       </div>                  \r
+               </div> <!-- content -->\r
+       </div> <!-- container -->       \r
 </body>\r
 </html>
\ No newline at end of file
index 636511725353b7bc3b0f0f04c9013c0a9be12a50..86aae41187956f6d101c0051e91638f767ff8a91 100644 (file)
@@ -2,7 +2,8 @@
 <html>\r
        <head>\r
                <title>Gitblit</title>\r
-               <link rel="stylesheet" type="text/css" href="./gitblit.css"/>\r
+               <link rel="stylesheet" type="text/css" href="./bootstrap.130.css"/>\r
+               <link rel="stylesheet" type="text/css" href="./bootstrap.gb.css"/>\r
                <link rel="stylesheet" type="text/css" href="./markdown.css"/>\r
                <link rel="shortcut icon" type="image/png" href="./gitblt-favicon.png" />\r
                <meta name="ROBOTS" content="INDEX">\r
                \r
                <!-- ANALYTICS -->\r
        </head>\r
-       <body style="width:900px"  onload="prettyPrint()">\r
-               <a href="http://github.com/gitblit"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://d3nwyuy0nl342s.cloudfront.net/img/30f550e0d38ceb6ef5b81500c64d970b7fb0f028/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub"></a>\r
-               <div class="page_header">\r
-                       <a title="gitblit homepage" href="http://gitblit.com/">\r
-                               <img src="./gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/>\r
-                       </a>\r
-                       <span style="color:black;">{0}</span>\r
-                       <!-- Google Plus One -->\r
-                       <g:plusone></g:plusone>\r
+       <body style="padding-top:40px;"  onload="prettyPrint()">\r
+               <div class="topbar">\r
+                       <div class="fill">\r
+                               <div class="container">\r
+                                       <a class="brand" href="http://gitblit.com" title="gitblit homepage">\r
+                                               <img src="gitblt_25_white.png" width="79" height="25" alt="gitblit" class="logo"/>\r
+                                       </a>\r
+               \r
+                                       <!-- Google Plus One -->\r
+                                       <g:plusone></g:plusone>\r
+               \r
+                                       <ul class="nav">\r
+                                               {1}             \r
+                                       </ul>\r
+                               </div>\r
+                       </div>\r
                </div>\r
-               <div class="page_nav">{1}</div>\r
-               <div class="markdown">
\ No newline at end of file
+               <div class="container">\r
+                       <div class="content">\r
+                               <div class="markdown">
\ No newline at end of file
index f7c2f8ee7d2272b559f48492065b5b0ac2601a3f..a6c23bf6152dd25a3409c4f7710ff9a372fd26f9 100644 (file)
@@ -3,7 +3,7 @@ body, input, select {
 }\r
 \r
 ul, ol {\r
-       margin:0 !important;\r
+       margin-bottom: 10px !important;\r
 }\r
 \r
 hr {\r
@@ -77,6 +77,7 @@ pre, code, pre.prettyprint, pre.plainprint {
        font-size:12px;\r
        border:0px;\r
        padding: 0;\r
+       line-height: 1.35em;\r
 }\r
 \r
 table {\r
@@ -154,6 +155,11 @@ img.inlineIcon {
        padding-right: 1px;\r
 }\r
 \r
+img.overview {\r
+       float:right;\r
+       border:1px solid #CCCCCC;\r
+}\r
+\r
 div.header, div.commitHeader, table.repositories th {\r
        background-color:#e0e0e0;\r
        background-repeat:repeat-x;\r
@@ -223,26 +229,41 @@ div.search input {
        -webkit-border-radius:0;-moz-border-radius:0x;border-radius:0;\r
        vertical-align: top;\r
        background: url(search-icon.png) no-repeat 4px center;\r
-       color: #ddd;\r
        background-color: transparent;\r
        border: 1px solid transparent;\r
+       outline: none;\r
        padding: 2px 2px 2px 22px;\r
+       text-shadow: none;\r
        margin: 0px;\r
+       \r
+       color: #ddd;\r
 }\r
 \r
 div.search input:hover, div.search input:focus {\r
-       background: url(search-icon.png) no-repeat 4px center;\r
-       color: white;\r
+       background-color: transparent;\r
+       border: 1px solid transparent;\r
+       padding: 2px 2px 2px 22px;\r
+       text-shadow: none;\r
+       \r
+       color: #ddd;\r
        border-bottom: 1px solid #ff9900;       \r
-       outline: none;\r
 }\r
 \r
-div.search input:focused {     \r
-       background: url(search-icon.png) no-repeat 4px center;\r
+div.search input:focus {\r
+       color: white;\r
+}\r
+\r
+/* div.search input:focused { */\r
+/*     background-color: transparent; */\r
+/*     border: 1px solid transparent; */\r
+/*     padding: 2px 2px 2px 22px; */\r
+/*     text-shadow: none; */\r
+/* } */\r
+\r
+div.login input:focus {\r
+       background-color: rgba(255, 255, 255, 0.6);     \r
+       text-shadow: none;\r
        color: white;\r
-       border-bottom: 1px solid #ff9900;       \r
-       outline: none;\r
-       padding: 0 !important;\r
 }\r
 \r
 div.commit_message {\r
diff --git a/resources/login.mkd b/resources/login.mkd
new file mode 100644 (file)
index 0000000..5b8e89d
--- /dev/null
@@ -0,0 +1,3 @@
+## Please Login\r
+\r
+Pleaes enter your credentials to access this Gitblit site.\r
index de4f071ff0d15d96bca32ead3ed25a98ef173728..0746a6b7a11e77483aa8e1848a47945b3ddbe530 100644 (file)
@@ -91,7 +91,7 @@ public class BuildSite {
 \r
                System.out.println(MessageFormat.format("Generating site from {0} Markdown Docs in {1} ",\r
                                markdownFiles.length, sourceFolder.getAbsolutePath()));\r
-               String linkPattern = "<a href=''{0}''>{1}</a>";\r
+               String linkPattern = "<li><a href=''{0}''>{1}</a></li>";\r
                StringBuilder sb = new StringBuilder();\r
                for (File file : markdownFiles) {\r
                        String documentName = getDocumentName(file);\r
index 19bee6d8c1d2c748b111c5c494842a95b4dfacd6..452215a71102c10498237d329a2c37698bbb0e5e 100644 (file)
@@ -35,6 +35,12 @@ public class AuthorizationStrategy extends AbstractPageAuthorizationStrategy imp
        @SuppressWarnings({ "unchecked", "rawtypes" })\r
        @Override\r
        protected boolean isPageAuthorized(Class pageClass) {\r
+               if (RepositoriesPage.class.equals(pageClass)) {\r
+                       // allow all requests to get to the RepositoriesPage with its inline\r
+                       // authentication form\r
+                       return true;\r
+               }\r
+\r
                if (BasePage.class.isAssignableFrom(pageClass)) {\r
                        boolean authenticateView = GitBlit.getBoolean(Keys.web.authenticateViewPages, true);\r
                        boolean authenticateAdmin = GitBlit.getBoolean(Keys.web.authenticateAdminPages, true);\r
index 9e76a034af1644a6c454dfb590e080e403f0bd9e..2aa5107999fa9dbeacf0fdaf21bd158e78fd93e1 100644 (file)
@@ -66,7 +66,7 @@ gb.filesRenamed = {0} files renamed
 gb.missingUsername = Missing Username\r
 gb.edit = edit\r
 gb.searchTypeTooltip = Select Search Type\r
-gb.searchTooltip = Search Gitblit\r
+gb.searchTooltip = Search {0}\r
 gb.delete = delete\r
 gb.docs = docs\r
 gb.accessRestriction = access restriction\r
index 446ab898a335ef02a1b8b43c2e477f781a28978d..78e94614a250783c2bedf55e511c2cd0ede61583 100644 (file)
@@ -182,7 +182,7 @@ public class EditUserPage extends RootSubPage {
 \r
                        @Override\r
                        public void onSubmit() {\r
-                               setResponsePage(RepositoriesPage.class);\r
+                               setResponsePage(UsersPage.class);\r
                        }\r
                };\r
                cancel.setDefaultFormProcessing(false);\r
index 289006fa5d2e2f296b4a2a04b9e388db69d22baa..d5a21a7ac262c46eb7a26559c91b6cea535ce719 100644 (file)
@@ -19,6 +19,7 @@ import java.io.File;
 import java.io.FileReader;\r
 import java.io.InputStream;\r
 import java.io.InputStreamReader;\r
+import java.text.MessageFormat;\r
 \r
 import org.apache.wicket.Component;\r
 import org.apache.wicket.markup.html.basic.Label;\r
@@ -28,6 +29,7 @@ import com.gitblit.GitBlit;
 import com.gitblit.Keys;\r
 import com.gitblit.utils.MarkdownUtils;\r
 import com.gitblit.utils.StringUtils;\r
+import com.gitblit.wicket.GitBlitWebSession;\r
 import com.gitblit.wicket.WicketUtils;\r
 import com.gitblit.wicket.panels.RepositoriesPanel;\r
 \r
@@ -37,23 +39,40 @@ public class RepositoriesPage extends RootPage {
                super();\r
                setupPage("", "");\r
 \r
+               // check to see if we should display a login message\r
+               boolean authenticateView = GitBlit.getBoolean(Keys.web.authenticateViewPages, true);\r
+               if (authenticateView && !GitBlitWebSession.get().isLoggedIn()) {\r
+                       String messageSource = GitBlit.getString(Keys.web.loginMessage, "gitblit");\r
+                       String message = readMarkdown(messageSource, "login.mkd");\r
+                       Component repositoriesMessage = new Label("repositoriesMessage", message);\r
+                       add(repositoriesMessage.setEscapeModelStrings(false));\r
+                       add(new Label("repositoriesPanel"));\r
+                       return;\r
+               }\r
+\r
                // Load the markdown welcome message\r
                String messageSource = GitBlit.getString(Keys.web.repositoriesMessage, "gitblit");\r
+               String message = readMarkdown(messageSource, "welcome.mkd");\r
+               Component repositoriesMessage = new Label("repositoriesMessage", message)\r
+                               .setEscapeModelStrings(false).setVisible(message.length() > 0);\r
+               add(repositoriesMessage);\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
+       private String readMarkdown(String messageSource, String resource) {\r
                String message = "";\r
                if (messageSource.equalsIgnoreCase("gitblit")) {\r
-                       // Read default welcome message\r
-                       try {\r
-                               ContextRelativeResource res = WicketUtils.getResource("welcome.mkd");\r
-                               InputStream is = res.getResourceStream().getInputStream();\r
-                               InputStreamReader reader = new InputStreamReader(is);\r
-                               message = MarkdownUtils.transformMarkdown(reader);\r
-                               reader.close();\r
-                       } catch (Throwable t) {\r
-                               message = "Failed to read default welcome message!";\r
-                               error(message, t, false);\r
-                       }\r
+                       // Read default message\r
+                       message = readDefaultMarkdown(resource);\r
                } else {\r
-                       // Read user-supplied welcome message\r
+                       // Read user-supplied message\r
                        if (!StringUtils.isEmpty(messageSource)) {\r
                                File file = new File(messageSource);\r
                                if (file.exists()) {\r
@@ -69,16 +88,21 @@ public class RepositoriesPage extends RootPage {
                                }\r
                        }\r
                }\r
-               Component repositoriesMessage = new Label("repositoriesMessage", message)\r
-                               .setEscapeModelStrings(false).setVisible(message.length() > 0);\r
-               add(repositoriesMessage);\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
+               return message;\r
+       }\r
+\r
+       private String readDefaultMarkdown(String file) {\r
+               String message;\r
+               try {\r
+                       ContextRelativeResource res = WicketUtils.getResource(file);\r
+                       InputStream is = res.getResourceStream().getInputStream();\r
+                       InputStreamReader reader = new InputStreamReader(is);\r
+                       message = MarkdownUtils.transformMarkdown(reader);\r
+                       reader.close();\r
+               } catch (Throwable t) {\r
+                       message = MessageFormat.format("Failed to read default message from {0}!", file);\r
+                       error(message, t, false);\r
                }\r
-               add(repositories);\r
+               return message;\r
        }\r
 }\r
index 777401a11bc267fb8a0296eb48d06367f71f63f1..1b6ae082bfe12dce8b7a5f1e17acc6564d81b2d5 100644 (file)
@@ -136,8 +136,7 @@ public abstract class RepositoryPage extends BasePage {
                                String extra = item.getModelObject();\r
                                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
+                                               pageReg.pageClass, WicketUtils.newRepositoryParameter(repositoryName)));\r
                        }\r
                };\r
                add(extrasView);\r
@@ -385,7 +384,7 @@ public abstract class RepositoryPage extends BasePage {
 \r
                void setTranslatedAttributes() {\r
                        WicketUtils.setHtmlTooltip(get("searchType"), getString("gb.searchTypeTooltip"));\r
-                       WicketUtils.setHtmlTooltip(get("searchBox"), getString("gb.searchTooltip"));\r
+                       WicketUtils.setHtmlTooltip(get("searchBox"), MessageFormat.format(getString("gb.searchTooltip"), repositoryName));\r
                        WicketUtils.setInputPlaceholder(get("searchBox"), getString("gb.search"));\r
                }\r
 \r
@@ -393,6 +392,10 @@ public abstract class RepositoryPage extends BasePage {
                public void onSubmit() {\r
                        SearchType searchType = searchTypeModel.getObject();\r
                        String searchString = searchBoxModel.getObject();\r
+                       if (searchString == null) {\r
+                               // FIXME IE intermittently has no searchString. Wicket bug?\r
+                               return;\r
+                       }\r
                        for (SearchType type : SearchType.values()) {\r
                                if (searchString.toLowerCase().startsWith(type.name().toLowerCase() + ":")) {\r
                                        searchType = type;\r
index 0fa6cfc6e58a4724789ad1c1937b7d69779d62b1..c94709237a9d5a7ef358ad1b202a09a32a6b1a63 100644 (file)
                                </ul>\r
                                \r
                                <form class="pull-right" wicket:id="loginForm">\r
-                                       <input  wicket:id="username" class="input-small" type="text" placeholder="Username">\r
-                                       <input  wicket:id="password" class="input-small" type="password" placeholder="Password">\r
-                                       <button class="btn primary" type="submit">Sign in</button>\r
+                                       <div class="login">\r
+                                               <input wicket:id="username" class="input-small" type="text" />\r
+                                               <input wicket:id="password" class="input-small" type="password" />\r
+                                               <button class="btn primary" type="submit"><wicket:message key="gb.login"></wicket:message></button>\r
+                                       </div>\r
                                </form>\r
                        </div>\r
                </div>\r
index 37f6ad1b0da1b5be7ebc09f0a4d84838f4b8afb3..69ac25d0e5e01feb4fd6511a7cdb0aa222af3e78 100644 (file)
@@ -32,6 +32,7 @@ import com.gitblit.Keys;
 import com.gitblit.models.UserModel;\r
 import com.gitblit.utils.StringUtils;\r
 import com.gitblit.wicket.GitBlitWebSession;\r
+import com.gitblit.wicket.WicketUtils;\r
 \r
 /**\r
  * Root page is a topbar, navigable page like Repositories, Users, or\r
@@ -104,8 +105,12 @@ public abstract class RootPage extends BasePage {
                                }\r
                        }\r
                };\r
-               loginForm.add(new TextField<String>("username", username));\r
-               loginForm.add(new PasswordTextField("password", password));\r
+               TextField<String> unameField = new TextField<String>("username", username);\r
+               WicketUtils.setInputPlaceholder(unameField, getString("gb.username"));\r
+               loginForm.add(unameField);\r
+               PasswordTextField pwField = new PasswordTextField("password", password);\r
+               WicketUtils.setInputPlaceholder(pwField, getString("gb.password"));\r
+               loginForm.add(pwField);\r
                add(loginForm);\r
                if (GitBlit.getBoolean(Keys.web.authenticateViewPages, true)\r
                                || GitBlit.getBoolean(Keys.web.authenticateAdminPages, true)) {\r