##// END OF EJS Templates
hgweb: make #motd# available for all templates
Alexis S. L. Carvalho -
r3488:8f022236 default
parent child Browse files
Show More
@@ -629,9 +629,10 b' class hgweb(object):'
629 yield ''
629 yield ''
630
630
631 def footer(**map):
631 def footer(**map):
632 yield self.t("footer",
632 yield self.t("footer", **map)
633 motd=self.repo.ui.config("web", "motd", ""),
633
634 **map)
634 def motd(**map):
635 yield self.repo.ui.config("web", "motd", "")
635
636
636 def expand_form(form):
637 def expand_form(form):
637 shortcuts = {
638 shortcuts = {
@@ -762,6 +763,7 b' class hgweb(object):'
762 "repo": self.reponame,
763 "repo": self.reponame,
763 "header": header,
764 "header": header,
764 "footer": footer,
765 "footer": footer,
766 "motd": motd,
765 "rawfileheader": rawfileheader,
767 "rawfileheader": rawfileheader,
766 "sessionvars": sessionvars
768 "sessionvars": sessionvars
767 })
769 })
@@ -69,6 +69,9 b' class hgwebdir(object):'
69 def footer(**map):
69 def footer(**map):
70 yield tmpl("footer", **map)
70 yield tmpl("footer", **map)
71
71
72 def motd(**map):
73 yield self.motd
74
72 url = req.env['REQUEST_URI'].split('?')[0]
75 url = req.env['REQUEST_URI'].split('?')[0]
73 if not url.endswith('/'):
76 if not url.endswith('/'):
74 url += '/'
77 url += '/'
@@ -80,6 +83,7 b' class hgwebdir(object):'
80 tmpl = templater.templater(mapfile, templater.common_filters,
83 tmpl = templater.templater(mapfile, templater.common_filters,
81 defaults={"header": header,
84 defaults={"header": header,
82 "footer": footer,
85 "footer": footer,
86 "motd": motd,
83 "url": url})
87 "url": url})
84
88
85 def archivelist(ui, nodeid, url):
89 def archivelist(ui, nodeid, url):
@@ -202,5 +206,4 b' class hgwebdir(object):'
202 for column in sortable]
206 for column in sortable]
203 req.write(tmpl("index", entries=entries,
207 req.write(tmpl("index", entries=entries,
204 sortcolumn=sortcolumn, descending=descending,
208 sortcolumn=sortcolumn, descending=descending,
205 motd=self.motd,
206 **dict(sort)))
209 **dict(sort)))
General Comments 0
You need to be logged in to leave comments. Login now