[PATCH] enable more branding related configuration in default hgweb templates #2

Hangsu Ma mahangsu at gmail.com
Sun Dec 16 13:27:17 CST 2012


# HG changeset patch
# User hangsu.ma at datalex.com
# Date 1355683801 0
# Branch stable
# Node ID 22f5075c9d757d8a9958b61d7fbab331bd574d87
# Parent  6585e9529f358bbc947d0bf37ed25e8673b96f92
hgweb: adding config param to change default logo tip

diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/help/config.txt
--- a/mercurial/help/config.txt Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/help/config.txt Sun Dec 16 18:50:01 2012 +0000
@@ -1415,6 +1415,9 @@
     Alternative string to display when logo can't be displayed. If unset,
     ``Mercurial`` will be used.

+``logotip``
+    Tip for logo image. If unset, ``Mercurial`` will be used.
+
 ``maxchanges``
     Maximum number of changes to list on the changelog. Default is 10.

diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/hgweb/hgweb_mod.py Sun Dec 16 18:50:01 2012 +0000
@@ -239,6 +239,7 @@
         logourl = self.config("web", "logourl",
"http://mercurial.selenic.com/")
         logoimg = self.config("web", "logoimg", "hglogo.png")
         logoalt = self.config("web", "logoalt", "Mercurial")
+        logotip = self.config("web", "logotip", "Mercurial")
         staticurl = self.config("web", "staticurl") or req.url + 'static/'
         if not staticurl.endswith('/'):
             staticurl += '/'
@@ -281,6 +282,7 @@
                                              "logourl": logourl,
                                              "logoimg": logoimg,
                                              "logoalt": logoalt,
+                                             "logotip": logotip,
                                              "staticurl": staticurl,
                                              "urlbase": urlbase,
                                              "repo": self.reponame,
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgwebdir_mod.py Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/hgweb/hgwebdir_mod.py Sun Dec 16 18:50:01 2012 +0000
@@ -429,6 +429,7 @@
         logourl = config('web', 'logourl', 'http://mercurial.selenic.com/')
         logoimg = config('web', 'logoimg', 'hglogo.png')
         logoalt = config('web', 'logoalt', 'Mercurial')
+        logotip = config('web', 'logotip', 'Mercurial')
         staticurl = config('web', 'staticurl') or url + 'static/'
         if not staticurl.endswith('/'):
             staticurl += '/'
@@ -441,6 +442,7 @@
                                              "logourl": logourl,
                                              "logoimg": logoimg,
                                              "logoalt": logoalt,
+                                             "logotip": logotip,
                                              "staticurl": staticurl,
                                              "sessionvars": sessionvars})
         return tmpl
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/gitweb/bookmarks.tmpl
--- a/mercurial/templates/gitweb/bookmarks.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/gitweb/bookmarks.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -8,7 +8,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
bookmarks
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
bookmarks
 </div>

 <div class="page_nav">
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/gitweb/branches.tmpl
--- a/mercurial/templates/gitweb/branches.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/gitweb/branches.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -8,7 +8,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
branches
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
branches
 </div>

 <div class="page_nav">
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/gitweb/changelog.tmpl
--- a/mercurial/templates/gitweb/changelog.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/gitweb/changelog.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -8,7 +8,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
changelog
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
changelog
 </div>

 <form action="{url}log">
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/gitweb/changeset.tmpl
--- a/mercurial/templates/gitweb/changeset.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/gitweb/changeset.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -8,7 +8,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
changeset
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
changeset
 </div>

 <div class="page_nav">
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/gitweb/error.tmpl
--- a/mercurial/templates/gitweb/error.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/gitweb/error.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -8,7 +8,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
error
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
error
 </div>

 <div class="page_nav">
diff -r 6585e9529f35 -r 22f5075c9d75
mercurial/templates/gitweb/fileannotate.tmpl
--- a/mercurial/templates/gitweb/fileannotate.tmpl Sun Dec 16 17:15:04
2012 +0000
+++ b/mercurial/templates/gitweb/fileannotate.tmpl Sun Dec 16 18:50:01
2012 +0000
@@ -8,7 +8,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
annotate
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
annotate
 </div>

 <div class="page_nav">
diff -r 6585e9529f35 -r 22f5075c9d75
mercurial/templates/gitweb/filecomparison.tmpl
--- a/mercurial/templates/gitweb/filecomparison.tmpl Sun Dec 16
17:15:04 2012 +0000
+++ b/mercurial/templates/gitweb/filecomparison.tmpl Sun Dec 16
18:50:01 2012 +0000
@@ -8,7 +8,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
comparison
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
comparison
 </div>

 <div class="page_nav">
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/gitweb/filediff.tmpl
--- a/mercurial/templates/gitweb/filediff.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/gitweb/filediff.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -8,7 +8,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / diff
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / diff
 </div>

 <div class="page_nav">
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/gitweb/filelog.tmpl
--- a/mercurial/templates/gitweb/filelog.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/gitweb/filelog.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -8,7 +8,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file
revisions
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file
revisions
 </div>

 <div class="page_nav">
diff -r 6585e9529f35 -r 22f5075c9d75
mercurial/templates/gitweb/filerevision.tmpl
--- a/mercurial/templates/gitweb/filerevision.tmpl Sun Dec 16 17:15:04
2012 +0000
+++ b/mercurial/templates/gitweb/filerevision.tmpl Sun Dec 16 18:50:01
2012 +0000
@@ -8,7 +8,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file
revision
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file
revision
 </div>

 <div class="page_nav">
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/gitweb/graph.tmpl
--- a/mercurial/templates/gitweb/graph.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/gitweb/graph.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -9,7 +9,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
graph
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
graph
 </div>

 <form action="{url}log">
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/gitweb/help.tmpl
--- a/mercurial/templates/gitweb/help.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/gitweb/help.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -8,7 +8,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / help
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / help
 </div>

 <div class="page_nav">
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/gitweb/helptopics.tmpl
--- a/mercurial/templates/gitweb/helptopics.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/gitweb/helptopics.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -8,7 +8,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / help
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / help
 </div>

 <div class="page_nav">
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/gitweb/index.tmpl
--- a/mercurial/templates/gitweb/index.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/gitweb/index.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -4,7 +4,7 @@
 <body>

 <div class="page_header">
-    <a href="{logourl}" title="Mercurial" style="float: right;">{logoalt}</a>
+    <a href="{logourl}" title="{logotip}" style="float: right;">{logoalt}</a>
     Repositories list
 </div>

diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/gitweb/manifest.tmpl
--- a/mercurial/templates/gitweb/manifest.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/gitweb/manifest.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -8,7 +8,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
files
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
files
 </div>

 <div class="page_nav">
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/gitweb/notfound.tmpl
--- a/mercurial/templates/gitweb/notfound.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/gitweb/notfound.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -5,7 +5,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a> Not found: {repo|escape}
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a> Not found: {repo|escape}
 </div>

 <div class="page_body">
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/gitweb/search.tmpl
--- a/mercurial/templates/gitweb/search.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/gitweb/search.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -8,7 +8,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
search
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
search

 <form action="{url}log">
 {sessionvars%hiddenformentry}
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/gitweb/shortlog.tmpl
--- a/mercurial/templates/gitweb/shortlog.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/gitweb/shortlog.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -8,7 +8,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
shortlog
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
shortlog
 </div>

 <form action="{url}log">
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/gitweb/summary.tmpl
--- a/mercurial/templates/gitweb/summary.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/gitweb/summary.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -8,7 +8,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
summary
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> /
summary

 <form action="{url}log">
 {sessionvars%hiddenformentry}
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/gitweb/tags.tmpl
--- a/mercurial/templates/gitweb/tags.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/gitweb/tags.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -8,7 +8,7 @@
 <body>

 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / tags
+<a href="{logourl}" title="{logotip}" style="float:
right;">{logoalt}</a><a
href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / tags
 </div>

 <div class="page_nav">
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/monoblue/footer.tmpl
--- a/mercurial/templates/monoblue/footer.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/monoblue/footer.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -9,7 +9,7 @@
     </div>

     <div id="powered-by">
-        <p><a href="{logourl}" title="Mercurial"><img
src="{staticurl}{logoimg}" width=75 height=90 border=0
alt="{logoalt}"></a></p>
+        <p><a href="{logourl}" title="{logotip}"><img
src="{staticurl}{logoimg}" width=75 height=90 border=0
alt="{logoalt}"></a></p>
     </div>

     <div id="corner-top-left"></div>
diff -r 6585e9529f35 -r 22f5075c9d75 mercurial/templates/monoblue/index.tmpl
--- a/mercurial/templates/monoblue/index.tmpl Sun Dec 16 17:15:04 2012 +0000
+++ b/mercurial/templates/monoblue/index.tmpl Sun Dec 16 18:50:01 2012 +0000
@@ -26,7 +26,7 @@
     </div>

     <div id="powered-by">
-        <p><a href="{logourl}" title="Mercurial"><img
src="{staticurl}{logoimg}" width=75 height=90 border=0
alt="{logoalt}"></a></p>
+        <p><a href="{logourl}" title="{logotip}"><img
src="{staticurl}{logoimg}" width=75 height=90 border=0
alt="{logoalt}"></a></p>
     </div>

     <div id="corner-top-left"></div>


More information about the Mercurial-devel mailing list