summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Milanesio <luca.milanesio@gmail.com>2013-11-08 15:51:51 +0000
committerLuca Milanesio <luca.milanesio@gmail.com>2013-11-08 15:53:52 +0000
commita0831dca3c087658a689bae102e2040a90c48d2e (patch)
treeed822d29fe4fb183b7a6e114d93f90818981a840
parent9c7bb3d377a0637ff034be407cb9c03c606647a9 (diff)
downloadgitblit-a0831dca3c087658a689bae102e2040a90c48d2e.tar.gz
gitblit-a0831dca3c087658a689bae102e2040a90c48d2e.zip
Allows the home root link top-left anchor to be customised.
A new property web.rootLink has been introduced to customise the link underlying the top-left logo in GitBlit. When undefined the older behaviour is to link to the GitBlit home page.
-rw-r--r--src/main/distrib/data/gitblit.properties7
-rw-r--r--src/main/java/com/gitblit/wicket/pages/BasePage.java3
2 files changed, 9 insertions, 1 deletions
diff --git a/src/main/distrib/data/gitblit.properties b/src/main/distrib/data/gitblit.properties
index 41aa5a33..722c5014 100644
--- a/src/main/distrib/data/gitblit.properties
+++ b/src/main/distrib/data/gitblit.properties
@@ -581,6 +581,13 @@ web.siteName =
# BASEFOLDER
web.headerLogo = ${baseFolder}/logo.png
+# You may specify a different link URL for the logo image anchor.
+# If blank the Gitblit main page URL is used.
+#
+# SINCE 1.3.0
+# BASEFOLDER
+web.rootLink =
+
# You may specify a custom header background CSS color. If unspecified, the
# default color will be used.
#
diff --git a/src/main/java/com/gitblit/wicket/pages/BasePage.java b/src/main/java/com/gitblit/wicket/pages/BasePage.java
index f8816831..ec69a719 100644
--- a/src/main/java/com/gitblit/wicket/pages/BasePage.java
+++ b/src/main/java/com/gitblit/wicket/pages/BasePage.java
@@ -212,7 +212,8 @@ public abstract class BasePage extends SessionPage {
add(new Label("title", siteName));
}
- ExternalLink rootLink = new ExternalLink("rootLink", urlFor(GitBlitWebApp.HOME_PAGE_CLASS, null).toString());
+ String rootLinkUrl = GitBlit.getString(Keys.web.rootLink, urlFor(GitBlitWebApp.HOME_PAGE_CLASS, null).toString());
+ ExternalLink rootLink = new ExternalLink("rootLink", rootLinkUrl);
WicketUtils.setHtmlTooltip(rootLink, GitBlit.getString(Keys.web.siteName, Constants.NAME));
add(rootLink);