Mercurial > hg
diff mercurial/templates/gitweb/map @ 31948:7a3fc3f3e89a
gitweb: handle "patch" query parameter in filelog view
As for paper style, in f36dc643ffdc, we display "diff" data as an additional
row in the table of revision entries for the gitweb template.
Also, as these additional diff rows have a white background, they may be
confused with log entry rows ("age", "author", "description", "links") of even
parity (parity0 also have a white background). So we disable parity colors for
log entry rows when diff is displayed and fix the color to the
"dark" parity (i.e. parity1 #f6f6f0) so that it's always distinguishable from
author | Denis Laxalde <denis.laxalde@logilab.fr> |
---|---|
date | Thu, 13 Apr 2017 10:04:09 +0200 |
parents | a816857b88b9 |
children | 58f3088aa2f5 |
line wrap: on
line diff
--- a/mercurial/templates/gitweb/map Thu Apr 13 09:59:58 2017 +0200 +++ b/mercurial/templates/gitweb/map Thu Apr 13 10:04:09 2017 +0200 @@ -282,7 +282,7 @@ </td> </tr>' filelogentry = ' - <tr class="parity{parity}"> + <tr class="parity{if(patch, '1', '{parity}')}"> <td class="age"><i class="age">{date|rfc822date}</i></td> <td><i>{author|person}</i></td> <td> @@ -297,7 +297,8 @@ <a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> {rename%filelogrename} </td> - </tr>' + </tr> + {if(patch, '<tr><td colspan="4">{diff}</td></tr>')}' archiveentry = ' | <a href="{url|urlescape}archive/{symrev}{extension}{ifeq(path,'/','',path|urlescape)}">{type|escape}</a> ' indexentry = ' <tr class="parity{parity}">