summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NOTICE8
-rw-r--r--build.xml12
-rw-r--r--distrib/gitblit.properties9
-rw-r--r--docs/00_index.mkd2
-rw-r--r--docs/02_federation.mkd2
-rw-r--r--docs/04_design.mkd1
-rw-r--r--docs/04_releases.mkd2
-rw-r--r--docs/doc_footer.html12
-rw-r--r--docs/doc_header.html26
-rw-r--r--docs/site_footer.html12
-rw-r--r--docs/site_header.html33
-rw-r--r--resources/bootstrap.gb.css41
-rw-r--r--resources/login.mkd3
-rw-r--r--src/com/gitblit/build/BuildSite.java2
-rw-r--r--src/com/gitblit/wicket/AuthorizationStrategy.java6
-rw-r--r--src/com/gitblit/wicket/GitBlitWebApp.properties2
-rw-r--r--src/com/gitblit/wicket/pages/EditUserPage.java2
-rw-r--r--src/com/gitblit/wicket/pages/RepositoriesPage.java68
-rw-r--r--src/com/gitblit/wicket/pages/RepositoryPage.java9
-rw-r--r--src/com/gitblit/wicket/pages/RootPage.html8
-rw-r--r--src/com/gitblit/wicket/pages/RootPage.java9
21 files changed, 187 insertions, 82 deletions
diff --git a/NOTICE b/NOTICE
index 41b61f12..5e498037 100644
--- a/NOTICE
+++ b/NOTICE
@@ -8,6 +8,14 @@ This is an aggregated NOTICE file for the projects included
in this distribution or linked to by this distribution.
---------------------------------------------------------------------------
+Bootstrap
+---------------------------------------------------------------------------
+ Bootstrap, released under the
+ Apache Software License, Version 2.0.
+
+ http://twitter.github.com/bootstrap
+
+---------------------------------------------------------------------------
google-code-prettify
---------------------------------------------------------------------------
google-code-prettify, released under the
diff --git a/build.xml b/build.xml
index e803d117..9a589711 100644
--- a/build.xml
+++ b/build.xml
@@ -196,10 +196,10 @@
<copy todir="${docs.output.dir}">
<!-- Copy selected Gitblit resources -->
<fileset dir="${project.resources.dir}">
- <include name="background.png" />
- <include name="gitblit.css" />
+ <include name="bootstrap.130.css" />
+ <include name="bootstrap.gb.css" />
<include name="markdown.css" />
- <include name="gitblt_25.png" />
+ <include name="gitblt_25_white.png" />
<include name="gitblt-favicon.png" />
<include name="lock_go_16x16.png" />
<include name="lock_pull_16x16.png" />
@@ -425,10 +425,10 @@
<copy todir="${project.site.dir}">
<!-- Copy selected Gitblit resources -->
<fileset dir="${project.resources.dir}">
- <include name="background.png" />
- <include name="gitblit.css" />
+ <include name="bootstrap.130.css" />
+ <include name="bootstrap.gb.css" />
<include name="markdown.css" />
- <include name="gitblt_25.png" />
+ <include name="gitblt_25_white.png" />
<include name="gitblt-favicon.png" />
<include name="lock_go_16x16.png" />
<include name="lock_pull_16x16.png" />
diff --git a/distrib/gitblit.properties b/distrib/gitblit.properties
index 5493b25b..5b2b576a 100644
--- a/distrib/gitblit.properties
+++ b/distrib/gitblit.properties
@@ -110,7 +110,14 @@ web.showRepositorySizes = true
# SINCE 0.6.0
web.showFederationRegistrations = false
-# This is the message display above the repositories table.
+# This is the message displayed when *web.authenticateViewPages=true*.
+# This can point to a file with Markdown content.
+# Specifying "gitblit" uses the internal login message.
+#
+# SINCE 0.6.1
+web.loginMessage = gitblit
+
+# This is the message displayed above the repositories table.
# This can point to a file with Markdown content.
# Specifying "gitblit" uses the internal welcome message.
#
diff --git a/docs/00_index.mkd b/docs/00_index.mkd
index 2c40e1ef..fde2d349 100644
--- a/docs/00_index.mkd
+++ b/docs/00_index.mkd
@@ -28,6 +28,8 @@ Gitblit requires a Java 6 Runtime Environment (JRE) or a Java 6 Development Kit
**%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%*
+- improved: updated ui with Twitter's Bootstrap CSS toolkit
+<br/>**New:** *web.loginMessage = gitblit*
- fixed: Null pointer exception if did not set federation strategy (issue 20)
- fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later
- added: IUserService.setup(IStoredSettings) for custom user service implementations
diff --git a/docs/02_federation.mkd b/docs/02_federation.mkd
index f77d7034..abf171e3 100644
--- a/docs/02_federation.mkd
+++ b/docs/02_federation.mkd
@@ -175,7 +175,7 @@ By default, federated repositories can not be pushed to, they are read-only by t
## Federation Pull Registration Keys
-<table class="text">
+<table>
<tr><th>federation.N.url</th>
<td>string</td>
<td>the url of the origin Gitblit instance *(required)*</td>
diff --git a/docs/04_design.mkd b/docs/04_design.mkd
index 523d31b9..fe22674d 100644
--- a/docs/04_design.mkd
+++ b/docs/04_design.mkd
@@ -10,6 +10,7 @@
### Bundled Dependencies
The following dependencies are bundled with Gitblit.
+- [Bootstrap](http://twitter.github.com/bootstrap) (Apache 2.0)
- [google-code-prettify](http://code.google.com/p/google-code-prettify) (Apache 2.0)
- [Commons Daemon](http://commons.apache.org/daemon) (Apache 2.0)
- magnifying glass search icon courtesy of [Gnome](http://gnome.org) (Creative Commons CC-BY)
diff --git a/docs/04_releases.mkd b/docs/04_releases.mkd
index 667e5f2e..cb1f898d 100644
--- a/docs/04_releases.mkd
+++ b/docs/04_releases.mkd
@@ -3,6 +3,8 @@
### Current Release
**%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%*
+- improved: updated ui with Twitter's Bootstrap CSS toolkit
+<br/>**New:** *web.loginMessage = gitblit*
- fixed: Null pointer exception if did not set federation strategy (issue 20)
- fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later
- added: IUserService.setup(IStoredSettings) for custom user service implementations
diff --git a/docs/doc_footer.html b/docs/doc_footer.html
index e1a57381..ab2d7ee8 100644
--- a/docs/doc_footer.html
+++ b/docs/doc_footer.html
@@ -1,7 +1,9 @@
- </div>
- <div style="margin-top:10px" class="page_footer">
- <div style="float:right;">{0}</div>
- 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>.
- </div>
+ </div> <!-- markdown -->
+ <div style="margin-top:10px" class="page_footer">
+ <div style="float:right;">{0}</div>
+ 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>.
+ </div>
+ </div> <!-- content -->
+ </div> <!-- container -->
</body>
</html> \ No newline at end of file
diff --git a/docs/doc_header.html b/docs/doc_header.html
index 71ba8415..802f950e 100644
--- a/docs/doc_header.html
+++ b/docs/doc_header.html
@@ -2,7 +2,8 @@
<html>
<head>
<title>Gitblit</title>
- <link rel="stylesheet" type="text/css" href="./gitblit.css"/>
+ <link rel="stylesheet" type="text/css" href="./bootstrap.130.css"/>
+ <link rel="stylesheet" type="text/css" href="./bootstrap.gb.css"/>
<link rel="stylesheet" type="text/css" href="./markdown.css"/>
<link rel="shortcut icon" type="image/png" href="./gitblt-favicon.png" />
<meta name="ROBOTS" content="INDEX, NOFOLLOW">
@@ -28,12 +29,19 @@
<script type="text/javascript" src="prettify/prettify.js"></script>
<link href="prettify/prettify.css" type="text/css" rel="stylesheet" />
</head>
- <body style="width:900px" onload="prettyPrint()">
- <div class="page_header">
- <a title="gitblit homepage" href="http://gitblit.com/">
- <img src="./gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/>
- </a>
- <span style="color:black;">{0}</span>
+ <body style="padding-top:40px;" onload="prettyPrint()">
+ <div class="topbar">
+ <div class="fill">
+ <div class="container">
+ <a class="brand" href="http://gitblit.com" title="gitblit homepage">
+ <img src="gitblt_25_white.png" width="79" height="25" alt="gitblit" class="logo"/>
+ </a>
+ <ul class="nav">
+ {1}
+ </ul>
+ </div>
+ </div>
</div>
- <div class="page_nav">{1}</div>
- <div class="markdown"> \ No newline at end of file
+ <div class="container">
+ <div class="content">
+ <div class="markdown"> \ No newline at end of file
diff --git a/docs/site_footer.html b/docs/site_footer.html
index e1a57381..ab2d7ee8 100644
--- a/docs/site_footer.html
+++ b/docs/site_footer.html
@@ -1,7 +1,9 @@
- </div>
- <div style="margin-top:10px" class="page_footer">
- <div style="float:right;">{0}</div>
- 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>.
- </div>
+ </div> <!-- markdown -->
+ <div style="margin-top:10px" class="page_footer">
+ <div style="float:right;">{0}</div>
+ 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>.
+ </div>
+ </div> <!-- content -->
+ </div> <!-- container -->
</body>
</html> \ No newline at end of file
diff --git a/docs/site_header.html b/docs/site_header.html
index 63651172..86aae411 100644
--- a/docs/site_header.html
+++ b/docs/site_header.html
@@ -2,7 +2,8 @@
<html>
<head>
<title>Gitblit</title>
- <link rel="stylesheet" type="text/css" href="./gitblit.css"/>
+ <link rel="stylesheet" type="text/css" href="./bootstrap.130.css"/>
+ <link rel="stylesheet" type="text/css" href="./bootstrap.gb.css"/>
<link rel="stylesheet" type="text/css" href="./markdown.css"/>
<link rel="shortcut icon" type="image/png" href="./gitblt-favicon.png" />
<meta name="ROBOTS" content="INDEX">
@@ -33,15 +34,23 @@
<!-- ANALYTICS -->
</head>
- <body style="width:900px" onload="prettyPrint()">
- <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>
- <div class="page_header">
- <a title="gitblit homepage" href="http://gitblit.com/">
- <img src="./gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/>
- </a>
- <span style="color:black;">{0}</span>
- <!-- Google Plus One -->
- <g:plusone></g:plusone>
+ <body style="padding-top:40px;" onload="prettyPrint()">
+ <div class="topbar">
+ <div class="fill">
+ <div class="container">
+ <a class="brand" href="http://gitblit.com" title="gitblit homepage">
+ <img src="gitblt_25_white.png" width="79" height="25" alt="gitblit" class="logo"/>
+ </a>
+
+ <!-- Google Plus One -->
+ <g:plusone></g:plusone>
+
+ <ul class="nav">
+ {1}
+ </ul>
+ </div>
+ </div>
</div>
- <div class="page_nav">{1}</div>
- <div class="markdown"> \ No newline at end of file
+ <div class="container">
+ <div class="content">
+ <div class="markdown"> \ No newline at end of file
diff --git a/resources/bootstrap.gb.css b/resources/bootstrap.gb.css
index f7c2f8ee..a6c23bf6 100644
--- a/resources/bootstrap.gb.css
+++ b/resources/bootstrap.gb.css
@@ -3,7 +3,7 @@ body, input, select {
}
ul, ol {
- margin:0 !important;
+ margin-bottom: 10px !important;
}
hr {
@@ -77,6 +77,7 @@ pre, code, pre.prettyprint, pre.plainprint {
font-size:12px;
border:0px;
padding: 0;
+ line-height: 1.35em;
}
table {
@@ -154,6 +155,11 @@ img.inlineIcon {
padding-right: 1px;
}
+img.overview {
+ float:right;
+ border:1px solid #CCCCCC;
+}
+
div.header, div.commitHeader, table.repositories th {
background-color:#e0e0e0;
background-repeat:repeat-x;
@@ -223,26 +229,41 @@ div.search input {
-webkit-border-radius:0;-moz-border-radius:0x;border-radius:0;
vertical-align: top;
background: url(search-icon.png) no-repeat 4px center;
- color: #ddd;
background-color: transparent;
border: 1px solid transparent;
+ outline: none;
padding: 2px 2px 2px 22px;
+ text-shadow: none;
margin: 0px;
+
+ color: #ddd;
}
div.search input:hover, div.search input:focus {
- background: url(search-icon.png) no-repeat 4px center;
- color: white;
+ background-color: transparent;
+ border: 1px solid transparent;
+ padding: 2px 2px 2px 22px;
+ text-shadow: none;
+
+ color: #ddd;
border-bottom: 1px solid #ff9900;
- outline: none;
}
-div.search input:focused {
- background: url(search-icon.png) no-repeat 4px center;
+div.search input:focus {
+ color: white;
+}
+
+/* div.search input:focused { */
+/* background-color: transparent; */
+/* border: 1px solid transparent; */
+/* padding: 2px 2px 2px 22px; */
+/* text-shadow: none; */
+/* } */
+
+div.login input:focus {
+ background-color: rgba(255, 255, 255, 0.6);
+ text-shadow: none;
color: white;
- border-bottom: 1px solid #ff9900;
- outline: none;
- padding: 0 !important;
}
div.commit_message {
diff --git a/resources/login.mkd b/resources/login.mkd
new file mode 100644
index 00000000..5b8e89df
--- /dev/null
+++ b/resources/login.mkd
@@ -0,0 +1,3 @@
+## Please Login
+
+Pleaes enter your credentials to access this Gitblit site.
diff --git a/src/com/gitblit/build/BuildSite.java b/src/com/gitblit/build/BuildSite.java
index de4f071f..0746a6b7 100644
--- a/src/com/gitblit/build/BuildSite.java
+++ b/src/com/gitblit/build/BuildSite.java
@@ -91,7 +91,7 @@ public class BuildSite {
System.out.println(MessageFormat.format("Generating site from {0} Markdown Docs in {1} ",
markdownFiles.length, sourceFolder.getAbsolutePath()));
- String linkPattern = "<a href=''{0}''>{1}</a>";
+ String linkPattern = "<li><a href=''{0}''>{1}</a></li>";
StringBuilder sb = new StringBuilder();
for (File file : markdownFiles) {
String documentName = getDocumentName(file);
diff --git a/src/com/gitblit/wicket/AuthorizationStrategy.java b/src/com/gitblit/wicket/AuthorizationStrategy.java
index 19bee6d8..452215a7 100644
--- a/src/com/gitblit/wicket/AuthorizationStrategy.java
+++ b/src/com/gitblit/wicket/AuthorizationStrategy.java
@@ -35,6 +35,12 @@ public class AuthorizationStrategy extends AbstractPageAuthorizationStrategy imp
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
protected boolean isPageAuthorized(Class pageClass) {
+ if (RepositoriesPage.class.equals(pageClass)) {
+ // allow all requests to get to the RepositoriesPage with its inline
+ // authentication form
+ return true;
+ }
+
if (BasePage.class.isAssignableFrom(pageClass)) {
boolean authenticateView = GitBlit.getBoolean(Keys.web.authenticateViewPages, true);
boolean authenticateAdmin = GitBlit.getBoolean(Keys.web.authenticateAdminPages, true);
diff --git a/src/com/gitblit/wicket/GitBlitWebApp.properties b/src/com/gitblit/wicket/GitBlitWebApp.properties
index 9e76a034..2aa51079 100644
--- a/src/com/gitblit/wicket/GitBlitWebApp.properties
+++ b/src/com/gitblit/wicket/GitBlitWebApp.properties
@@ -66,7 +66,7 @@ gb.filesRenamed = {0} files renamed
gb.missingUsername = Missing Username
gb.edit = edit
gb.searchTypeTooltip = Select Search Type
-gb.searchTooltip = Search Gitblit
+gb.searchTooltip = Search {0}
gb.delete = delete
gb.docs = docs
gb.accessRestriction = access restriction
diff --git a/src/com/gitblit/wicket/pages/EditUserPage.java b/src/com/gitblit/wicket/pages/EditUserPage.java
index 446ab898..78e94614 100644
--- a/src/com/gitblit/wicket/pages/EditUserPage.java
+++ b/src/com/gitblit/wicket/pages/EditUserPage.java
@@ -182,7 +182,7 @@ public class EditUserPage extends RootSubPage {
@Override
public void onSubmit() {
- setResponsePage(RepositoriesPage.class);
+ setResponsePage(UsersPage.class);
}
};
cancel.setDefaultFormProcessing(false);
diff --git a/src/com/gitblit/wicket/pages/RepositoriesPage.java b/src/com/gitblit/wicket/pages/RepositoriesPage.java
index 289006fa..d5a21a7a 100644
--- a/src/com/gitblit/wicket/pages/RepositoriesPage.java
+++ b/src/com/gitblit/wicket/pages/RepositoriesPage.java
@@ -19,6 +19,7 @@ import java.io.File;
import java.io.FileReader;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.text.MessageFormat;
import org.apache.wicket.Component;
import org.apache.wicket.markup.html.basic.Label;
@@ -28,6 +29,7 @@ import com.gitblit.GitBlit;
import com.gitblit.Keys;
import com.gitblit.utils.MarkdownUtils;
import com.gitblit.utils.StringUtils;
+import com.gitblit.wicket.GitBlitWebSession;
import com.gitblit.wicket.WicketUtils;
import com.gitblit.wicket.panels.RepositoriesPanel;
@@ -37,23 +39,40 @@ public class RepositoriesPage extends RootPage {
super();
setupPage("", "");
+ // check to see if we should display a login message
+ boolean authenticateView = GitBlit.getBoolean(Keys.web.authenticateViewPages, true);
+ if (authenticateView && !GitBlitWebSession.get().isLoggedIn()) {
+ String messageSource = GitBlit.getString(Keys.web.loginMessage, "gitblit");
+ String message = readMarkdown(messageSource, "login.mkd");
+ Component repositoriesMessage = new Label("repositoriesMessage", message);
+ add(repositoriesMessage.setEscapeModelStrings(false));
+ add(new Label("repositoriesPanel"));
+ return;
+ }
+
// Load the markdown welcome message
String messageSource = GitBlit.getString(Keys.web.repositoriesMessage, "gitblit");
+ String message = readMarkdown(messageSource, "welcome.mkd");
+ Component repositoriesMessage = new Label("repositoriesMessage", message)
+ .setEscapeModelStrings(false).setVisible(message.length() > 0);
+ add(repositoriesMessage);
+ RepositoriesPanel repositories = new RepositoriesPanel("repositoriesPanel", showAdmin,
+ null, getAccessRestrictions());
+ // push the panel down if we are hiding the admin controls and the
+ // welcome message
+ if (!showAdmin && !repositoriesMessage.isVisible()) {
+ WicketUtils.setCssStyle(repositories, "padding-top:5px;");
+ }
+ add(repositories);
+ }
+
+ private String readMarkdown(String messageSource, String resource) {
String message = "";
if (messageSource.equalsIgnoreCase("gitblit")) {
- // Read default welcome message
- try {
- ContextRelativeResource res = WicketUtils.getResource("welcome.mkd");
- InputStream is = res.getResourceStream().getInputStream();
- InputStreamReader reader = new InputStreamReader(is);
- message = MarkdownUtils.transformMarkdown(reader);
- reader.close();
- } catch (Throwable t) {
- message = "Failed to read default welcome message!";
- error(message, t, false);
- }
+ // Read default message
+ message = readDefaultMarkdown(resource);
} else {
- // Read user-supplied welcome message
+ // Read user-supplied message
if (!StringUtils.isEmpty(messageSource)) {
File file = new File(messageSource);
if (file.exists()) {
@@ -69,16 +88,21 @@ public class RepositoriesPage extends RootPage {
}
}
}
- Component repositoriesMessage = new Label("repositoriesMessage", message)
- .setEscapeModelStrings(false).setVisible(message.length() > 0);
- add(repositoriesMessage);
- RepositoriesPanel repositories = new RepositoriesPanel("repositoriesPanel", showAdmin,
- null, getAccessRestrictions());
- // push the panel down if we are hiding the admin controls and the
- // welcome message
- if (!showAdmin && !repositoriesMessage.isVisible()) {
- WicketUtils.setCssStyle(repositories, "padding-top:5px;");
+ return message;
+ }
+
+ private String readDefaultMarkdown(String file) {
+ String message;
+ try {
+ ContextRelativeResource res = WicketUtils.getResource(file);
+ InputStream is = res.getResourceStream().getInputStream();
+ InputStreamReader reader = new InputStreamReader(is);
+ message = MarkdownUtils.transformMarkdown(reader);
+ reader.close();
+ } catch (Throwable t) {
+ message = MessageFormat.format("Failed to read default message from {0}!", file);
+ error(message, t, false);
}
- add(repositories);
+ return message;
}
}
diff --git a/src/com/gitblit/wicket/pages/RepositoryPage.java b/src/com/gitblit/wicket/pages/RepositoryPage.java
index 777401a1..1b6ae082 100644
--- a/src/com/gitblit/wicket/pages/RepositoryPage.java
+++ b/src/com/gitblit/wicket/pages/RepositoryPage.java
@@ -136,8 +136,7 @@ public abstract class RepositoryPage extends BasePage {
String extra = item.getModelObject();
PageRegistration pageReg = registeredPages.get(extra);
item.add(new LinkPanel("extraLink", null, getString(pageReg.translationKey),
- pageReg.pageClass, WicketUtils.newRepositoryParameter(repositoryName))
- /*.setEnabled(!extra.equals(pageWicketId))*/);
+ pageReg.pageClass, WicketUtils.newRepositoryParameter(repositoryName)));
}
};
add(extrasView);
@@ -385,7 +384,7 @@ public abstract class RepositoryPage extends BasePage {
void setTranslatedAttributes() {
WicketUtils.setHtmlTooltip(get("searchType"), getString("gb.searchTypeTooltip"));
- WicketUtils.setHtmlTooltip(get("searchBox"), getString("gb.searchTooltip"));
+ WicketUtils.setHtmlTooltip(get("searchBox"), MessageFormat.format(getString("gb.searchTooltip"), repositoryName));
WicketUtils.setInputPlaceholder(get("searchBox"), getString("gb.search"));
}
@@ -393,6 +392,10 @@ public abstract class RepositoryPage extends BasePage {
public void onSubmit() {
SearchType searchType = searchTypeModel.getObject();
String searchString = searchBoxModel.getObject();
+ if (searchString == null) {
+ // FIXME IE intermittently has no searchString. Wicket bug?
+ return;
+ }
for (SearchType type : SearchType.values()) {
if (searchString.toLowerCase().startsWith(type.name().toLowerCase() + ":")) {
searchType = type;
diff --git a/src/com/gitblit/wicket/pages/RootPage.html b/src/com/gitblit/wicket/pages/RootPage.html
index 0fa6cfc6..c9470923 100644
--- a/src/com/gitblit/wicket/pages/RootPage.html
+++ b/src/com/gitblit/wicket/pages/RootPage.html
@@ -19,9 +19,11 @@
</ul>
<form class="pull-right" wicket:id="loginForm">
- <input wicket:id="username" class="input-small" type="text" placeholder="Username">
- <input wicket:id="password" class="input-small" type="password" placeholder="Password">
- <button class="btn primary" type="submit">Sign in</button>
+ <div class="login">
+ <input wicket:id="username" class="input-small" type="text" />
+ <input wicket:id="password" class="input-small" type="password" />
+ <button class="btn primary" type="submit"><wicket:message key="gb.login"></wicket:message></button>
+ </div>
</form>
</div>
</div>
diff --git a/src/com/gitblit/wicket/pages/RootPage.java b/src/com/gitblit/wicket/pages/RootPage.java
index 37f6ad1b..69ac25d0 100644
--- a/src/com/gitblit/wicket/pages/RootPage.java
+++ b/src/com/gitblit/wicket/pages/RootPage.java
@@ -32,6 +32,7 @@ import com.gitblit.Keys;
import com.gitblit.models.UserModel;
import com.gitblit.utils.StringUtils;
import com.gitblit.wicket.GitBlitWebSession;
+import com.gitblit.wicket.WicketUtils;
/**
* Root page is a topbar, navigable page like Repositories, Users, or
@@ -104,8 +105,12 @@ public abstract class RootPage extends BasePage {
}
}
};
- loginForm.add(new TextField<String>("username", username));
- loginForm.add(new PasswordTextField("password", password));
+ TextField<String> unameField = new TextField<String>("username", username);
+ WicketUtils.setInputPlaceholder(unameField, getString("gb.username"));
+ loginForm.add(unameField);
+ PasswordTextField pwField = new PasswordTextField("password", password);
+ WicketUtils.setInputPlaceholder(pwField, getString("gb.password"));
+ loginForm.add(pwField);
add(loginForm);
if (GitBlit.getBoolean(Keys.web.authenticateViewPages, true)
|| GitBlit.getBoolean(Keys.web.authenticateAdminPages, true)) {