]> source.dussan.org Git - gitblit.git/commitdiff
Allows the home root link top-left anchor to be customised. 121/head
authorLuca Milanesio <luca.milanesio@gmail.com>
Fri, 8 Nov 2013 15:51:51 +0000 (15:51 +0000)
committerLuca Milanesio <luca.milanesio@gmail.com>
Fri, 8 Nov 2013 15:53:52 +0000 (15:53 +0000)
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.

src/main/distrib/data/gitblit.properties
src/main/java/com/gitblit/wicket/pages/BasePage.java

index 41aa5a334fb3fc6a43eb6f185f9779007e247009..722c5014a2d3d3a39995b8bad644b31f929c59f3 100644 (file)
@@ -581,6 +581,13 @@ web.siteName =
 # BASEFOLDER\r
 web.headerLogo = ${baseFolder}/logo.png\r
 \r
+# You may specify a different link URL for the logo image anchor.\r
+# If blank the Gitblit main page URL is used.\r
+#\r
+# SINCE 1.3.0\r
+# BASEFOLDER\r
+web.rootLink =\r
+\r
 # You may specify a custom header background CSS color.  If unspecified, the\r
 # default color will be used.\r
 #\r
index f8816831917683629bdec033455ed61c3d22d4d2..ec69a7198cf69ae77ffc2099169d9963cc94e7b4 100644 (file)
@@ -212,7 +212,8 @@ public abstract class BasePage extends SessionPage {
                        add(new Label("title", siteName));\r
                }\r
 \r
-               ExternalLink rootLink = new ExternalLink("rootLink", urlFor(GitBlitWebApp.HOME_PAGE_CLASS, null).toString());\r
+               String rootLinkUrl = GitBlit.getString(Keys.web.rootLink, urlFor(GitBlitWebApp.HOME_PAGE_CLASS, null).toString());\r
+               ExternalLink rootLink = new ExternalLink("rootLink", rootLinkUrl);\r
                WicketUtils.setHtmlTooltip(rootLink, GitBlit.getString(Keys.web.siteName, Constants.NAME));\r
                add(rootLink);\r
 \r