[PATCH 12 of 20] hgweb, paper: add shortlogajax template and use it
Alexander Plavin
alexander at plav.in
Fri Aug 9 13:57:37 CDT 2013
# HG changeset patch
# User Alexander Plavin <alexander at plav.in>
# Date 1376061214 -14400
# Fri Aug 09 19:13:34 2013 +0400
# Node ID d29091e49e209d58302e2835a3cdf63b6df7f8f2
# Parent d207510e86ed78f44521ce847283ac5abafa9eeb
hgweb, paper: add shortlogajax template and use it
diff -r d207510e86ed -r d29091e49e20 mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py Wed Jul 24 20:02:34 2013 +0400
+++ b/mercurial/hgweb/webcommands.py Fri Aug 09 19:13:34 2013 +0400
@@ -317,7 +317,11 @@
latestentry = entries[:1]
oldestentry = entries[-1:]
- return tmpl(shortlog and 'shortlog' or 'changelog', changenav=changenav,
+ template = shortlog and 'shortlog' or 'changelog'
+ if 'ajax' in req.form:
+ template += 'ajax'
+
+ return tmpl(template, changenav=changenav,
node=ctx.hex(), rev=pos, changesets=count,
entries=entries,
latestentry=latestentry, oldestentry=oldestentry,
diff -r d207510e86ed -r d29091e49e20 mercurial/templates/paper/map
--- a/mercurial/templates/paper/map Wed Jul 24 20:02:34 2013 +0400
+++ b/mercurial/templates/paper/map Fri Aug 09 19:13:34 2013 +0400
@@ -7,6 +7,10 @@
changelog = shortlog.tmpl
shortlog = shortlog.tmpl
+shortlogajax = '<shortlog>
+ <html><![CDATA[{entries%shortlogentry}]]></html>
+ <lasthash>{oldestentry%"{node|short}"}</lasthash>
+ </shortlog>'
shortlogentry = shortlogentry.tmpl
graph = graph.tmpl
help = help.tmpl
More information about the Mercurial-devel
mailing list