##// END OF EJS Templates
hgweb: pass variable with current search mode name to the search template
Alexander Plavin -
r19765:521c373f default
parent child Browse files
Show More
@@ -151,9 +151,9 b' def _search(web, req, tmpl):'
151 yield web.repo[r]
151 yield web.repo[r]
152
152
153 searchfuncs = {
153 searchfuncs = {
154 MODE_REVISION: revsearch,
154 MODE_REVISION: (revsearch, _('exact revision search')),
155 MODE_KEYWORD: keywordsearch,
155 MODE_KEYWORD: (keywordsearch, _('literal keyword search')),
156 MODE_REVSET: revsetsearch,
156 MODE_REVSET: (revsetsearch, _('revset expression search')),
157 }
157 }
158
158
159 def getsearchmode(query):
159 def getsearchmode(query):
@@ -199,7 +199,7 b' def _search(web, req, tmpl):'
199 def changelist(**map):
199 def changelist(**map):
200 count = 0
200 count = 0
201
201
202 for ctx in searchfunc(funcarg):
202 for ctx in searchfunc[0](funcarg):
203 count += 1
203 count += 1
204 n = ctx.node()
204 n = ctx.node()
205 showtags = webutil.showtag(web.repo, tmpl, 'changelogtag', n)
205 showtags = webutil.showtag(web.repo, tmpl, 'changelogtag', n)
@@ -247,7 +247,8 b' def _search(web, req, tmpl):'
247
247
248 return tmpl('search', query=query, node=tip.hex(),
248 return tmpl('search', query=query, node=tip.hex(),
249 entries=changelist, archives=web.archivelist("tip"),
249 entries=changelist, archives=web.archivelist("tip"),
250 morevars=morevars, lessvars=lessvars)
250 morevars=morevars, lessvars=lessvars,
251 modedesc=searchfunc[1])
251
252
252 def changelog(web, req, tmpl, shortlog=False):
253 def changelog(web, req, tmpl, shortlog=False):
253
254
General Comments 0
You need to be logged in to leave comments. Login now