Show More
@@ -125,7 +125,7 b' class hgweb(object):' | |||||
125 | def archivelist(self, nodeid): |
|
125 | def archivelist(self, nodeid): | |
126 | for i in self.archives: |
|
126 | for i in self.archives: | |
127 | if self.repo.ui.configbool("web", "allow" + i, False): |
|
127 | if self.repo.ui.configbool("web", "allow" + i, False): | |
128 | yield {"type" : i, "node" : nodeid} |
|
128 | yield {"type" : i, "node" : nodeid, "url": ""} | |
129 |
|
129 | |||
130 | def listfiles(self, files, mf): |
|
130 | def listfiles(self, files, mf): | |
131 | for f in files[:self.maxfiles]: |
|
131 | for f in files[:self.maxfiles]: | |
@@ -1045,6 +1045,11 b' class hgwebdir(object):' | |||||
1045 | defaults={"header": header, |
|
1045 | defaults={"header": header, | |
1046 | "footer": footer}) |
|
1046 | "footer": footer}) | |
1047 |
|
1047 | |||
|
1048 | def archivelist(ui, nodeid, url): | |||
|
1049 | for i in ['zip', 'gz', 'bz2']: | |||
|
1050 | if ui.configbool("web", "allow" + i, False): | |||
|
1051 | yield {"type" : i, "node": nodeid, "url": url} | |||
|
1052 | ||||
1048 | def entries(**map): |
|
1053 | def entries(**map): | |
1049 | parity = 0 |
|
1054 | parity = 0 | |
1050 | for name, path in self.repos: |
|
1055 | for name, path in self.repos: | |
@@ -1071,7 +1076,8 b' class hgwebdir(object):' | |||||
1071 | url=url, |
|
1076 | url=url, | |
1072 | parity=parity, |
|
1077 | parity=parity, | |
1073 | shortdesc=get("web", "description", "unknown"), |
|
1078 | shortdesc=get("web", "description", "unknown"), | |
1074 |
lastupdate=d |
|
1079 | lastupdate=d, | |
|
1080 | archives=archivelist(u, "tip", url)) | |||
1075 |
|
1081 | |||
1076 | parity = 1 - parity |
|
1082 | parity = 1 - parity | |
1077 |
|
1083 |
@@ -43,8 +43,8 b' filediffparent = \'<tr><th class="parent"' | |||||
43 | filelogparent = '<tr><th>parent #rev#:</th><td><a href="?f=#node|short#;file=#file|urlescape#">#node|short#</a></td></tr>' |
|
43 | filelogparent = '<tr><th>parent #rev#:</th><td><a href="?f=#node|short#;file=#file|urlescape#">#node|short#</a></td></tr>' | |
44 | filediffchild = '<tr><th class="child">child #rev#:</th><td class="child"><a href="?cs=#node|short#">#node|short#</a></td></tr>' |
|
44 | filediffchild = '<tr><th class="child">child #rev#:</th><td class="child"><a href="?cs=#node|short#">#node|short#</a></td></tr>' | |
45 | filelogchild = '<tr><th>child #rev#:</th><td><a href="?f=#node|short#;file=#file|urlescape#">#node|short#</a></td></tr>' |
|
45 | filelogchild = '<tr><th>child #rev#:</th><td><a href="?f=#node|short#;file=#file|urlescape#">#node|short#</a></td></tr>' | |
46 | indexentry = '<tr class="parity#parity#"><td><a href="#url#">#name|escape#</a></td><td>#shortdesc#</td><td>#contact|obfuscate#</td><td class="age">#lastupdate|age# ago</td><td><a href="#url#?cl=tip;style=rss">RSS</a></td></tr>' |
|
46 | indexentry = '<tr class="parity#parity#"><td><a href="#url#">#name|escape#</a></td><td>#shortdesc#</td><td>#contact|obfuscate#</td><td class="age">#lastupdate|age# ago</td><td class="indexlinks"><a href="#url#?cl=tip;style=rss">RSS</a> #archives%archiveentry#</td></tr>' | |
47 | index = index.tmpl |
|
47 | index = index.tmpl | |
48 | archiveentry = '<a href="?ca=#node|short#;type=#type|urlescape#">#type|escape#</a> ' |
|
48 | archiveentry = '<a href="#url#?ca=#node|short#;type=#type|urlescape#">#type|escape#</a> ' | |
49 | notfound = notfound.tmpl |
|
49 | notfound = notfound.tmpl | |
50 | error = error.tmpl |
|
50 | error = error.tmpl |
@@ -1,5 +1,6 b'' | |||||
1 | a { text-decoration:none; } |
|
1 | a { text-decoration:none; } | |
2 | .age { white-space:nowrap; } |
|
2 | .age { white-space:nowrap; } | |
|
3 | .indexlinks { white-space:nowrap; } | |||
3 | .parity0 { background-color: #dddddd; } |
|
4 | .parity0 { background-color: #dddddd; } | |
4 | .parity1 { background-color: #eeeeee; } |
|
5 | .parity1 { background-color: #eeeeee; } | |
5 | .lineno { width: 60px; color: #aaaaaa; font-size: smaller; |
|
6 | .lineno { width: 60px; color: #aaaaaa; font-size: smaller; |
General Comments 0
You need to be logged in to leave comments.
Login now