annotate pylons_app/templates/files/file_diff.html @ 152:0c00fbaff55a

Fixed differ to properly extract filenames, and dates from diff file. and swaped order of columns with lines nr in diff html
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 15 May 2010 19:53:23 +0200
parents ea89ac73bef8
children f905f45c457e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
129
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 <%inherit file="/base/base.html"/>
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
3 <%def name="title()">
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4 ${_('Repository managment')}
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5 </%def>
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
6 <%def name="breadcrumbs()">
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7 ${h.link_to(u'Home',h.url('/'))}
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
8 /
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
9 ${h.link_to(c.repo_name,h.url('files_home',repo_name=c.repo_name))}
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
10 /
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
11 ${_('files')}
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
12 </%def>
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
13 <%def name="page_nav()">
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
14 <form action="log">
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15 <dl class="search">
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
16 <dt><label>Search: </label></dt>
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
17 <dd><input type="text" name="rev" /></dd>
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
18 </dl>
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
19 </form>
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
20
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
21 ${self.menu('files')}
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
22 </%def>
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
23 <%def name="css()">
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
24 <link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" />
144
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
25 <link rel="stylesheet" href="/css/diff.css" type="text/css" />
129
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
26 </%def>
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
27 <%def name="main()">
144
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
28 <h2 class="no-link no-border">${'%s: %s %s %s' % (_('File diff'),c.diff2,'&rarr;',c.diff1)|n}</h2>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
29 <div id="body" class="diffblock">
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
30 <div class="code-header">
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
31 <span>${h.link_to(c.f_path,h.url('files_home',repo_name=c.repo_name,revision=c.diff2.split(':')[1],f_path=c.f_path))}</span>
129
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
32 </div>
144
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
33 <div class="code-body">
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
34 %if c.no_changes:
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
35 ${_('No changes')}
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
36 %else:
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
37 <table class='code-difftable'>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
38 %for diff in c.diff_files:
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
39 %for x in diff['chunks']:
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
40 %for y in x:
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
41 <tr class="line ${y['action']}">
152
0c00fbaff55a Fixed differ to properly extract filenames, and dates from diff file. and swaped order of columns with lines nr in diff html
Marcin Kuzminski <marcin@python-works.com>
parents: 144
diff changeset
42 <td id="#${diff['filename']}_O${y['old_lineno']}" class="lineno old">
0c00fbaff55a Fixed differ to properly extract filenames, and dates from diff file. and swaped order of columns with lines nr in diff html
Marcin Kuzminski <marcin@python-works.com>
parents: 144
diff changeset
43 <pre><a href="#${diff['filename']}_O${y['old_lineno']}">${y['old_lineno']}</a></pre>
0c00fbaff55a Fixed differ to properly extract filenames, and dates from diff file. and swaped order of columns with lines nr in diff html
Marcin Kuzminski <marcin@python-works.com>
parents: 144
diff changeset
44 </td>
144
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
45 <td id="#${diff['filename']}_N${y['new_lineno']}"class="lineno new">
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
46 <pre><a href="#${diff['filename']}_N${y['new_lineno']}">${y['new_lineno']}</a></pre>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
47 </td>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
48 <td class="code">
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
49 <pre>${y['line']|n}</pre>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
50 </td>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
51 </tr>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
52 %endfor$
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
53 %endfor
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
54 %endfor
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
55 </table>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
56 %endif
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
57 </div>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 130
diff changeset
58 </div>
129
42d46deb124d implemented simple diffs for history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
59 </%def>