Show More
@@ -90,6 +90,18 class hgwebdir(object): | |||||
90 | "node": nodeid, "url": url} |
|
90 | "node": nodeid, "url": url} | |
91 |
|
91 | |||
92 | def entries(sortcolumn="", descending=False, **map): |
|
92 | def entries(sortcolumn="", descending=False, **map): | |
|
93 | def sessionvars(**map): | |||
|
94 | fields = [] | |||
|
95 | if req.form.has_key('style'): | |||
|
96 | style = req.form['style'][0] | |||
|
97 | if style != get('web', 'style', ''): | |||
|
98 | fields.append(('style', style)) | |||
|
99 | ||||
|
100 | separator = url[-1] == '?' and ';' or '?' | |||
|
101 | for name, value in fields: | |||
|
102 | yield dict(name=name, value=value, separator=separator) | |||
|
103 | separator = ';' | |||
|
104 | ||||
93 | rows = [] |
|
105 | rows = [] | |
94 | parity = 0 |
|
106 | parity = 0 | |
95 | for name, path in self.repos: |
|
107 | for name, path in self.repos: | |
@@ -123,6 +135,7 class hgwebdir(object): | |||||
123 | description_sort=description.upper() or "unknown", |
|
135 | description_sort=description.upper() or "unknown", | |
124 | lastchange=d, |
|
136 | lastchange=d, | |
125 | lastchange_sort=d[1]-d[0], |
|
137 | lastchange_sort=d[1]-d[0], | |
|
138 | sessionvars=sessionvars, | |||
126 | archives=archivelist(u, "tip", url)) |
|
139 | archives=archivelist(u, "tip", url)) | |
127 | if (not sortcolumn |
|
140 | if (not sortcolumn | |
128 | or (sortcolumn, descending) == self.repos_sorted): |
|
141 | or (sortcolumn, descending) == self.repos_sorted): |
@@ -49,7 +49,7 shortlog = shortlog.tmpl | |||||
49 | shortlogentry = '<tr class="parity#parity#"><td class="age"><i>#date|age# ago</i></td><td><i>#author#</i></td><td><a class="list" href="{url}rev/#node|short#{sessionvars%urlparameter}"><b>#desc|strip|firstline|escape#</b></a></td><td class="link"><a href="{url}rev/#node|short#{sessionvars%urlparameter}">changeset</a> | <a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a></td></tr>' |
|
49 | shortlogentry = '<tr class="parity#parity#"><td class="age"><i>#date|age# ago</i></td><td><i>#author#</i></td><td><a class="list" href="{url}rev/#node|short#{sessionvars%urlparameter}"><b>#desc|strip|firstline|escape#</b></a></td><td class="link"><a href="{url}rev/#node|short#{sessionvars%urlparameter}">changeset</a> | <a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a></td></tr>' | |
50 | filelogentry = '<tr class="parity#parity#"><td class="age"><i>#date|age# ago</i></td><td><a class="list" href="{url}rev/#node|short#{sessionvars%urlparameter}"><b>#desc|strip|firstline|escape#</b></a></td><td class="link"><a href="{url}file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">file</a> | <!-- FIXME: <a href="{url}diff/#node|short#/#file|urlescape#{sessionvars%urlparameter}">diff</a> | --> <a href="{url}annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}">annotate</a> #rename%filelogrename#</td></tr>' |
|
50 | filelogentry = '<tr class="parity#parity#"><td class="age"><i>#date|age# ago</i></td><td><a class="list" href="{url}rev/#node|short#{sessionvars%urlparameter}"><b>#desc|strip|firstline|escape#</b></a></td><td class="link"><a href="{url}file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">file</a> | <!-- FIXME: <a href="{url}diff/#node|short#/#file|urlescape#{sessionvars%urlparameter}">diff</a> | --> <a href="{url}annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}">annotate</a> #rename%filelogrename#</td></tr>' | |
51 | archiveentry = ' | <a href="{url}archive/{node|short}{extension}">#type|escape#</a> ' |
|
51 | archiveentry = ' | <a href="{url}archive/{node|short}{extension}">#type|escape#</a> ' | |
52 | indexentry = '<tr class="parity#parity#"><td><a class="list" href="#url#"><b>#name|escape#</b></a></td><td>#description#</td><td>#contact|obfuscate#</td><td class="age">#lastchange|age# ago</td><td class="indexlinks"><a class="rss_logo" href="#url#rss-log">RSS</a> #archives%archiveentry#</td></tr>' |
|
52 | indexentry = '<tr class="parity#parity#"><td><a class="list" href="#url#{sessionvars%urlparameter}"><b>#name|escape#</b></a></td><td>#description#</td><td>#contact|obfuscate#</td><td class="age">#lastchange|age# ago</td><td class="indexlinks"><a class="rss_logo" href="#url#rss-log">RSS</a> #archives%archiveentry#</td></tr>' | |
53 | index = index.tmpl |
|
53 | index = index.tmpl | |
54 | urlparameter = '#separator##name#=#value|urlescape#' |
|
54 | urlparameter = '#separator##name#=#value|urlescape#' | |
55 | hiddenformentry = '<input type="hidden" name="#name#" value="#value|escape#" />' |
|
55 | hiddenformentry = '<input type="hidden" name="#name#" value="#value|escape#" />' |
@@ -46,7 +46,7 filediffparent = '<tr><th class="parent" | |||||
46 | filelogparent = '<tr><th>parent #rev#:</th><td><a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#node|short#</a></td></tr>' |
|
46 | filelogparent = '<tr><th>parent #rev#:</th><td><a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#node|short#</a></td></tr>' | |
47 | filediffchild = '<tr><th class="child">child #rev#:</th><td class="child"><a href="#url#rev/#node|short#{sessionvars%urlparameter}">#node|short#</a></td></tr>' |
|
47 | filediffchild = '<tr><th class="child">child #rev#:</th><td class="child"><a href="#url#rev/#node|short#{sessionvars%urlparameter}">#node|short#</a></td></tr>' | |
48 | filelogchild = '<tr><th>child #rev#:</th><td><a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#node|short#</a></td></tr>' |
|
48 | filelogchild = '<tr><th>child #rev#:</th><td><a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#node|short#</a></td></tr>' | |
49 | indexentry = '<tr class="parity#parity#"><td><a href="#url#">#name|escape#</a></td><td>#description#</td><td>#contact|obfuscate#</td><td class="age">#lastchange|age# ago</td><td class="indexlinks"><a href="#url#rss-log">RSS</a> #archives%archiveentry#</td></tr>' |
|
49 | indexentry = '<tr class="parity#parity#"><td><a href="#url#{sessionvars%urlparameter}">#name|escape#</a></td><td>#description#</td><td>#contact|obfuscate#</td><td class="age">#lastchange|age# ago</td><td class="indexlinks"><a href="#url#rss-log">RSS</a> #archives%archiveentry#</td></tr>' | |
50 | index = index.tmpl |
|
50 | index = index.tmpl | |
51 | archiveentry = '<a href="#url#archive/#node|short##extension|urlescape#">#type|escape#</a> ' |
|
51 | archiveentry = '<a href="#url#archive/#node|short##extension|urlescape#">#type|escape#</a> ' | |
52 | notfound = notfound.tmpl |
|
52 | notfound = notfound.tmpl |
General Comments 0
You need to be logged in to leave comments.
Login now