Show More
@@ -21,8 +21,8 class hgwebdir(object): | |||
|
21 | 21 | return [(name.strip(os.sep), path) for name, path in items] |
|
22 | 22 | |
|
23 | 23 | self.parentui = parentui |
|
24 |
self.motd = |
|
|
25 |
self.style = |
|
|
24 | self.motd = None | |
|
25 | self.style = None | |
|
26 | 26 | self.repos_sorted = ('name', False) |
|
27 | 27 | if isinstance(config, (list, tuple)): |
|
28 | 28 | self.repos = cleannames(config) |
@@ -72,15 +72,23 class hgwebdir(object): | |||
|
72 | 72 | yield tmpl("footer", **map) |
|
73 | 73 | |
|
74 | 74 | def motd(**map): |
|
75 | if self.motd is not None: | |
|
75 | 76 | yield self.motd |
|
77 | else: | |
|
78 | yield config('web', 'motd', '') | |
|
76 | 79 | |
|
77 | 80 | parentui = self.parentui or ui.ui(report_untrusted=False) |
|
78 | 81 | |
|
82 | def config(section, name, default=None, untrusted=True): | |
|
83 | return parentui.config(section, name, default, untrusted) | |
|
84 | ||
|
79 | 85 | url = req.env['REQUEST_URI'].split('?')[0] |
|
80 | 86 | if not url.endswith('/'): |
|
81 | 87 | url += '/' |
|
82 | 88 | |
|
83 | 89 | style = self.style |
|
90 | if style is None: | |
|
91 | style = config('web', 'style', '') | |
|
84 | 92 | if req.form.has_key('style'): |
|
85 | 93 | style = req.form['style'][0] |
|
86 | 94 | mapfile = style_map(templater.templatepath(), style) |
General Comments 0
You need to be logged in to leave comments.
Login now